From 180221114c85092f22fd300e11bcb911cfb59cfe Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 2 Oct 2019 11:54:56 +0100 Subject: [PATCH] nova-net: Remove references to nova-net service from tests Remove some leftover references to the now-removed service from various tests. Change-Id: Ib3433b70b3a7b8f030bf60a0bc98ce926106b34d Signed-off-by: Stephen Finucane --- nova/api/openstack/compute/hosts.py | 6 ----- .../compute/test_availability_zone.py | 22 +++---------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/nova/api/openstack/compute/hosts.py b/nova/api/openstack/compute/hosts.py index bf87439e89..2e9cdd0c8f 100644 --- a/nova/api/openstack/compute/hosts.py +++ b/nova/api/openstack/compute/hosts.py @@ -53,12 +53,6 @@ class HostController(wsgi.Controller): | {'host_name': 'some.celly.host.name', | 'service': 'cells', | 'zone': 'internal'}, - | {'host_name': 'network1.host.com', - | 'service': 'network', - | 'zone': 'internal'}, - | {'host_name': 'network2.host.com', - | 'service': 'network', - | 'zone': 'internal'}, | {'host_name': 'compute1.host.com', | 'service': 'compute', | 'zone': 'nova'}, diff --git a/nova/tests/unit/api/openstack/compute/test_availability_zone.py b/nova/tests/unit/api/openstack/compute/test_availability_zone.py index 04e8b7d18d..b80756da9f 100644 --- a/nova/tests/unit/api/openstack/compute/test_availability_zone.py +++ b/nova/tests/unit/api/openstack/compute/test_availability_zone.py @@ -61,11 +61,7 @@ def fake_service_get_all(context, filters=None, **kwargs): __fake_service("nova-scheduler", "internal", datetime.datetime(2012, 11, 14, 9, 57, 3, 0), datetime.datetime(2012, 12, 26, 14, 45, 25, 0), - "fake_host-1", True), - __fake_service("nova-network", "internal", - datetime.datetime(2012, 11, 16, 7, 25, 46, 0), - datetime.datetime(2012, 12, 26, 14, 45, 24, 0), - "fake_host-2", True)] + "fake_host-1", True)] else: svcs = [__fake_service("nova-compute", "zone-1", datetime.datetime(2012, 11, 14, 9, 53, 25, 0), @@ -80,11 +76,7 @@ def fake_service_get_all(context, filters=None, **kwargs): __fake_service("nova-conductor", "internal", datetime.datetime(2012, 11, 14, 9, 57, 3, 0), datetime.datetime(2012, 12, 26, 14, 45, 25, 0), - "fake_host-1", False), - __fake_service("nova-network", "internal", - datetime.datetime(2012, 11, 16, 7, 25, 46, 0), - datetime.datetime(2012, 12, 26, 14, 45, 24, 0), - "fake_host-2", False)] + "fake_host-1", False)] return objects.ServiceList(objects=svcs) @@ -98,7 +90,7 @@ class AvailabilityZoneApiTestV21(test.NoDBTestCase): self.stub_out('nova.availability_zones.set_availability_zones', lambda c, services: services) self.stub_out('nova.servicegroup.API.service_is_up', - lambda s, service: service['binary'] != u"nova-network") + lambda s, service: True) self.controller = self.availability_zone.AvailabilityZoneController() self.mock_service_get_all = mock.patch.object( self.controller.host_api, 'service_get_all', @@ -141,7 +133,6 @@ class AvailabilityZoneApiTestV21(test.NoDBTestCase): zones = resp_dict['availabilityZoneInfo'] self.assertEqual(len(zones), 3) timestamp = iso8601.parse_date("2012-12-26T14:45:25Z") - nova_network_timestamp = iso8601.parse_date("2012-12-26T14:45:24Z") expected = [ { 'zoneName': 'zone-1', @@ -171,13 +162,6 @@ class AvailabilityZoneApiTestV21(test.NoDBTestCase): 'available': True, 'updated_at': timestamp } - }, - 'fake_host-2': { - 'nova-network': { - 'active': True, - 'available': False, - 'updated_at': nova_network_timestamp - } } } },