)]}'
{"nova/objects/image_meta.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dd79143511a270c82071bff197c2725337de8f32","unresolved":false,"context_lines":[{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        return getattr(self, name)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def to_dict(self):"},{"line_number":588,"context_line":"        image_meta_dict \u003d {}"},{"line_number":589,"context_line":"        for key in self.fields:"},{"line_number":590,"context_line":"            value \u003d self.get(key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_f340f937","line":587,"updated":"2016-11-30 15:59:55.000000000","message":"I suppose you could do a dict comprehension here, but this is probably more readable.","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7b659b5cf2dfe36906f45c3d8243d89f7c187970","unresolved":false,"context_lines":[{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        return getattr(self, name)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def to_dict(self):"},{"line_number":588,"context_line":"        image_meta_dict \u003d {}"},{"line_number":589,"context_line":"        for key in self.fields:"},{"line_number":590,"context_line":"            value \u003d self.get(key)"},{"line_number":591,"context_line":"            if value:"},{"line_number":592,"context_line":"                image_meta_dict[key] \u003d value"},{"line_number":593,"context_line":"        return image_meta_dict"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_a4e635e6","line":593,"range":{"start_line":587,"start_character":0,"end_line":593,"end_character":30},"updated":"2016-11-30 16:09:30.000000000","message":"Hmmm... I find this more readable, and it certainly would be faster:\n\n    def to_dict(self):\n        return {key: self.get(key) for key in self.fields\n                if self.get(key)}","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"be86015befa57f81e62bd2cc14dbf3dc8d279af8","unresolved":false,"context_lines":[{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        return getattr(self, name)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def to_dict(self):"},{"line_number":588,"context_line":"        image_meta_dict \u003d {}"},{"line_number":589,"context_line":"        for key in self.fields:"},{"line_number":590,"context_line":"            value \u003d self.get(key)"},{"line_number":591,"context_line":"            if value:"},{"line_number":592,"context_line":"                image_meta_dict[key] \u003d value"},{"line_number":593,"context_line":"        return image_meta_dict"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_e1e2a600","line":593,"range":{"start_line":587,"start_character":0,"end_line":593,"end_character":30},"in_reply_to":"5a74a57a_a4e635e6","updated":"2016-12-09 15:35:02.000000000","message":"ok","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"}],"nova/scheduler/filters/aggregate_image_properties_isolation.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3b3de73cf94ca8078838031d91ad169e835b618","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                       if spec_obj.image else {})"},{"line_number":45,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_9b124161","line":47,"updated":"2016-12-09 15:04:21.000000000","message":"The problem I can see here with looping over the list of image properties instead of aggregate metadata keys is that it would change the behaviour.\nFor example, say that I currently have \n\n- metadata : key1, key2\n- props : key1, key2, key3\n\nThen it won\u0027t verify key3, right? (ie. the filter will return True with a warning about key3)\n\nNow, with your change, key3 will be verified, so given key3 is not provided by the aggregate, then the filter would return False, agreed ?\n\nThat would means that operators would have to modify their aggregates metadata after stopping the Newton scheduler and before upgrading it to Ocata, which sounds very difficult to me.","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1588287e8f0fd227b3c1b31a47661cd38b22445e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                       if spec_obj.image else {})"},{"line_number":45,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_d3b64e3d","line":47,"in_reply_to":"3a71b18c_0156c2d1","updated":"2016-12-09 21:30:41.000000000","message":"In case you wanna find a way to modify the behaviour, you should find a solution for upgrading from Newton to Ocata without needing to modify either metadata or images, and then ask the operator to modify something *after* that.\n\nThat means you would have a backwards compatibility until the operator says \"fine, I\u0027m done\" and then you would stop the compat by the next release.","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"be86015befa57f81e62bd2cc14dbf3dc8d279af8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                       if spec_obj.image else {})"},{"line_number":45,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_0156c2d1","line":47,"in_reply_to":"3a71b18c_9b124161","updated":"2016-12-09 15:35:02.000000000","message":"Yes, in this case I expect False, but currect filter will return True with warning.\n\n\nAgree that this patch changes the behaviour. But I am sure that I change it in correct way (the docs also says that we should check image properties on aggregate metadata).\n\n\nI think we should find the best way to apply this bug fix it and not affect the users. Maybe add some deprecations in Ocata in this filter and fix it in P, or create new filter and deprecate this one and maybe then remove (I don\u0027t like it), etc .....","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3b3de73cf94ca8078838031d91ad169e835b618","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"},{"line_number":51,"context_line":"            aggregate_vals \u003d metadata.get(key, None)"},{"line_number":52,"context_line":"            if not aggregate_vals:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_8620289d","line":49,"updated":"2016-12-09 15:04:21.000000000","message":"Here, you\u0027re also changing where the prefix is checked from previously the aggregate to now the image properties.\n\nSo, in case you would like to use namespaces, then you\u0027d need to modify your image properties, right?","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"be86015befa57f81e62bd2cc14dbf3dc8d279af8","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"},{"line_number":51,"context_line":"            aggregate_vals \u003d metadata.get(key, None)"},{"line_number":52,"context_line":"            if not aggregate_vals:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_a1126e07","line":49,"in_reply_to":"3a71b18c_8620289d","updated":"2016-12-09 15:35:02.000000000","message":"yes to the first part, hmm, not sure to the second part","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1588287e8f0fd227b3c1b31a47661cd38b22445e","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        for key, req in six.iteritems(image_props):"},{"line_number":48,"context_line":"            if (cfg_namespace and"},{"line_number":49,"context_line":"                    not key.startswith(cfg_namespace + cfg_separator)):"},{"line_number":50,"context_line":"                continue"},{"line_number":51,"context_line":"            aggregate_vals \u003d metadata.get(key, None)"},{"line_number":52,"context_line":"            if not aggregate_vals:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_f38a6a63","line":49,"in_reply_to":"3a71b18c_a1126e07","updated":"2016-12-09 21:30:41.000000000","message":"We\u0027re verifying the namespaces for the metadata keys (L48) and now you\u0027d like to verify those namespaces by the image props key.","commit_id":"a989e7bb1d015297a598bba8f23b2740fdeff71a"}]}
