)]}'
{"nova/tests/fixtures.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bc29c91832d37a13128dc64175b0b5182034d84","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"        return {\u0027quota\u0027: {\u0027port\u0027: -1}}"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def validate_auto_allocated_topology_requirements(self, project_id):"},{"line_number":1641,"context_line":"        return False"},{"line_number":1642,"context_line":""},{"line_number":1643,"context_line":"    def get_auto_allocated_topology(self, project_id, **_params):"},{"line_number":1644,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_20c5fa8e","line":1641,"range":{"start_line":1641,"start_character":8,"end_line":1641,"end_character":20},"updated":"2019-10-04 18:20:19.000000000","message":"This should just be a pass. The actual python-neutronclient will raise if validation fails and that\u0027s how the API treats it:\n\nhttps://github.com/openstack/nova/blob/627c461a62ce722a4c95a44b181f40b8db198c2b/nova/network/neutronv2/api.py#L2078\n\nI\u0027m confused why we even need this? This implies that the server(s) created in the test are using microversion \u003e\u003d 2.37 (is the 2.40 test doing it?) and passing networks\u003d\u0027auto\u0027 for the server create request, but I don\u0027t see that happening.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"14ba771c2ee5c08bd99d90314b4fb6e95b64a766","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"        return {\u0027quota\u0027: {\u0027port\u0027: -1}}"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def validate_auto_allocated_topology_requirements(self, project_id):"},{"line_number":1641,"context_line":"        return False"},{"line_number":1642,"context_line":""},{"line_number":1643,"context_line":"    def get_auto_allocated_topology(self, project_id, **_params):"},{"line_number":1644,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_4039163d","line":1641,"range":{"start_line":1641,"start_character":8,"end_line":1641,"end_character":20},"in_reply_to":"3fa7e38b_20c5fa8e","updated":"2019-10-04 18:42:43.000000000","message":"OK I guess it\u0027s needed for some weird roundabout reason because we\u0027re still tripping some nova-net fixture stuff:\n\n   b\u0027Traceback (most recent call last):\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/api/openstack/wsgi.py\", line 671, in wrapped\u0027\n    b\u0027    return f(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/api/validation/__init__.py\", line 110, in wrapper\u0027\n    b\u0027    return func(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/api/validation/__init__.py\", line 110, in wrapper\u0027\n    b\u0027    return func(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/api/validation/__init__.py\", line 110, in wrapper\u0027\n    b\u0027    return func(*args, **kwargs)\u0027\n    b\u0027  [Previous line repeated 9 more times]\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/api/openstack/compute/servers.py\", line 707, in create\u0027\n    b\u0027    **create_kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/functional-py36/lib/python3.6/site-packages/fixtures/_fixtures/monkeypatch.py\", line 89, in avoid_get\u0027\n    b\u0027    return captured_method(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/tests/unit/fake_network.py\", line 395, in fake_create\u0027\n    b\u0027    return _create_instances_with_cached_ips(orig_create, *args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/tests/unit/fake_network.py\", line 465, in _create_instances_with_cached_ips\u0027\n    b\u0027    instances, reservation_id \u003d orig_func(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/hooks.py\", line 154, in inner\u0027\n    b\u0027    rv \u003d f(*args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/compute/api.py\", line 1869, in create\u0027\n    b\u0027    requested_hypervisor_hostname\u003drequested_hypervisor_hostname)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/compute/api.py\", line 1331, in _create_instance\u0027\n    b\u0027    reservation_id, max_count, supports_port_resource_request)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/compute/api.py\", line 894, in _validate_and_build_base_options\u0027\n    b\u0027    requested_networks, max_count)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/compute/api.py\", line 416, in _check_requested_networks\u0027\n    b\u0027    max_count)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/network/neutronv2/api.py\", line 2255, in validate_networks\u0027\n    b\u0027    context, neutron, requested_networks)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/network/neutronv2/api.py\", line 2149, in _ports_needed_per_instance\u0027\n    b\u0027    if not self._can_auto_allocate_network(context, neutron):\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/network/neutronv2/api.py\", line 2078, in _can_auto_allocate_network\u0027\n    b\u0027    neutron.validate_auto_allocated_topology_requirements(\u0027\n    b\"AttributeError: \u0027NeutronFixture\u0027 object has no attribute \u0027validate_auto_allocated_topology_requirements\u0027\"\n\n\nWhich is due to this:\n\nhttps://github.com/openstack/nova/blob/52af043940672fd0fae2f3d82d8f6a237f6c2396/nova/tests/functional/api_sample_tests/api_sample_base.py#L121\n\nWhat are the chances of sliding that under the USE_NEUTRON conditional in that base class? Hmm, even if I do that the SimpleTenantUsageV240Test tests still fail...\n\nOK I see why, since the simple tenant usage 2.40 test is using commont server create samples it\u0027s getting here:\n\nhttps://github.com/openstack/nova/blob/52af043940672fd0fae2f3d82d8f6a237f6c2396/nova/tests/functional/api_sample_tests/test_servers.py#L51\n\nand since there is no specific server create sample for v.240 it\u0027s falling back to using the 2.37 one which uses networks\u003d\u0027auto\u0027:\n\nhttps://github.com/openstack/nova/blob/52af043940672fd0fae2f3d82d8f6a237f6c2396/nova/tests/functional/api_sample_tests/api_samples/servers/v2.37/server-create-req.json.tpl#L6\n\nWhich is why we hit the auto-allocate topology stuff.\n\nSo let\u0027s fix up the stubs in the fixture here (pass rather than return False with a comment saying the fixture is stubbed to support the auto-allocated-topology extension) and update the commit message to explain that we have to update the fixture because the test is falling back to use the 2.37 server create request sample which uses auto-network creation rather than a specific network ID.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3f649878c6d605e5fd01933451d91fd1a148eb66","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"        return {\u0027quota\u0027: {\u0027port\u0027: -1}}"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def validate_auto_allocated_topology_requirements(self, project_id):"},{"line_number":1641,"context_line":"        return False"},{"line_number":1642,"context_line":""},{"line_number":1643,"context_line":"    def get_auto_allocated_topology(self, project_id, **_params):"},{"line_number":1644,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_ccd53c1d","line":1641,"range":{"start_line":1641,"start_character":8,"end_line":1641,"end_character":20},"in_reply_to":"3fa7e38b_4039163d","updated":"2019-10-05 11:56:56.000000000","message":"Done...sort of. I wasn\u0027t able to simply use pass since the response changed. I don\u0027t know enough about this API to figure out if the change was correct or not but I don\u0027t think it was. Instead, I\u0027ve updated this mocks so they behave like the neutron client/server and left links to stuff I based them on.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bc29c91832d37a13128dc64175b0b5182034d84","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        return {"},{"line_number":1645,"context_line":"            \u0027auto_allocated_topology\u0027: {"},{"line_number":1646,"context_line":"                \u0027id\u0027: NeutronFixture.network_1[\u0027id\u0027],"},{"line_number":1647,"context_line":"                \u0027tenant_id\u0027: project_id,"},{"line_number":1648,"context_line":"            }"},{"line_number":1649,"context_line":"        }"},{"line_number":1650,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_a036cab3","line":1647,"range":{"start_line":1647,"start_character":16,"end_line":1647,"end_character":40},"updated":"2019-10-04 18:20:19.000000000","message":"Looks like this isn\u0027t necessary. Also, implementing this method doesn\u0027t align with returning False from the validation method, because you\u0027re saying neutron doesn\u0027t support auto-allocated topology but here is one anyway. I mean, I know this is all fake, but it\u0027s misleading/wrong API contracts.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3f649878c6d605e5fd01933451d91fd1a148eb66","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        return {"},{"line_number":1645,"context_line":"            \u0027auto_allocated_topology\u0027: {"},{"line_number":1646,"context_line":"                \u0027id\u0027: NeutronFixture.network_1[\u0027id\u0027],"},{"line_number":1647,"context_line":"                \u0027tenant_id\u0027: project_id,"},{"line_number":1648,"context_line":"            }"},{"line_number":1649,"context_line":"        }"},{"line_number":1650,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_6cdc4846","line":1647,"range":{"start_line":1647,"start_character":16,"end_line":1647,"end_character":40},"in_reply_to":"3fa7e38b_a036cab3","updated":"2019-10-05 11:56:56.000000000","message":"This bit is necessary (see above), though it needed a bit more work. Fixed now.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e21d3b75847ca7791020a66d2dd2be35ef044848","unresolved":false,"context_lines":[{"line_number":1640,"context_line":"    def validate_auto_allocated_topology_requirements(self, project_id):"},{"line_number":1641,"context_line":"        # from https://github.com/openstack/python-neutronclient/blob/6.14.0/"},{"line_number":1642,"context_line":"        #  neutronclient/v2_0/client.py#L2009-L2011"},{"line_number":1643,"context_line":"        return self.get_auto_allocated_topology(project_id, fields\u003d[\u0027dry-run\u0027])"},{"line_number":1644,"context_line":""},{"line_number":1645,"context_line":"    def get_auto_allocated_topology(self, project_id, **_params):"},{"line_number":1646,"context_line":"        # from https://github.com/openstack/neutron/blob/14.0.0/"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_6c6c4808","line":1643,"range":{"start_line":1643,"start_character":69,"end_line":1643,"end_character":76},"updated":"2019-10-05 13:22:22.000000000","message":"Oh that\u0027s right, I remember now - the validate API blows up if the setup isn\u0027t done for the auto-allocated topology but doesn\u0027t create any resources otherwise.","commit_id":"1443171d167facd910d45e24733688fbc02b57c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e21d3b75847ca7791020a66d2dd2be35ef044848","unresolved":false,"context_lines":[{"line_number":1645,"context_line":"    def get_auto_allocated_topology(self, project_id, **_params):"},{"line_number":1646,"context_line":"        # from https://github.com/openstack/neutron/blob/14.0.0/"},{"line_number":1647,"context_line":"        #  neutron/services/auto_allocate/db.py#L134-L162"},{"line_number":1648,"context_line":"        if _params \u003d\u003d {\u0027fields\u0027: [\u0027dry-run\u0027]}:"},{"line_number":1649,"context_line":"            return {\u0027id\u0027: \u0027dry-run\u003dpass\u0027, \u0027tenant_id\u0027: project_id}"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_2c7650da","line":1648,"range":{"start_line":1648,"start_character":19,"end_line":1648,"end_character":21},"updated":"2019-10-05 13:22:22.000000000","message":"I guess this is OK. Could future proof it a bit by doing:\n\nif \u0027dry-run\u0027 in _params.get(\u0027fields\u0027, []):\n\nBut this fake API implementation likely won\u0027t ever change.","commit_id":"1443171d167facd910d45e24733688fbc02b57c8"}],"nova/tests/functional/api_sample_tests/api_samples/os-simple-tenant-usage/v2.40/simple-tenant-usage-get-all.json.tpl":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"064e03265c791f54ad1e4a07b5b3b86859a28ae1","unresolved":false,"context_lines":[{"line_number":6,"context_line":"                    \"ended_at\": null,"},{"line_number":7,"context_line":"                    \"flavor\": \"m1.tiny\","},{"line_number":8,"context_line":"                    \"hours\": 1.0,"},{"line_number":9,"context_line":"                    \"instance_id\": \"1f1deceb-17b5-4c04-84c7-e0d4499c8f05\","},{"line_number":10,"context_line":"                    \"local_gb\": 1,"},{"line_number":11,"context_line":"                    \"memory_mb\": 512,"},{"line_number":12,"context_line":"                    \"name\": \"instance-3\","}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_b56e66fd","line":9,"range":{"start_line":9,"start_character":35,"end_line":9,"end_character":74},"updated":"2019-09-29 14:53:28.000000000","message":"let\u0027s replace this with \"%(uuid)s\" so that sample tests will compare the API response value with uuid regex. \n\nThat way we do not need to update this value and also in doc sample files.","commit_id":"1370d0d3f7eb2a3b4f10cd4f22139ffffd5cbaac"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aabdd42f15dc6788791a1b8d0c9154e2fd4d0f74","unresolved":false,"context_lines":[{"line_number":6,"context_line":"                    \"ended_at\": null,"},{"line_number":7,"context_line":"                    \"flavor\": \"m1.tiny\","},{"line_number":8,"context_line":"                    \"hours\": 1.0,"},{"line_number":9,"context_line":"                    \"instance_id\": \"1f1deceb-17b5-4c04-84c7-e0d4499c8f05\","},{"line_number":10,"context_line":"                    \"local_gb\": 1,"},{"line_number":11,"context_line":"                    \"memory_mb\": 512,"},{"line_number":12,"context_line":"                    \"name\": \"instance-3\","}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_b2367202","line":9,"range":{"start_line":9,"start_character":35,"end_line":9,"end_character":74},"in_reply_to":"3fa7e38b_b56e66fd","updated":"2019-09-30 14:03:49.000000000","message":"Done","commit_id":"1370d0d3f7eb2a3b4f10cd4f22139ffffd5cbaac"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"064e03265c791f54ad1e4a07b5b3b86859a28ae1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    \"ended_at\": null,"},{"line_number":46,"context_line":"                    \"flavor\": \"m1.tiny\","},{"line_number":47,"context_line":"                    \"hours\": 1.0,"},{"line_number":48,"context_line":"                    \"instance_id\": \"1f1deceb-17b5-4c04-84c7-e0d4499c8f02\","},{"line_number":49,"context_line":"                    \"local_gb\": 1,"},{"line_number":50,"context_line":"                    \"memory_mb\": 512,"},{"line_number":51,"context_line":"                    \"name\": \"instance-2\","}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_557932c5","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":74},"updated":"2019-09-29 14:53:28.000000000","message":"ditto","commit_id":"1370d0d3f7eb2a3b4f10cd4f22139ffffd5cbaac"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aabdd42f15dc6788791a1b8d0c9154e2fd4d0f74","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    \"ended_at\": null,"},{"line_number":46,"context_line":"                    \"flavor\": \"m1.tiny\","},{"line_number":47,"context_line":"                    \"hours\": 1.0,"},{"line_number":48,"context_line":"                    \"instance_id\": \"1f1deceb-17b5-4c04-84c7-e0d4499c8f02\","},{"line_number":49,"context_line":"                    \"local_gb\": 1,"},{"line_number":50,"context_line":"                    \"memory_mb\": 512,"},{"line_number":51,"context_line":"                    \"name\": \"instance-2\","}],"source_content_type":"text/x-smarty","patch_set":2,"id":"3fa7e38b_52393eef","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":74},"in_reply_to":"3fa7e38b_557932c5","updated":"2019-09-30 14:03:49.000000000","message":"Done","commit_id":"1370d0d3f7eb2a3b4f10cd4f22139ffffd5cbaac"}],"nova/tests/functional/api_sample_tests/test_simple_tenant_usage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bc29c91832d37a13128dc64175b0b5182034d84","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            uuid_format \u003d \u00271f1deceb-17b5-4c04-84c7-e0d4499c8f%02d\u0027"},{"line_number":92,"context_line":"            mock_uuids.side_effect \u003d [uuid_format % x for x in range(100)]"},{"line_number":93,"context_line":"            self.project_id \u003d self.project_id_0"},{"line_number":94,"context_line":"            self.instance1_uuid \u003d self._post_server(name\u003d\u0027instance-1\u0027)"},{"line_number":95,"context_line":"            self.instance2_uuid \u003d self._post_server(name\u003d\u0027instance-2\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            self.project_id \u003d self.project_id_1"},{"line_number":98,"context_line":"            self.instance3_uuid \u003d self._post_server(name\u003d\u0027instance-3\u0027)"},{"line_number":99,"context_line":"        timeutils.set_time_override(now)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.query \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_805ceeed","line":98,"range":{"start_line":94,"start_character":12,"end_line":98,"end_character":70},"updated":"2019-10-04 18:20:19.000000000","message":"Couldn\u0027t we use the instance-1/2/3 here and sub those out in the template rather than using the generic %(uuid)s? Maybe that\u0027s more pain than it\u0027s worth since the template before was just hard-coding values.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3f649878c6d605e5fd01933451d91fd1a148eb66","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            uuid_format \u003d \u00271f1deceb-17b5-4c04-84c7-e0d4499c8f%02d\u0027"},{"line_number":92,"context_line":"            mock_uuids.side_effect \u003d [uuid_format % x for x in range(100)]"},{"line_number":93,"context_line":"            self.project_id \u003d self.project_id_0"},{"line_number":94,"context_line":"            self.instance1_uuid \u003d self._post_server(name\u003d\u0027instance-1\u0027)"},{"line_number":95,"context_line":"            self.instance2_uuid \u003d self._post_server(name\u003d\u0027instance-2\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            self.project_id \u003d self.project_id_1"},{"line_number":98,"context_line":"            self.instance3_uuid \u003d self._post_server(name\u003d\u0027instance-3\u0027)"},{"line_number":99,"context_line":"        timeutils.set_time_override(now)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.query \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_8cdf4439","line":98,"range":{"start_line":94,"start_character":12,"end_line":98,"end_character":70},"in_reply_to":"3fa7e38b_805ceeed","updated":"2019-10-05 11:56:56.000000000","message":"I didn\u0027t touch this yet since it\u0027s unrelated. Can do a follow-up later.","commit_id":"6257235b1f498923193ef7fd72106e91416d871b"}]}
