)]}'
{"nova/scheduler/filters/aggregate_multitenancy_isolation.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3818a7eaee54a48e069313112acbf5ccd2352b12","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def get_reserved_aggregates(self, tenant_id):"},{"line_number":95,"context_line":"        \"\"\"Gets the reserved aggregates for given tenant.\"\"\""},{"line_number":96,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":97,"context_line":"        aggregates \u003d aggregate_obj.AggregateList.get_by_metadata_key("},{"line_number":98,"context_line":"            admin_context, \u0027filter_tenant_id\u0027)"},{"line_number":99,"context_line":"        reserved_aggregates \u003d filter(lambda aggregate: tenant_id in"},{"line_number":100,"context_line":"                                     aggregate.metadata[\u0027filter_tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_4a451db1","line":97,"updated":"2015-06-30 15:01:59.000000000","message":"please don\u0027t call directly the Aggregate object\n\nInstead, you should rather call the correct utils helper method for it which verifies HostState instead.","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"f57d5ff61975df8be46e27b8cbc79fdf25c49f7e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def get_reserved_aggregates(self, tenant_id):"},{"line_number":95,"context_line":"        \"\"\"Gets the reserved aggregates for given tenant.\"\"\""},{"line_number":96,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":97,"context_line":"        aggregates \u003d aggregate_obj.AggregateList.get_by_metadata_key("},{"line_number":98,"context_line":"            admin_context, \u0027filter_tenant_id\u0027)"},{"line_number":99,"context_line":"        reserved_aggregates \u003d filter(lambda aggregate: tenant_id in"},{"line_number":100,"context_line":"                                     aggregate.metadata[\u0027filter_tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_d3a2444b","line":97,"in_reply_to":"ba3cc151_4a451db1","updated":"2015-06-30 15:45:15.000000000","message":"But why is HostState verfication needed? I just want to get all tenants which belong to the tenant given in filter_properties.","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7239931494fade7f19ecdf31daae6b7234d02392","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def get_reserved_aggregates(self, tenant_id):"},{"line_number":95,"context_line":"        \"\"\"Gets the reserved aggregates for given tenant.\"\"\""},{"line_number":96,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":97,"context_line":"        aggregates \u003d aggregate_obj.AggregateList.get_by_metadata_key("},{"line_number":98,"context_line":"            admin_context, \u0027filter_tenant_id\u0027)"},{"line_number":99,"context_line":"        reserved_aggregates \u003d filter(lambda aggregate: tenant_id in"},{"line_number":100,"context_line":"                                     aggregate.metadata[\u0027filter_tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_de79ebfd","line":97,"in_reply_to":"ba3cc151_d3a2444b","updated":"2015-06-30 16:00:00.000000000","message":"Because of http://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/isolate-scheduler-db-aggregates.html which changes how the filters work. Now, we want to prevent any direct call to any other objects but the ones provided by the Scheduler.","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3818a7eaee54a48e069313112acbf5ccd2352b12","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return reserved_aggregates"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def initialize(self, filter_properties):"},{"line_number":106,"context_line":"        \"\"\"Initializes filter by storing information about aggregates"},{"line_number":107,"context_line":"        dedicated to tenant."},{"line_number":108,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_0a1635a7","line":105,"updated":"2015-06-30 15:01:59.000000000","message":"since the filters are run once per request, I don\u0027t really see a need for initializing something","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"a7c61276fee462d2f11ab37136cd17aac5ea3ebe","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return reserved_aggregates"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def initialize(self, filter_properties):"},{"line_number":106,"context_line":"        \"\"\"Initializes filter by storing information about aggregates"},{"line_number":107,"context_line":"        dedicated to tenant."},{"line_number":108,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_0dbe4fd4","line":105,"in_reply_to":"ba3cc151_0a1635a7","updated":"2015-06-30 15:10:49.000000000","message":"I caled this method \"initialize\" to not confuse people with putting the following code in \"filter_all\" method.\n\nAnd I do all this stuf on the \"filter_all\" call, because every other method which is usually overriden in filters, is called in some forloop inside BaseHostFilter.\n\nWhere do you suggest to make a DB query?","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7239931494fade7f19ecdf31daae6b7234d02392","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return reserved_aggregates"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def initialize(self, filter_properties):"},{"line_number":106,"context_line":"        \"\"\"Initializes filter by storing information about aggregates"},{"line_number":107,"context_line":"        dedicated to tenant."},{"line_number":108,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_5e5f1b41","line":105,"in_reply_to":"ba3cc151_0dbe4fd4","updated":"2015-06-30 16:00:00.000000000","message":"You misunderstood me. What I dislike is having something run and checked before the filter goes to the host. That\u0027s racy.","commit_id":"c6862c1f63d43ac06c970503b6e619f6652e20d7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"190a5f81213030807b854394e97502d656bc9bd1","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        \"\"\"If a host is in an aggregate that has the metadata key"},{"line_number":33,"context_line":"        \"filter_tenant_id\" it can only create instances from that tenant(s)."},{"line_number":34,"context_line":"        A host can be in different aggregates."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        If a host doesn\u0027t belong to an aggregate with the metadata key"},{"line_number":37,"context_line":"        \"filter_tenant_id\" it can create instances from all tenants."},{"line_number":38,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_73b59fce","line":35,"updated":"2015-07-17 09:33:14.000000000","message":"docstring needs to be amended explaining the new metadata key","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a2e75f3a666893b3fea3c5066652460f45bd0915","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        A host can be in different aggregates."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        If a host doesn\u0027t belong to an aggregate with the metadata key"},{"line_number":37,"context_line":"        \"filter_tenant_id\" it can create instances from all tenants."},{"line_number":38,"context_line":"        \"\"\""},{"line_number":39,"context_line":"        spec \u003d filter_properties.get(\u0027request_spec\u0027, {})"},{"line_number":40,"context_line":"        props \u003d spec.get(\u0027instance_properties\u0027, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_53d5fbb6","line":37,"updated":"2015-07-17 09:34:01.000000000","message":"That reminds me you have to also amend the devref section http://docs.openstack.org/developer/nova/devref/filter_scheduler.html","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"190a5f81213030807b854394e97502d656bc9bd1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        props \u003d spec.get(\u0027instance_properties\u0027, {})"},{"line_number":41,"context_line":"        tenant_id \u003d props.get(\u0027project_id\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        metadata_keys \u003d \"filter_tenant_id\", \"exclusive_tenant_id\""},{"line_number":44,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state,"},{"line_number":45,"context_line":"                                                        keys\u003dmetadata_keys)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_73dcbf18","line":43,"updated":"2015-07-17 09:33:14.000000000","message":"so you prefer to use a separate metadata key for defining whether the tenant can be shared or not.\nFrom my perspective, I\u0027m not sure it\u0027s worth it, and at least, it misses some docstring above.\n\nAre we sure we want to have 2 keys for describing that ? I thought a config option (exclusive\u003dTrue/False) was the consensus ?","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b1b7b58907b9c31a0e15a71a6185440fa6704481","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        props \u003d spec.get(\u0027instance_properties\u0027, {})"},{"line_number":41,"context_line":"        tenant_id \u003d props.get(\u0027project_id\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        metadata_keys \u003d \"filter_tenant_id\", \"exclusive_tenant_id\""},{"line_number":44,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state,"},{"line_number":45,"context_line":"                                                        keys\u003dmetadata_keys)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_4eba3270","line":43,"in_reply_to":"9a41bdd9_6efe1607","updated":"2015-07-17 09:57:05.000000000","message":"Nah, fair point (missed the earlier convo) but then you need to be very explicit by adding the docstring above and by amending the devref section.","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"ed7a021a9ab32eb8667fa8330998741f4403590d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        props \u003d spec.get(\u0027instance_properties\u0027, {})"},{"line_number":41,"context_line":"        tenant_id \u003d props.get(\u0027project_id\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        metadata_keys \u003d \"filter_tenant_id\", \"exclusive_tenant_id\""},{"line_number":44,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state,"},{"line_number":45,"context_line":"                                                        keys\u003dmetadata_keys)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_6efe1607","line":43,"in_reply_to":"9a41bdd9_73dcbf18","updated":"2015-07-17 09:49:18.000000000","message":"Jay\u0027s arguments about having separate metadata key made sense for me. Allowing both exclusive and non-exclusive behavior for different tenants brings more flexibility and seems to easier to implement.\n\nBut if you disagree, you think that we should have some wider discussion about it?","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3744938c5aed03859ae098e0dac51608c65f7e5b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                return False"},{"line_number":60,"context_line":"        elif host_state.aggregates_by_tenant \u003e 0:"},{"line_number":61,"context_line":"            # Tenant from request has its exclusive aggregates pool which the"},{"line_number":62,"context_line":"            # current host does not belong to"},{"line_number":63,"context_line":"            return False"},{"line_number":64,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_f90450c7","line":62,"updated":"2015-07-19 14:59:25.000000000","message":"please add a LOG.debug here so we can be able to understand why the filter failed","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"aa4ac84c171af38206d0ec815b3e9b7db545c0a3","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                return False"},{"line_number":60,"context_line":"        elif host_state.aggregates_by_tenant \u003e 0:"},{"line_number":61,"context_line":"            # Tenant from request has its exclusive aggregates pool which the"},{"line_number":62,"context_line":"            # current host does not belong to"},{"line_number":63,"context_line":"            return False"},{"line_number":64,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3ac01f2a","line":62,"in_reply_to":"3a50d1a3_f90450c7","updated":"2015-07-21 08:47:25.000000000","message":"Done","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"190a5f81213030807b854394e97502d656bc9bd1","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            host_state.aggregates_by_tenant \u003d [self.aggs_by_id[agg_id]"},{"line_number":579,"context_line":"                                               for agg_id in"},{"line_number":580,"context_line":"                                               self.aggs_by_tenant["},{"line_number":581,"context_line":"                                                   context.project_id]]"},{"line_number":582,"context_line":"            host_state.update_service(dict(service))"},{"line_number":583,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":584,"context_line":"            seen_nodes.add(state_key)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_535e5b77","line":581,"updated":"2015-07-17 09:33:14.000000000","message":"I don\u0027t see where the new host_state.aggregates_by_tenant is called ?\n\nAlso, since we keep the metadata information in HostState.aggregates, I don\u0027t really see much benefit of adding more memory footprint while we can easily get that info at the call time.","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"ed7a021a9ab32eb8667fa8330998741f4403590d","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            host_state.aggregates_by_tenant \u003d [self.aggs_by_id[agg_id]"},{"line_number":579,"context_line":"                                               for agg_id in"},{"line_number":580,"context_line":"                                               self.aggs_by_tenant["},{"line_number":581,"context_line":"                                                   context.project_id]]"},{"line_number":582,"context_line":"            host_state.update_service(dict(service))"},{"line_number":583,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":584,"context_line":"            seen_nodes.add(state_key)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_ce1642f1","line":581,"in_reply_to":"9a41bdd9_535e5b77","updated":"2015-07-17 09:49:18.000000000","message":"host_state.aggregated_by_tenant is called here\nhttps://review.openstack.org/#/c/195783/6/nova/scheduler/filters/aggregate_multitenancy_isolation.py\nat 55 line\n\nMaybe it\u0027s more visible at Github. ;)\nhttps://github.com/nihilifer/nova/commit/0eb7515e2e7dd859558262a23d12348b00a6d87a#diff-17d290f0727b5a6f29d409622e242c51R55\n\nHostState.aggregates contains only aggregates to which the current host belongs. In aggregates_by_tenant I want to have all aggregates belonging to tenant, regardless of the currently processed host.\n\nThis is needed, because we want to know whether tenant has any exlusive-filtered aggregate. :)","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"86a753decc593aa6c41b988aa101173158a65d46","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            host_state.aggregates_by_tenant \u003d [self.aggs_by_id[agg_id]"},{"line_number":579,"context_line":"                                               for agg_id in"},{"line_number":580,"context_line":"                                               self.aggs_by_tenant["},{"line_number":581,"context_line":"                                                   context.project_id]]"},{"line_number":582,"context_line":"            host_state.update_service(dict(service))"},{"line_number":583,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":584,"context_line":"            seen_nodes.add(state_key)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_f64e7895","line":581,"in_reply_to":"9a41bdd9_aee41eac","updated":"2015-07-17 11:49:09.000000000","message":"I\u0027m sorry, I don\u0027t understand clearly what you\u0027re proposing here.\n\nBut I have another idea. In filter I\u0027m checking only count of reserved aggregates, so I can just store the count of aggregates per tenant in HostManager.aggs_by_tenant and store the number in HostState.aggregates_by_tenant.\n\nThat will also save a lot of memory.\n\nI will upload the change soon.","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b1b7b58907b9c31a0e15a71a6185440fa6704481","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            host_state.aggregates_by_tenant \u003d [self.aggs_by_id[agg_id]"},{"line_number":579,"context_line":"                                               for agg_id in"},{"line_number":580,"context_line":"                                               self.aggs_by_tenant["},{"line_number":581,"context_line":"                                                   context.project_id]]"},{"line_number":582,"context_line":"            host_state.update_service(dict(service))"},{"line_number":583,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":584,"context_line":"            seen_nodes.add(state_key)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_aee41eac","line":581,"in_reply_to":"9a41bdd9_ce1642f1","updated":"2015-07-17 09:57:05.000000000","message":"Okay, I was blind :-) I looked like 5 mins before commenting that one, but I wasn\u0027t finding where you were using it.\n\nI certainly understand *why* you\u0027re adding such attribute, I just think it can be queried without adding this attribute.\n\nHost_state.aggregate is a list of references mapped in HostManager.aggs_by_id containing the whole Aggregate information.\n\nFiltering out per tenant means you\u0027re duplicating that information in memory.","commit_id":"0eb7515e2e7dd859558262a23d12348b00a6d87a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3744938c5aed03859ae098e0dac51608c65f7e5b","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.host_aggregates_map[host].add(agg.id)"},{"line_number":356,"context_line":"            if hasattr(agg, \u0027metadata\u0027):"},{"line_number":357,"context_line":"                exclusive_tenant_ids \u003d agg.metadata.get(\u0027exclusive_tenant_id\u0027,"},{"line_number":358,"context_line":"                                                        None)"},{"line_number":359,"context_line":"                if exclusive_tenant_ids is not None:"},{"line_number":360,"context_line":"                    for tenant_id in exclusive_tenant_ids.split(\u0027,\u0027):"},{"line_number":361,"context_line":"                        self.aggs_by_tenant[tenant_id] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_b90ec8e3","line":358,"updated":"2015-07-19 14:59:25.000000000","message":"by default get returns None. You do not to explicitly do that","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"aa4ac84c171af38206d0ec815b3e9b7db545c0a3","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.host_aggregates_map[host].add(agg.id)"},{"line_number":356,"context_line":"            if hasattr(agg, \u0027metadata\u0027):"},{"line_number":357,"context_line":"                exclusive_tenant_ids \u003d agg.metadata.get(\u0027exclusive_tenant_id\u0027,"},{"line_number":358,"context_line":"                                                        None)"},{"line_number":359,"context_line":"                if exclusive_tenant_ids is not None:"},{"line_number":360,"context_line":"                    for tenant_id in exclusive_tenant_ids.split(\u0027,\u0027):"},{"line_number":361,"context_line":"                        self.aggs_by_tenant[tenant_id] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_fae077ce","line":358,"in_reply_to":"3a50d1a3_b90ec8e3","updated":"2015-07-21 08:47:25.000000000","message":"Done","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"}],"nova/tests/unit/scheduler/filters/test_utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3744938c5aed03859ae098e0dac51608c65f7e5b","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state,"},{"line_number":108,"context_line":"                                                        keys\u003d(\u0027k3\u0027, \u0027k4\u0027,))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.assertEqual({}, metadata)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_validate_num_values(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_390398ba","line":109,"updated":"2015-07-19 14:59:25.000000000","message":"are there cases when keys and key is set? Can you please add a unit test for that if so","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"aa4ac84c171af38206d0ec815b3e9b7db545c0a3","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state,"},{"line_number":108,"context_line":"                                                        keys\u003d(\u0027k3\u0027, \u0027k4\u0027,))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.assertEqual({}, metadata)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_validate_num_values(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_da049b7f","line":109,"in_reply_to":"3a50d1a3_390398ba","updated":"2015-07-21 08:47:25.000000000","message":"Nice catch. In the newest patchset an exception is raised when both \"key\" and \"keys\" are set. And I added a test for it also.","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"}],"nova/tests/unit/scheduler/test_ironic_host_manager.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3744938c5aed03859ae098e0dac51608c65f7e5b","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_get_all_host_states(self):"},{"line_number":69,"context_line":"        # Ensure .service is set and we have the values we expect to."},{"line_number":70,"context_line":"        ctx \u003d context.RequestContext()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.mox.StubOutWithMock(objects.ServiceList, \u0027get_by_binary\u0027)"},{"line_number":73,"context_line":"        self.mox.StubOutWithMock(objects.ComputeNodeList, \u0027get_all\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_1931fca2","line":70,"updated":"2015-07-19 14:59:25.000000000","message":"are all of the context changes related?\nwhy not do this once at the setUp?","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"a038759baccd9b027f7ce212e313347ec30b1868","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_get_all_host_states(self):"},{"line_number":69,"context_line":"        # Ensure .service is set and we have the values we expect to."},{"line_number":70,"context_line":"        ctx \u003d context.RequestContext()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.mox.StubOutWithMock(objects.ServiceList, \u0027get_by_binary\u0027)"},{"line_number":73,"context_line":"        self.mox.StubOutWithMock(objects.ComputeNodeList, \u0027get_all\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3a885422","line":70,"in_reply_to":"3a50d1a3_1931fca2","updated":"2015-07-20 11:33:34.000000000","message":"All fake contexts were initialized in separate tests. But yeah, moving this to setUp is a good idea.","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"aa4ac84c171af38206d0ec815b3e9b7db545c0a3","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_get_all_host_states(self):"},{"line_number":69,"context_line":"        # Ensure .service is set and we have the values we expect to."},{"line_number":70,"context_line":"        ctx \u003d context.RequestContext()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.mox.StubOutWithMock(objects.ServiceList, \u0027get_by_binary\u0027)"},{"line_number":73,"context_line":"        self.mox.StubOutWithMock(objects.ComputeNodeList, \u0027get_all\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_7af46786","line":70,"in_reply_to":"3a50d1a3_3a885422","updated":"2015-07-21 08:47:25.000000000","message":"Done","commit_id":"3e20b5c31f94a22a4f44ff991b1dd76491337c59"}]}
