)]}'
{"nova/scheduler/filters/reserved_aggregate.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a90d3b9fcd7522dcd5cfc928c63e209c0e6715bd","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state)"},{"line_number":43,"context_line":"        if metadata:"},{"line_number":44,"context_line":"            for attr in metadata:"},{"line_number":45,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":46,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_4172ece6","line":44,"updated":"2015-04-30 09:42:30.000000000","message":"nit: This\u0027d be more explicit as metadata.keys()","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"40f8ddd6605c3df0918d890f0506f347f7997a62","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        metadata \u003d utils.aggregate_metadata_get_by_host(host_state)"},{"line_number":43,"context_line":"        if metadata:"},{"line_number":44,"context_line":"            for attr in metadata:"},{"line_number":45,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":46,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_8e2b88eb","line":44,"in_reply_to":"3acd31a7_4172ece6","updated":"2015-04-30 14:05:04.000000000","message":"Done","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a90d3b9fcd7522dcd5cfc928c63e209c0e6715bd","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        if metadata:"},{"line_number":44,"context_line":"            for attr in metadata:"},{"line_number":45,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":46,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":48,"context_line":"            return tenant_id in tenants"},{"line_number":49,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a1bc206d","line":46,"updated":"2015-04-30 09:42:30.000000000","message":"this should be extend","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"40f8ddd6605c3df0918d890f0506f347f7997a62","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        if metadata:"},{"line_number":44,"context_line":"            for attr in metadata:"},{"line_number":45,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":46,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":48,"context_line":"            return tenant_id in tenants"},{"line_number":49,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_2425b3aa","line":46,"in_reply_to":"3acd31a7_a1bc206d","updated":"2015-04-30 14:05:04.000000000","message":"Turns out I gave you wrong information. the value returned by metadata[attr] is a string not a list so append is correct here. I\u0027ve updated the class description to better reflect how this works.","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a90d3b9fcd7522dcd5cfc928c63e209c0e6715bd","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":48,"context_line":"            return tenant_id in tenants"},{"line_number":49,"context_line":"        else:"},{"line_number":50,"context_line":"            return tenants \u003d\u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_2cb00743","line":50,"updated":"2015-04-30 09:42:30.000000000","message":"nit: this is probably special cased, but I\u0027d mildly prefer: len(tenants) \u003d\u003d 0","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"40f8ddd6605c3df0918d890f0506f347f7997a62","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":48,"context_line":"            return tenant_id in tenants"},{"line_number":49,"context_line":"        else:"},{"line_number":50,"context_line":"            return tenants \u003d\u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_4e357044","line":50,"in_reply_to":"3acd31a7_2cb00743","updated":"2015-04-30 14:05:04.000000000","message":"Done","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e081ac009cb8d1ce60e2eb416fe1edb42ba14f8c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    An aggregate can be reserved for use by a tenant or tenants. Each tenant"},{"line_number":24,"context_line":"    which can use an aggregate should be specified individually in the"},{"line_number":25,"context_line":"    aggregate metadata with a key name beginning with the string"},{"line_number":26,"context_line":"    \u0027reserved_tenant\u0027 which has a value of the tenant ID in question."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A scheduler hint \u0027reserved_pool\u0027 is used to decide if an instance"},{"line_number":29,"context_line":"    should go in the tenant\u0027s reserved aggregate or not. If the hint is"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_8d870b0f","line":26,"updated":"2015-04-30 14:52:30.000000000","message":"to prevent requiring many keys for this, why not make it \"reserved_tenants\" and allow a comma-separated list?","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"53afa0893b66f041328429d3419cd41bf392f83a","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    An aggregate can be reserved for use by a tenant or tenants. Each tenant"},{"line_number":24,"context_line":"    which can use an aggregate should be specified individually in the"},{"line_number":25,"context_line":"    aggregate metadata with a key name beginning with the string"},{"line_number":26,"context_line":"    \u0027reserved_tenant\u0027 which has a value of the tenant ID in question."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A scheduler hint \u0027reserved_pool\u0027 is used to decide if an instance"},{"line_number":29,"context_line":"    should go in the tenant\u0027s reserved aggregate or not. If the hint is"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_be1d4b75","line":26,"in_reply_to":"3acd31a7_50006634","updated":"2015-04-30 15:57:39.000000000","message":"OK let\u0027s see what the community say","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"9f9382d63d90d88447e2be4ae4a2e4ecb751ce76","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    An aggregate can be reserved for use by a tenant or tenants. Each tenant"},{"line_number":24,"context_line":"    which can use an aggregate should be specified individually in the"},{"line_number":25,"context_line":"    aggregate metadata with a key name beginning with the string"},{"line_number":26,"context_line":"    \u0027reserved_tenant\u0027 which has a value of the tenant ID in question."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A scheduler hint \u0027reserved_pool\u0027 is used to decide if an instance"},{"line_number":29,"context_line":"    should go in the tenant\u0027s reserved aggregate or not. If the hint is"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_50006634","line":26,"in_reply_to":"3acd31a7_8d870b0f","updated":"2015-04-30 15:54:12.000000000","message":"It would make it easier to add/remove individual tenants to an aggregate. Rather than having to maintain a long list of IDs you can have meaningfully named keys that each point to an individual tenant ID.","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e081ac009cb8d1ce60e2eb416fe1edb42ba14f8c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            for attr in metadata.keys():"},{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a vlaue of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_2d77d73b","line":51,"updated":"2015-04-30 14:52:30.000000000","message":"nit: value","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"9f9382d63d90d88447e2be4ae4a2e4ecb751ce76","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            for attr in metadata.keys():"},{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a vlaue of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_30fdea3a","line":51,"in_reply_to":"3acd31a7_2d77d73b","updated":"2015-04-30 15:54:12.000000000","message":"Done","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0eef14126d0abb2bc36aac1c9bd0bb4d6c67dc4d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a value of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":55,"context_line":"            return tenant_id in tenants"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_85e5c4a9","line":52,"updated":"2015-05-06 10:48:32.000000000","message":"This will be valid if I have a key that is \u0027reserved_tenant_policy\u0027. This may lead to a false positives with similar attribute keys.\nAny reason why not to do the full string check?","commit_id":"c673a3f91a3c408cd98bd025a64dc73c917fd340"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"b034c4696ea852b2e3e82f35db3d553d25a74b25","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a value of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":55,"context_line":"            return tenant_id in tenants"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_b93fc524","line":52,"in_reply_to":"1aca2d91_85e5c4a9","updated":"2015-05-06 12:15:56.000000000","message":"The thinking was to have each metadata item specify a single tenant. So reserved_tenant_a \u003d \u003ctenant ID X\u003e, reserved_tenant_b \u003d \u003ctenant ID Y\u003e, etc. This would make adding or removing a permitted tenant a bit easier than maintaining one long list of tenant IDs in metadata.","commit_id":"c673a3f91a3c408cd98bd025a64dc73c917fd340"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"942dfce01a91e1f2e46bf7c733fe059bcbb3521b","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a value of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":55,"context_line":"            return tenant_id in tenants"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_f4dc2448","line":52,"in_reply_to":"1aca2d91_b93fc524","updated":"2015-05-06 12:32:53.000000000","message":"If this is the case then can you please add this to the docstring above with maybe an example. Adding the example to the filter_scheduler.rst would also be great.","commit_id":"c673a3f91a3c408cd98bd025a64dc73c917fd340"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"d9da9d16e63fc29cf40df55a9b4c797c44f4d262","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                # For each tenant allowed in an aggregate there"},{"line_number":50,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":51,"context_line":"                # \u0027reserved_tenant\u0027 with a value of a tenant ID"},{"line_number":52,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":53,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":54,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":55,"context_line":"            return tenant_id in tenants"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_2e41280c","line":52,"in_reply_to":"1aca2d91_f4dc2448","updated":"2015-05-06 13:27:37.000000000","message":"Done","commit_id":"c673a3f91a3c408cd98bd025a64dc73c917fd340"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"63096ad80c08dfd0997052f035d98666f4cbb9b4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    simply by adding or removing a single metadata item."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    A scheduler hint \u0027reserved_pool\u0027 is used to decide if an instance"},{"line_number":32,"context_line":"    should go in the tenant\u0027s reserved aggregate or not. If the hint is"},{"line_number":33,"context_line":"    present the tenant\u0027s instance must go in a reserved aggregate. If the hint"},{"line_number":34,"context_line":"    is not present the instances must go somewhere else. Other tenants"},{"line_number":35,"context_line":"    cannot use hosts in a reserved aggregate."}],"source_content_type":"text/x-python","patch_set":6,"id":"5ad58531_e1990e21","line":32,"updated":"2015-05-11 21:20:56.000000000","message":"There are 2 problems here :\n#1 the hints are nor persisted so any migration could break that : an instance booted with reserved_pool as a hint could be migrated to an host which is not dedicated to that tenant.\n\n#2 since aggregates are implicit and not visible for the endusers, it creates a confusion for the user who has zero ways to know if at least one host has been reserved for his tenant.","commit_id":"b5fc773f8706f330c7bd57d590b3594aa0832a4b"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"231474d87a73c69008cf8385ef33c6f8f7f15ca7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    simply by adding or removing a single metadata item."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    A scheduler hint \u0027reserved_pool\u0027 is used to decide if an instance"},{"line_number":32,"context_line":"    should go in the tenant\u0027s reserved aggregate or not. If the hint is"},{"line_number":33,"context_line":"    present the tenant\u0027s instance must go in a reserved aggregate. If the hint"},{"line_number":34,"context_line":"    is not present the instances must go somewhere else. Other tenants"},{"line_number":35,"context_line":"    cannot use hosts in a reserved aggregate."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_3505e079","line":32,"in_reply_to":"5ad58531_e1990e21","updated":"2015-05-13 10:33:06.000000000","message":"These problems may be fixed by enforcing instance\u0027s spawn on reserved pool with config.\n\nSomething like is proposed here (proposition from Juno, re-submitted by myself for L):\nhttps://review.openstack.org/#/c/181054/\n\nI\u0027m not fully against using scheduler hints. I\u0027d propose to have both ways - scheduler hints (which leave the decision to user spawning instance, but on the other hand isn\u0027t preserving the reservation during migration etc.) and config (which will enforce tenant reservation for every tenant having its aggregate pool).\n\nMaybe we should widely discuss ideas about tenant filtering on IRC meeting tomorrow or/and design summit.","commit_id":"b5fc773f8706f330c7bd57d590b3594aa0832a4b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"63096ad80c08dfd0997052f035d98666f4cbb9b4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # should be a metadata key with a name beginning"},{"line_number":54,"context_line":"                # \u0027reserved_tenant\u0027 with a value of a tenant ID"},{"line_number":55,"context_line":"                if attr.startswith(\u0027reserved_tenant\u0027):"},{"line_number":56,"context_line":"                    tenants.append(metadata[attr])"},{"line_number":57,"context_line":"        if \u0027reserved_pool\u0027 in hints:"},{"line_number":58,"context_line":"            return tenant_id in tenants"},{"line_number":59,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ad58531_e14eae95","line":56,"updated":"2015-05-11 21:20:56.000000000","message":"Since the code is very close to AggregateMultiTenancyIsolation I reemphasize my view of just updating the existing filter","commit_id":"b5fc773f8706f330c7bd57d590b3594aa0832a4b"}],"nova/tests/unit/scheduler/filters/test_reserved_aggregate_filters.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a90d3b9fcd7522dcd5cfc928c63e209c0e6715bd","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filt_cls \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":31,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_6c7cbf72","line":28,"updated":"2015-04-30 09:42:30.000000000","message":"nit: is filter_class SO long? I\u0027d prefer simply \u0027filter\u0027 even","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"40f8ddd6605c3df0918d890f0506f347f7997a62","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filt_cls \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":31,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_4eca10a3","line":28,"in_reply_to":"3acd31a7_6c7cbf72","updated":"2015-04-30 14:05:04.000000000","message":"Done","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a90d3b9fcd7522dcd5cfc928c63e209c0e6715bd","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":31,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":32,"context_line":"        filter_properties \u003d {\u0027context\u0027: mock.sentinel.ctx}"},{"line_number":33,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def test_reserved_aggregate_no_hint_and_matching_tenant(self, agg_mock):"},{"line_number":36,"context_line":"        agg_mock.return_value \u003d {\u0027reserved_tenant\u0027: \u0027tenant_1\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_ecbe8ffe","line":33,"updated":"2015-04-30 09:42:30.000000000","message":"a helper method could remove some of the redundancy in these tests, that\u0027d make them easier to read as well","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"40f8ddd6605c3df0918d890f0506f347f7997a62","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":31,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":32,"context_line":"        filter_properties \u003d {\u0027context\u0027: mock.sentinel.ctx}"},{"line_number":33,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def test_reserved_aggregate_no_hint_and_matching_tenant(self, agg_mock):"},{"line_number":36,"context_line":"        agg_mock.return_value \u003d {\u0027reserved_tenant\u0027: \u0027tenant_1\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_0e4c1841","line":33,"in_reply_to":"3acd31a7_ecbe8ffe","updated":"2015-04-30 14:05:04.000000000","message":"I\u0027ve tidied up a bit but I don\u0027t see an obvious use for a helper method","commit_id":"2d1a256a969da0bf45778a120be41731199952e0"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e081ac009cb8d1ce60e2eb416fe1edb42ba14f8c","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filter_class \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":"        self.host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_6dcb8f54","line":28,"updated":"2015-04-30 14:52:30.000000000","message":"sorry to make you change this again, but on closer inspection I see this is an object not a class. Suggest \"filter\", \"filter_obj\" or  \"filter_object\"","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"9f9382d63d90d88447e2be4ae4a2e4ecb751ce76","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filter_class \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":"        self.host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_531e300d","line":28,"in_reply_to":"3acd31a7_6dcb8f54","updated":"2015-04-30 15:54:12.000000000","message":"Changed to filter_obj as filter() is a python built-in.","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e081ac009cb8d1ce60e2eb416fe1edb42ba14f8c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filter_class \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":"        self.host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":32,"context_line":"        filter_properties \u003d {\u0027context\u0027: mock.sentinel.ctx}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_cd098397","line":29,"updated":"2015-04-30 14:52:30.000000000","message":"this is a great cleanup. The filter_properties seem identical between a majority of your tests too?","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"9f9382d63d90d88447e2be4ae4a2e4ecb751ce76","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestReservedAggregateHostFilter, self).setUp()"},{"line_number":28,"context_line":"        self.filter_class \u003d reserved_aggregate.ReservedAggregate()"},{"line_number":29,"context_line":"        self.host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_reserved_aggregate_no_hint_no_tenant(self, agg_mock):"},{"line_number":32,"context_line":"        filter_properties \u003d {\u0027context\u0027: mock.sentinel.ctx}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_3e001b34","line":29,"in_reply_to":"3acd31a7_cd098397","updated":"2015-04-30 15:54:12.000000000","message":"Done","commit_id":"a1e604d11109386e4a199ad3ab2fc2e716c7fe78"}]}
