diff --git a/openstack_dashboard/dashboards/admin/instances/tests.py b/openstack_dashboard/dashboards/admin/instances/tests.py index 0937fe4929b..aa505cd527e 100644 --- a/openstack_dashboard/dashboards/admin/instances/tests.py +++ b/openstack_dashboard/dashboards/admin/instances/tests.py @@ -148,6 +148,7 @@ def test_index_server_list_exception(self): @test.create_stubs({api.nova: ('server_get', 'flavor_get', 'extension_supported', ), + api.network: ('servers_update_addresses',), api.keystone: ('tenant_get',)}) def test_ajax_loading_instances(self): server = self.servers.first() diff --git a/openstack_dashboard/dashboards/project/instances/tables.py b/openstack_dashboard/dashboards/project/instances/tables.py index 66ab876b74b..04da647906f 100644 --- a/openstack_dashboard/dashboards/project/instances/tables.py +++ b/openstack_dashboard/dashboards/project/instances/tables.py @@ -779,6 +779,13 @@ def get_data(self, request, instance_id): _('Unable to retrieve flavor information ' 'for instance "%s".') % instance_id, ignore=True) + try: + api.network.servers_update_addresses(request, [instance]) + except Exception: + exceptions.handle(request, + _('Unable to retrieve Network information ' + 'for instance "%s".') % instance_id, + ignore=True) error = get_instance_error(instance) if error: messages.error(request, error) diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py index 55809b0f743..fc91f03b93c 100644 --- a/openstack_dashboard/dashboards/project/instances/tests.py +++ b/openstack_dashboard/dashboards/project/instances/tests.py @@ -4726,6 +4726,7 @@ class InstanceAjaxTests(helpers.TestCase): @helpers.create_stubs({api.nova: ("server_get", "flavor_get", "extension_supported"), + api.network: ('servers_update_addresses',), api.neutron: ("is_extension_supported",)}) def test_row_update(self): server = self.servers.first() @@ -4759,7 +4760,8 @@ def test_row_update(self): @helpers.create_stubs({api.nova: ("server_get", "flavor_get", "extension_supported"), - api.neutron: ("is_extension_supported",)}) + api.neutron: ("is_extension_supported",), + api.network: ('servers_update_addresses',)}) def test_row_update_instance_error(self): server = self.servers.first() instance_id = server.id