)]}'
{"vitrage/common/constants.py":[{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"8d35ac2c8d9e7680da221bf44543ec221cba685d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    DATASOURCE_ACTION \u003d \u0027vitrage_datasource_action\u0027"},{"line_number":93,"context_line":"    SAMPLE_DATE \u003d \u0027vitrage_sample_date\u0027"},{"line_number":94,"context_line":"    EVENT_TYPE \u003d \u0027vitrage_event_type\u0027"},{"line_number":95,"context_line":"    IS_EXTERNAL \u003d \u0027vitrage_is_external\u0027"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class GraphAction(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_aec9c45c","line":95,"range":{"start_line":95,"start_character":4,"end_line":95,"end_character":39},"updated":"2016-12-08 08:40:22.000000000","message":"I think you forgot to remove this","commit_id":"52fceea7c9f434ced023c5cec6db69a016c8125f"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"8d35ac2c8d9e7680da221bf44543ec221cba685d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    ENTITIES \u003d \u0027entities\u0027"},{"line_number":124,"context_line":"    ENTITY \u003d \u0027entity\u0027"},{"line_number":125,"context_line":"    TYPE \u003d \u0027type\u0027"},{"line_number":126,"context_line":"    EXTERNAL_ENTITIES \u003d \u0027external_entities\u0027"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    RELATIONSHIPS \u003d \u0027relationships\u0027"},{"line_number":129,"context_line":"    RELATIONSHIP \u003d \u0027relationship\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_cec60049","line":126,"range":{"start_line":126,"start_character":4,"end_line":126,"end_character":43},"updated":"2016-12-08 08:40:22.000000000","message":"I think you forgot to remove this","commit_id":"52fceea7c9f434ced023c5cec6db69a016c8125f"}],"vitrage/datasources/static/__init__.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6cf412fed3d7f84f1990e9b4b3213585b6c8af1d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d\u0027Static driver class path\u0027,"},{"line_number":30,"context_line":"               required\u003dTrue),"},{"line_number":31,"context_line":"    cfg.StrOpt(\u0027update_method\u0027,"},{"line_number":32,"context_line":"               default\u003dUpdateMethod.NONE,"},{"line_number":33,"context_line":"               help\u003d\u0027None: updates only via Vitrage periodic snapshots.\u0027"},{"line_number":34,"context_line":"                    \u0027Pull: updates periodically.\u0027"},{"line_number":35,"context_line":"                    \u0027Push: updates by getting notifications from the\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_a9c8fb75","line":32,"range":{"start_line":32,"start_character":36,"end_line":32,"end_character":40},"updated":"2016-12-01 13:16:46.000000000","message":"I agree that get_changes is not a common use case, but why should we block this option? personally I used it for debug more than once. And I think it is possible that a customer will use it at a certain stage (e.g. to add a configuration that was left out by mistake)","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"ee5e08c30e3ef5597dc076aae960601627d0f9ed","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d\u0027Static driver class path\u0027,"},{"line_number":30,"context_line":"               required\u003dTrue),"},{"line_number":31,"context_line":"    cfg.StrOpt(\u0027update_method\u0027,"},{"line_number":32,"context_line":"               default\u003dUpdateMethod.NONE,"},{"line_number":33,"context_line":"               help\u003d\u0027None: updates only via Vitrage periodic snapshots.\u0027"},{"line_number":34,"context_line":"                    \u0027Pull: updates periodically.\u0027"},{"line_number":35,"context_line":"                    \u0027Push: updates by getting notifications from the\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_75c15080","line":32,"range":{"start_line":32,"start_character":36,"end_line":32,"end_character":40},"in_reply_to":"3a71b18c_8f37bfe2","updated":"2016-12-01 14:06:51.000000000","message":"An alternative solution could be explicitly reloading from CLI","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"abfd796152508e17f315d777d86fbedb3768cac5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d\u0027Static driver class path\u0027,"},{"line_number":30,"context_line":"               required\u003dTrue),"},{"line_number":31,"context_line":"    cfg.StrOpt(\u0027update_method\u0027,"},{"line_number":32,"context_line":"               default\u003dUpdateMethod.NONE,"},{"line_number":33,"context_line":"               help\u003d\u0027None: updates only via Vitrage periodic snapshots.\u0027"},{"line_number":34,"context_line":"                    \u0027Pull: updates periodically.\u0027"},{"line_number":35,"context_line":"                    \u0027Push: updates by getting notifications from the\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_8f37bfe2","line":32,"range":{"start_line":32,"start_character":36,"end_line":32,"end_character":40},"in_reply_to":"3a71b18c_a9c8fb75","updated":"2016-12-01 14:05:14.000000000","message":"Alexey once told me that he thought it should always require a restart to reload the configuration file.\n\nAnd I think it would be safer to keep a running system isolated from filesystem change. But it seems setting to NONE still allows automatic reloading from snapshot service?","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"}],"vitrage/datasources/static/driver.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6cf412fed3d7f84f1990e9b4b3213585b6c8af1d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.cache \u003d {}"},{"line_number":33,"context_line":"        self.legacy_driver \u003d {}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    DEFINITIONS_SECTION \u003d \u0027definitions\u0027"},{"line_number":36,"context_line":"    ENTITIES_SECTION \u003d \u0027entities\u0027"},{"line_number":37,"context_line":"    RELATIONSHIPS_SECTION \u003d \u0027relationships\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def get_event_types():"},{"line_number":41,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_69ca6351","line":38,"range":{"start_line":35,"start_character":0,"end_line":38,"end_character":0},"updated":"2016-12-01 13:16:46.000000000","message":"Why not reuse TemplateFields? It currently contains definitions that are not related to the static datasource, but I think you can split it to two - the general topology definition (definitions, entities, relationships) and the template-specific definitions","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"abfd796152508e17f315d777d86fbedb3768cac5","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.cache \u003d {}"},{"line_number":33,"context_line":"        self.legacy_driver \u003d {}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    DEFINITIONS_SECTION \u003d \u0027definitions\u0027"},{"line_number":36,"context_line":"    ENTITIES_SECTION \u003d \u0027entities\u0027"},{"line_number":37,"context_line":"    RELATIONSHIPS_SECTION \u003d \u0027relationships\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def get_event_types():"},{"line_number":41,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_d59a24c5","line":38,"range":{"start_line":35,"start_character":0,"end_line":38,"end_character":0},"in_reply_to":"3a71b18c_69ca6351","updated":"2016-12-01 14:05:14.000000000","message":"Done","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6cf412fed3d7f84f1990e9b4b3213585b6c8af1d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        pass"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all(self, datasource_action):"},{"line_number":48,"context_line":"        LOG.warning([entity for entity in self._get_all_entities()])"},{"line_number":49,"context_line":"        return self.make_pickleable(self._get_all_entities(),"},{"line_number":50,"context_line":"                                    STATIC_DATASOURCE,"},{"line_number":51,"context_line":"                                    datasource_action)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_c9d8d720","line":48,"range":{"start_line":48,"start_character":8,"end_line":48,"end_character":68},"updated":"2016-12-01 13:16:46.000000000","message":"This is for debug, right?...","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"abfd796152508e17f315d777d86fbedb3768cac5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        pass"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all(self, datasource_action):"},{"line_number":48,"context_line":"        LOG.warning([entity for entity in self._get_all_entities()])"},{"line_number":49,"context_line":"        return self.make_pickleable(self._get_all_entities(),"},{"line_number":50,"context_line":"                                    STATIC_DATASOURCE,"},{"line_number":51,"context_line":"                                    datasource_action)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_f59f20b2","line":48,"range":{"start_line":48,"start_character":8,"end_line":48,"end_character":68},"in_reply_to":"3a71b18c_c9d8d720","updated":"2016-12-01 14:05:14.000000000","message":"Done","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"608299626ded9189521577d7e4ceb50228589d75","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.legacy_driver \u003d {}"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_6da04444","line":37,"updated":"2016-12-05 07:13:57.000000000","message":"it looks like a private method so please start it with \"_\"","commit_id":"c23b6d983253fc4f16f9259d6e486e4fd80517d0"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"cde098f7cd54482c007f4c94bc18a946b845dadf","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.legacy_driver \u003d {}"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_10026ab4","line":37,"in_reply_to":"3a71b18c_6da04444","updated":"2016-12-05 12:55:20.000000000","message":"This is referred in legacy `static_physical` datasource. Not sure we should make it private before deprecation or not.","commit_id":"c23b6d983253fc4f16f9259d6e486e4fd80517d0"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"1e726ff39728b63205117dd9ef7c992608d50022","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @staticmethod"},{"line_number":43,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_b0513365","line":40,"range":{"start_line":40,"start_character":15,"end_line":40,"end_character":29},"updated":"2016-12-01 15:16:42.000000000","message":"I think we should rename it to something more general, like TopologyConfig. Some of the fields in TemplateField are relevant only for the templates, while others are the representation of a topology that the driver can also use","commit_id":"c23b6d983253fc4f16f9259d6e486e4fd80517d0"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"4b353dee5ea73418932d7b8a07e5254c6bdc31a0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @staticmethod"},{"line_number":43,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_d35a2083","line":40,"range":{"start_line":40,"start_character":15,"end_line":40,"end_character":29},"in_reply_to":"3a71b18c_b0513365","updated":"2016-12-02 00:48:51.000000000","message":"Agree. I think we should harmonize the terminology when the scope extends.","commit_id":"c23b6d983253fc4f16f9259d6e486e4fd80517d0"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"ed44780508dc2725bd10f7e43db0808d70f55c6c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @staticmethod"},{"line_number":43,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_bc548921","line":40,"range":{"start_line":40,"start_character":15,"end_line":40,"end_character":29},"in_reply_to":"3a71b18c_b0513365","updated":"2016-12-02 07:07:36.000000000","message":"Proposed in https://review.openstack.org/#/c/405959/ I\u0027ll rebase once that patch get approved.","commit_id":"c23b6d983253fc4f16f9259d6e486e4fd80517d0"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"72976fed82e77d25bd6e52ada6682b3be5b482c4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_b6ae0b7f","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":45},"updated":"2016-12-05 14:56:54.000000000","message":"Maybe try to reuse the template validation","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"a2af5809cd754518cce4ddc02a3b6fdb4e55218a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def is_valid_config(config):"},{"line_number":38,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":39,"context_line":"        # TODO(yujunz) check with yaml schema"},{"line_number":40,"context_line":"        return TemplateFields.DEFINITIONS in config"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_54d4b6bb","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":45},"in_reply_to":"3a71b18c_b6ae0b7f","updated":"2016-12-06 02:16:38.000000000","message":"Sure.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"72976fed82e77d25bd6e52ada6682b3be5b482c4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_16db3fed","line":79,"range":{"start_line":79,"start_character":15,"end_line":79,"end_character":20},"updated":"2016-12-05 14:56:54.000000000","message":"Is it correct to chain here? I\u0027m not sure the relationships should be handled the same as the entities. The relationships might already appear in the graph (e.g. nova host).\nAlexey?","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"8ced4fe4a4a06488e5ca976ee82779c5c2cda889","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_4f7fc365","line":79,"range":{"start_line":79,"start_character":15,"end_line":79,"end_character":20},"in_reply_to":"3a71b18c_16db3fed","updated":"2016-12-06 02:20:10.000000000","message":"See discussion in http://lists.openstack.org/pipermail/openstack-dev/2016-December/thread.html#108276","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"5b5b2fa0164a90a2b38ebb79d1d04faf4f7abbad","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e64eea39","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"updated":"2016-12-06 10:24:55.000000000","message":"Hi Yujun,\nDo you use this method somewhere?\nI don\u0027t quite understand what it is for?","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"4ac58cd72da1005761bff52264030a5c39f08760","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_6ca478b9","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"in_reply_to":"3a71b18c_8931c65c","updated":"2016-12-06 12:13:14.000000000","message":"I see, this aligns with the fact that DriverBase.get_all always return entities. I\u0027ll update the patch.","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"7af557f0aed83ced353905dc92618a834e4d9496","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_8931c65c","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"in_reply_to":"3a71b18c_b6e7bdaa","updated":"2016-12-06 11:56:31.000000000","message":"The new yaml format of static is ok, but still we want each event to arrive to the transformer with the data of it\u0027s entity and its neighbors.\nThink of what you will send to the transformer in the get_changes?\nYou won\u0027t send the data of all the entities and the relationships but only the data of the specific entity and it\u0027s relationships.\nThus we want the event that will be send to the transformer to include the data of the entity itself and its neighbors.\nWhat you can do here is to send tupples of each entity data and its relationships","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"00860c338e8e0ac90ef4f89ac574705173ddf804","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f62935e7","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"in_reply_to":"3a71b18c_c6ad6e9c","updated":"2016-12-06 11:30:18.000000000","message":"I see.\nThis is not the correct way to send the events to the processor.\nYou need the events to include the data of the entity and the data of its neighbors. meaning you need for each event to find the neighbors and add them to the event.","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"2b7730dc1b71787172ef3b637f6d8e5e67ea2a37","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_c6ad6e9c","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"in_reply_to":"3a71b18c_e64eea39","updated":"2016-12-06 10:28:20.000000000","message":"In L62, it is used for loading entity from ONE file while _get_all_entities iterate over all files.","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"6c7d6b9ab648b000c013513a34e69032501ba33e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \"\"\"TODO(yujunz): update from file change or CRUD\"\"\""},{"line_number":67,"context_line":"        return []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @classmethod"},{"line_number":70,"context_line":"    def _get_entities_from_file(cls, path):"},{"line_number":71,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not cls.is_valid_config(config):"},{"line_number":74,"context_line":"            LOG.warning(\"Skipped invalid config (possible obsoleted): {}\""},{"line_number":75,"context_line":"                        .format(path))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        definitions \u003d config[TemplateFields.DEFINITIONS]"},{"line_number":79,"context_line":"        return chain(definitions[TemplateFields.ENTITIES],"},{"line_number":80,"context_line":"                     # emit relationship as entity update"},{"line_number":81,"context_line":"                     definitions[TemplateFields.RELATIONSHIPS])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b6e7bdaa","line":81,"range":{"start_line":69,"start_character":0,"end_line":81,"end_character":63},"in_reply_to":"3a71b18c_f62935e7","updated":"2016-12-06 11:34:30.000000000","message":"`static` emits entities before relationships, which means at first step we emit entity without any neighbour, secondly an update of the entity with its neighbours.\n\nThis avoids nesting the relationship in entity definition which might sometime causes circle reference. And it is more consistent with scenario template.","commit_id":"d382ec26aefc3a41fcda637199e508414232912b"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"eacb564d6ff765564adf3541a4446c722bc25413","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        entities \u003d definitions[TemplateFields.ENTITIES]"},{"line_number":83,"context_line":"        relationships \u003d definitions[TemplateFields.RELATIONSHIPS]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        return chain(entities, relationships)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_8e5eef10","line":85,"range":{"start_line":85,"start_character":15,"end_line":85,"end_character":45},"updated":"2016-12-07 13:59:00.000000000","message":"please update this as we said","commit_id":"9b830bba00fa214e6f8b0a381fea403876a1dc3f"}],"vitrage/datasources/static_physical/driver.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6cf412fed3d7f84f1990e9b4b3213585b6c8af1d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        static_entities \u003d []"},{"line_number":72,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if StaticDriver.DEFINITIONS_SECTION in config:"},{"line_number":75,"context_line":"            LOG.warning(\"Skipped new config: {}\".format(file_))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        for entity in config[self.ENTITIES_SECTION]:"},{"line_number":79,"context_line":"            static_entities.append(entity.copy())"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_a9e55ba9","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":21},"updated":"2016-12-01 13:16:46.000000000","message":"What if both static and static_physical are configured in vitrage.conf?\nYou will get warnings about all files... \nI think you should add \"skipped by the obsolete static_physical datasource\".\nAlso, please make sure the same file is not read twice by the old and new datasources.","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"abfd796152508e17f315d777d86fbedb3768cac5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        static_entities \u003d []"},{"line_number":72,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if StaticDriver.DEFINITIONS_SECTION in config:"},{"line_number":75,"context_line":"            LOG.warning(\"Skipped new config: {}\".format(file_))"},{"line_number":76,"context_line":"            return []"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        for entity in config[self.ENTITIES_SECTION]:"},{"line_number":79,"context_line":"            static_entities.append(entity.copy())"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_afbe3bfd","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":21},"in_reply_to":"3a71b18c_a9e55ba9","updated":"2016-12-01 14:05:14.000000000","message":"Done","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6cf412fed3d7f84f1990e9b4b3213585b6c8af1d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                \u0027/\u0027 + file_"},{"line_number":94,"context_line":"            config \u003d file_utils.load_yaml_file(full_path)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            if StaticDriver.DEFINITIONS_SECTION in config:"},{"line_number":97,"context_line":"                LOG.warning(\"Skipped new config: {}\".format(file_))"},{"line_number":98,"context_line":"                return []"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_a9939bf9","line":96,"range":{"start_line":96,"start_character":15,"end_line":96,"end_character":57},"updated":"2016-12-01 13:16:46.000000000","message":"I would create a function for that, is_new_config()","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"abfd796152508e17f315d777d86fbedb3768cac5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                \u0027/\u0027 + file_"},{"line_number":94,"context_line":"            config \u003d file_utils.load_yaml_file(full_path)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            if StaticDriver.DEFINITIONS_SECTION in config:"},{"line_number":97,"context_line":"                LOG.warning(\"Skipped new config: {}\".format(file_))"},{"line_number":98,"context_line":"                return []"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_2fca2ba2","line":96,"range":{"start_line":96,"start_character":15,"end_line":96,"end_character":57},"in_reply_to":"3a71b18c_a9939bf9","updated":"2016-12-01 14:05:14.000000000","message":"Done","commit_id":"0a94c7b573f8fcf557992cfdb70c3a53dfb572db"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"72976fed82e77d25bd6e52ada6682b3be5b482c4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if StaticDriver.is_valid_config(config):"},{"line_number":75,"context_line":"            LOG.warning(\"Skipped config of new static datasource: {}\""},{"line_number":76,"context_line":"                        .format(file_))"},{"line_number":77,"context_line":"            return []"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        for entity in config[self.ENTITIES_SECTION]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_3692fbf6","line":76,"range":{"start_line":75,"start_character":12,"end_line":76,"end_character":39},"updated":"2016-12-05 14:56:54.000000000","message":"I\u0027m not sure what should be the message here. This behavior is correct (skipping the new files by the old datasource), so is it really a warning? if you see a warning in the log file, you\u0027ll think something is wrong","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"a2af5809cd754518cce4ddc02a3b6fdb4e55218a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if StaticDriver.is_valid_config(config):"},{"line_number":75,"context_line":"            LOG.warning(\"Skipped config of new static datasource: {}\""},{"line_number":76,"context_line":"                        .format(file_))"},{"line_number":77,"context_line":"            return []"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        for entity in config[self.ENTITIES_SECTION]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_f496a2ee","line":76,"range":{"start_line":75,"start_character":12,"end_line":76,"end_character":39},"in_reply_to":"3a71b18c_3692fbf6","updated":"2016-12-06 02:16:38.000000000","message":"Yes, I consider it as a warning since normally you should NOT mix the usage of legacy and new config. But it can be handled by vitrage, so warning only, not an error.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"9e5c185624ba8a1bb82cadb1c63ace993e83ed4a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        config \u003d file_utils.load_yaml_file(path)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if StaticDriver.is_valid_config(config):"},{"line_number":75,"context_line":"            LOG.warning(\"Skipped config of new static datasource: {}\""},{"line_number":76,"context_line":"                        .format(file_))"},{"line_number":77,"context_line":"            return []"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        for entity in config[self.ENTITIES_SECTION]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_9bd02fcb","line":76,"range":{"start_line":75,"start_character":12,"end_line":76,"end_character":39},"in_reply_to":"3a71b18c_f496a2ee","updated":"2016-12-06 10:21:17.000000000","message":"ok","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"72976fed82e77d25bd6e52ada6682b3be5b482c4","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            config \u003d file_utils.load_yaml_file(full_path)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            if StaticDriver.is_valid_config(config):"},{"line_number":98,"context_line":"                LOG.warning(\"Skipped config of new static datasource: {}\""},{"line_number":99,"context_line":"                            .format(file_))"},{"line_number":100,"context_line":"                return []"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            if config:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_d6b9c77a","line":99,"range":{"start_line":98,"start_character":16,"end_line":99,"end_character":43},"updated":"2016-12-05 14:56:54.000000000","message":"Same comment","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"}],"vitrage/tests/resources/static_datasources/switch_to_host.yaml":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"72976fed82e77d25bd6e52ada6682b3be5b482c4","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_31e68544","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"updated":"2016-12-05 14:56:54.000000000","message":"Ok, I got a little confused here. Few comments:\n\n1. In the old static physical, the hosts were not supposed to be part of the yaml file. It was assumed that they came from Nova datasource. Here, you write the hosts for the sake of the relationships. But then, there is a different behavior for the switches and for the hosts - switches are added to the graph, but hosts are not. Maybe this is ok, maybe it was mentioned in the blueprint, but I somehow missed it and now it looks weird. \n\nMaybe we should add a flag like \"is_new_entity\" or \"should_create\", to mark the new entities differently.\n\n2. Another issue is the id. template_id is used for internal references inside the yaml file. What is the id here? the host id, or the id-in-file? I think we might need both.\n\n3. I would add to the test a new type of entity, that was not supported by the old static physical datasource. Something like MyType or whatever creative name you have :-)","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"6b3930ae905bed09d627417d6a97197ef720a6dd","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_d28fda72","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_18941a41","updated":"2016-12-06 15:19:15.000000000","message":"I kind of understand your concerns now. So it is possible that we create `nova.host`  resource statically from configuration file. `nova.host` is not the only datasource, right? This was one of my misunderstandings.\n\nIn this case, I think we can consider to introduce another collection, e.g. `external_entities` in addition to `entities` and `relationships`\n\nFor your another question, I think we\u0027d better FORBID adding properties on EXTERNAL entities since they are not created by `static` resource.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"a2af5809cd754518cce4ddc02a3b6fdb4e55218a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_ef008f03","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_31e68544","updated":"2016-12-06 02:16:38.000000000","message":"1. they are still coming from nova.host because type\u003dnova.host. That\u0027s why I changed the type\u003dswitch to device\u003dswitch. `type` is reserved for datasource type. I suppose we shall call placeholder constructor from nova.host to create it.\n2. this is an issue, should be `id-in-file` or `ref_id` instead. And I agree we need both\n3. will do","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"64a30e03974a8e6ceb5b4758a2e463c721972609","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_dd6ff4f9","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_a6b5d27e","updated":"2016-12-06 13:49:41.000000000","message":"I see where you are going with this Yujun. \nWe should discuss maybe to rename it to something else, but this is a big deal.\nI think that at the moment we should stay with the same name for the static entities and the the non static entities.\nI see what you are saying about the circular dependencies, and that events of the same relation will occur twice from the source to the target and vice versa.\nBut the beauty about this new representation is its power and flexability.\nI think that all of the types has to be \"type\" and in this way we will go in loop on all of the entities, for each entity we will find its relationships, and for each relationship we will its neighbors back in the entities.\nThis implementation gives us as user of the static datasource a lot of flexability and its great.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"673da3617f7170e605d0b76ecabce884d95890b0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_18941a41","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_a6b5d27e","updated":"2016-12-06 13:52:39.000000000","message":"The type is the resource type, and it should be either \u0027nova.host\u0027 or \u0027switch\u0027. In addition, for templates we have \u0027category\u0027 that is \u0027resource\u0027 or \u0027alarm\u0027.\n\nI think what you are looking for is a way of marking the entities that should be added by the static datasource, while you assume the rest of the entities already exist in the graph. If this is the case, I would mark them as \u0027static_entity\u003dTrue\u0027 or \u0027should_be_created\u003dTrue\u0027. But I\u0027m not sure this is needed either. How about you just try to add all entities and relationships to the graph, and if some already exist then ignore the change?\n\nAnother question: suppose the nova.host is already in the graph, but in the yaml file it has an additional property that is not in the graph. Should we add this property? probably yes.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"21e74a03812f8034db9d2ff6f6de866c7ef0e083","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_a6b5d27e","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_bb6fabfa","updated":"2016-12-06 10:35:23.000000000","message":"In my understanding, the `type` field is referring to datasource type. Though it is usually the same as datasource name. But for datasource emitting multiple type of entities such as `static`, It could be confusing.\n\nSo For all entities in static, the implicit type is `static`, which is the same level as `nova.host`.\n\nI wanted to propose to change `type` to `datasource`, but that will not be a tiny change. `device` is a compromise for backward compatibility.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"9e5c185624ba8a1bb82cadb1c63ace993e83ed4a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      name: switch-3"},{"line_number":16,"context_line":"      id: 34567"},{"line_number":17,"context_line":"      state: available"},{"line_number":18,"context_line":"    - type: nova.host"},{"line_number":19,"context_line":"      name: host-1"},{"line_number":20,"context_line":"      id: 1"},{"line_number":21,"context_line":"    - type: nova.host"},{"line_number":22,"context_line":"      name: host-2"},{"line_number":23,"context_line":"      id: 2"},{"line_number":24,"context_line":"    - type: nova.host"},{"line_number":25,"context_line":"      name: host-3"},{"line_number":26,"context_line":"      id: 3"},{"line_number":27,"context_line":"    - type: nova.host"},{"line_number":28,"context_line":"      name: host-4"},{"line_number":29,"context_line":"      id: 4"},{"line_number":30,"context_line":"  relationships:"},{"line_number":31,"context_line":"    - source: 12345"},{"line_number":32,"context_line":"      target: 1"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3a71b18c_bb6fabfa","line":29,"range":{"start_line":18,"start_character":0,"end_line":29,"end_character":11},"in_reply_to":"3a71b18c_ef008f03","updated":"2016-12-06 10:21:17.000000000","message":"1. I didn\u0027t notice that you changed \u0027type\u0027 to \u0027device\u0027. Why is it exactly? why not say that the entity type is a switch? even if there is no such datasource. In any case, I think \u0027device\u0027 is too specific, this file could also represent an application or anything else.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"}],"vitrage/tests/unit/datasources/static/test_static_driver.py":[{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"608299626ded9189521577d7e4ceb50228589d75","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.assertEqual(0, len(static_entities))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # noinspection PyAttributeOutsideInit"},{"line_number":79,"context_line":"    def test_get_changes(self):"},{"line_number":80,"context_line":"        # Setup"},{"line_number":81,"context_line":"        entities \u003d self.static_driver.get_all(DatasourceAction.UPDATE)"},{"line_number":82,"context_line":"        self.assertEqual(0, len(entities))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_4bce062f","side":"PARENT","line":79,"updated":"2016-12-05 07:13:57.000000000","message":"why did you remove the get_changes test?","commit_id":"a801b0072edb49893c1c9a18283d74ba66dc70db"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"cde098f7cd54482c007f4c94bc18a946b845dadf","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.assertEqual(0, len(static_entities))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # noinspection PyAttributeOutsideInit"},{"line_number":79,"context_line":"    def test_get_changes(self):"},{"line_number":80,"context_line":"        # Setup"},{"line_number":81,"context_line":"        entities \u003d self.static_driver.get_all(DatasourceAction.UPDATE)"},{"line_number":82,"context_line":"        self.assertEqual(0, len(entities))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_90dbda4e","side":"PARENT","line":79,"in_reply_to":"3a71b18c_4bce062f","updated":"2016-12-05 12:55:20.000000000","message":"Recoverred","commit_id":"a801b0072edb49893c1c9a18283d74ba66dc70db"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"3f4edc3e43be630e5b4cd9fcf8a30ced85abf676","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def test_get_changes(self):"},{"line_number":81,"context_line":"        # Setup"},{"line_number":82,"context_line":"        entities \u003d self.static_driver.get_all(DatasourceAction.UPDATE)"},{"line_number":83,"context_line":"        self.assertEqual(13, len(entities))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        self.conf \u003d cfg.ConfigOpts()"},{"line_number":86,"context_line":"        self.conf.register_opts(self.CHANGES_OPTS,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_e0235da5","line":83,"updated":"2016-12-05 14:01:59.000000000","message":"i dont quite understand why before it was DatasourceAction.UPDATE but the len was 0. What changed?","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"8a2cfae671e58918868bf70f44b683891828374b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def test_get_changes(self):"},{"line_number":81,"context_line":"        # Setup"},{"line_number":82,"context_line":"        entities \u003d self.static_driver.get_all(DatasourceAction.UPDATE)"},{"line_number":83,"context_line":"        self.assertEqual(13, len(entities))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        self.conf \u003d cfg.ConfigOpts()"},{"line_number":86,"context_line":"        self.conf.register_opts(self.CHANGES_OPTS,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a71b18c_36dafb17","line":83,"in_reply_to":"3a71b18c_e0235da5","updated":"2016-12-05 14:41:30.000000000","message":"Before this patch, get_all() was not implemented yet. It always returned an empty list.","commit_id":"a0816add9804d4af78a8b45b60a224bcae04e4a2"}]}
