diff --git a/examples/common.py b/examples/common.py index 11a07566e..ec3b941a5 100755 --- a/examples/common.py +++ b/examples/common.py @@ -139,8 +139,8 @@ class ProfileAction(argparse.Action): cls.prof.set_region(service, value) elif var == 'version': cls.prof.set_version(service, value) - elif var == 'visibility': - cls.prof.set_visibility(service, value) + elif var == 'interface': + cls.prof.set_interface(service, value) def __call__(self, parser, namespace, values, option_string=None): if getattr(namespace, self.dest, None) is None: @@ -283,12 +283,12 @@ def option_parser(): help='Desired API versions defaults to env[OS_API_VERSION]', ) parser.add_argument( - '--os-api-visibility', + '--os-api-interface', dest='preferences', - metavar='=', + metavar='=', action=ProfileAction, - default=ProfileAction.env('OS_API_VISIBILITY'), - help='Desired API visibility defaults to env[OS_API_VISIBILITY]', + default=ProfileAction.env('OS_INTERFACE'), + help='Desired API interface defaults to env[OS_INTERFACE]', ) verify_group = parser.add_mutually_exclusive_group() verify_group.add_argument( diff --git a/openstack/auth/service_catalog.py b/openstack/auth/service_catalog.py index 108efbd51..63872a7df 100644 --- a/openstack/auth/service_catalog.py +++ b/openstack/auth/service_catalog.py @@ -66,7 +66,7 @@ class ServiceCatalog(object): Returns a tuple containting the url and version for the specified service (or all) containing the specified type, name, region and - visibility. + interface. """ eps = [] for service in self.catalog: @@ -77,7 +77,7 @@ class ServiceCatalog(object): for endpoint in service.get('endpoints', []): if not filtration.match_region(endpoint.get('region', None)): continue - if not filtration.match_visibility(endpoint.get('interface')): + if not filtration.match_interface(endpoint.get('interface')): continue url = endpoint.get('url', None) if not url: @@ -91,7 +91,7 @@ class ServiceCatalog(object): Returns a list of urls based on the service filter. If not endpoints are found that match the service filter, an empty list is returned. - The filter may specify type, name, region, version and visibility. + The filter may specify type, name, region, version and interface. """ urls = [] for url, version in self._get_endpoints(filtration): @@ -107,7 +107,7 @@ class ServiceCatalog(object): no endpoint matching the filter, None will be returned. An empty list of versions means the service is supported, but no version is specified in the service catalog. The filter may specify type, name, - region, version and visibility. + region, version and interface. """ vers = None for url, version in self._get_endpoints(filtration): diff --git a/openstack/auth/service_filter.py b/openstack/auth/service_filter.py index c257f6572..e7430e798 100644 --- a/openstack/auth/service_filter.py +++ b/openstack/auth/service_filter.py @@ -25,7 +25,7 @@ Examples -------- The :class:`~openstack.auth.service_filter.ServiceFilter` class can be built -with a service type, visibility, region, name, and version. +with a service type, interface, region, name, and version. Create a service filter ~~~~~~~~~~~~~~~~~~~~~~~ @@ -41,13 +41,13 @@ and match:: matches = (result.match_service_type('compute') and result.match_service_name('Hal9000') and result.match_region('DiscoveryOne') and - result.match_visibility('public')) + result.match_interface('public')) print(str(result)) print("matches=" + str(matches)) The resulting output from the code:: - service_type=compute,visibility=public,version=v2 + service_type=compute,interface=public,version=v2 matches=True """ @@ -72,30 +72,30 @@ class ServiceFilter(object): PUBLIC = 'public' INTERNAL = 'internal' ADMIN = 'admin' - VISIBILITY = [PUBLIC, INTERNAL, ADMIN] + INTERFACE = [PUBLIC, INTERNAL, ADMIN] valid_versions = [] - def __init__(self, service_type=ANY, visibility=PUBLIC, region=None, + def __init__(self, service_type=ANY, interface=PUBLIC, region=None, service_name=None, version=None): """Create a service identifier. :param string service_type: The desired type of service. - :param string visibility: The exposure of the endpoint. Should be + :param string interface: The exposure of the endpoint. Should be `public` (default), `internal` or `admin`. :param string region: The desired region (optional). :param string service_name: Name of the service :param string version: Version of service to use. """ self.service_type = service_type.lower() - self.set_visibility(visibility) + self.set_interface(interface) self.region = region self.service_name = service_name self.version = version def __repr__(self): ret = "service_type=%s" % self.service_type - if self.visibility is not None: - ret += ",visibility=%s" % self.visibility + if self.interface is not None: + ret += ",interface=%s" % self.interface if self.region is not None: ret += ",region=%s" % self.region if self.service_name: @@ -121,9 +121,9 @@ class ServiceFilter(object): response.service_type = default.service_type response.service_name = self.service_name response.valid_versions = default.valid_versions - response.visibility = default.visibility - if self.visibility: - response.visibility = self.visibility + response.interface = default.interface + if self.interface: + response.interface = self.interface if self.region: response.region = self.region response.version = version @@ -151,23 +151,23 @@ class ServiceFilter(object): return True return False - def match_visibility(self, visibility): - """Service visibilities are equavilent.""" - if not self.visibility: + def match_interface(self, interface): + """Service interfaces are equavilent.""" + if not self.interface: return True - return self.visibility == visibility + return self.interface == interface - def set_visibility(self, visibility): - """Set the visibility of the service filter.""" - if not visibility: - self.visibility = None + def set_interface(self, interface): + """Set the interface of the service filter.""" + if not interface: + self.interface = None return - visibility = visibility.replace('URL', '') - visibility = visibility.lower() - if visibility not in self.VISIBILITY: - msg = "Visibility <%s> not in %s" % (visibility, self.VISIBILITY) + interface = interface.replace('URL', '') + interface = interface.lower() + if interface not in self.INTERFACE: + msg = "Interface <%s> not in %s" % (interface, self.INTERFACE) raise exceptions.SDKException(msg) - self.visibility = visibility + self.interface = interface def _get_valid_version(self): if self.valid_versions: diff --git a/openstack/connection.py b/openstack/connection.py index 52406152b..274d4e5c7 100644 --- a/openstack/connection.py +++ b/openstack/connection.py @@ -111,7 +111,7 @@ def from_config(opts): version = "v" + version prof.set_version(service, version) prof.set_name(service, cloud_config.get_service_name(service)) - prof.set_visibility( + prof.set_interface( service, cloud_config.get_interface(service)) prof.set_region(service, cloud_config.get_region_name(service)) @@ -154,7 +154,7 @@ class Connection(object): authenticator. :type authenticator: :class:`~openstack.auth.base.BaseAuthPlugin` :param profile: If the user has any special profiles such as the - service name, region, version or visibility, they may be provided + service name, region, version or interface, they may be provided in the profile object. If no profiles are provided, the services that appear first in the service catalog will be used. :type profile: :class:`~openstack.profile.Profile` diff --git a/openstack/identity/identity_service.py b/openstack/identity/identity_service.py index de4282a06..ae32f8d44 100644 --- a/openstack/identity/identity_service.py +++ b/openstack/identity/identity_service.py @@ -30,5 +30,5 @@ class IdentityService(service_filter.ServiceFilter): class AdminService(IdentityService): def __init__(self, **kwargs): - kwargs['visibility'] = service_filter.ServiceFilter.ADMIN + kwargs['interface'] = service_filter.ServiceFilter.ADMIN super(AdminService, self).__init__(**kwargs) diff --git a/openstack/identity/v3/endpoint.py b/openstack/identity/v3/endpoint.py index 48f36a64b..5e0877d00 100644 --- a/openstack/identity/v3/endpoint.py +++ b/openstack/identity/v3/endpoint.py @@ -32,7 +32,7 @@ class Endpoint(resource.Resource): #: Setting this value to ``False`` prevents the endpoint from appearing #: in the service catalog. *Type: bool* enabled = resource.prop('enabled', type=bool) - #: Describes the visibility of the endpoint according to one of the + #: Describes the interface of the endpoint according to one of the #: following values: #: #: - `public`: intended for consumption by end users, generally on a diff --git a/openstack/module_loader.py b/openstack/module_loader.py index d99a4965f..32dfcfcf7 100644 --- a/openstack/module_loader.py +++ b/openstack/module_loader.py @@ -26,7 +26,7 @@ def load_service_extensions(namespace): services = {} for service in service_extensions: service = service.obj - service.set_visibility(None) + service.set_interface(None) services[service.service_type] = service return services diff --git a/openstack/profile.py b/openstack/profile.py index 9c79f8a92..a80c02955 100644 --- a/openstack/profile.py +++ b/openstack/profile.py @@ -13,7 +13,7 @@ """ :class:`~openstack.profile.Profile` is the class that is used to define the various preferences for different services. The preferences that -are currently supported are service name, region, version and visibility. +are currently supported are service name, region, version and interface. The :class:`~openstack.profile.Profile` and the :class:`~openstack.connection.Connection` classes are the most important user facing classes. @@ -35,7 +35,7 @@ normally be something like 'compute', 'identity', 'object-store', etc.:: prof.set_name('compute', 'matrix') prof.set_region(prof.ALL, 'zion') prof.set_version('identity', 'v3') - prof.set_visibility('object-store', 'internal') + prof.set_interface('object-store', 'internal') for service in prof.get_services(): print str(prof.get_preference(service.service_type)) @@ -47,7 +47,7 @@ The resulting preference print out would look something like:: service_type=image,region=zion service_type=metering,region=zion service_type=orchestration,region=zion - service_type=object-store,visibility=internal,region=zion + service_type=object-store,interface=internal,region=zion service_type=identity,region=zion,version=v3 """ @@ -113,7 +113,7 @@ class Profile(object): return repr(self._preferences) def _add_service(self, serv): - serv.set_visibility(None) + serv.set_interface(None) self._services[serv.service_type] = serv def _load_extension(self, namespace): @@ -186,15 +186,15 @@ class Profile(object): """ self._get_service(service).version = version - def set_visibility(self, service, visibility): - """Set the desired visibility for the specified service. + def set_interface(self, service, interface): + """Set the desired interface for the specified service. :param str service: Service type. - :param str visibility: Desired service visibility. + :param str interface: Desired service interface. """ if service == self.ALL: services = self.service_names else: services = [service] for service in services: - self._get_service(service).set_visibility(visibility) + self._get_service(service).set_interface(interface) diff --git a/openstack/session.py b/openstack/session.py index fd6170ebe..34612407d 100644 --- a/openstack/session.py +++ b/openstack/session.py @@ -81,7 +81,7 @@ class Session(object): get_endpoint methods for the session. :type authenticator: :class:`~openstack.auth.base.BaseAuthPlugin` :param profile: If the user has any special profiles such as the - service name, region, version or visibility, they may be provided + service name, region, version or interface, they may be provided in the profile object. If no profiles are provided, the services that appear first in the service catalog will be used. :type profile: :class:`~openstack.profile.Profile` diff --git a/openstack/tests/unit/auth/test_service_catalog.py b/openstack/tests/unit/auth/test_service_catalog.py index 9077fb250..f29dc2f95 100644 --- a/openstack/tests/unit/auth/test_service_catalog.py +++ b/openstack/tests/unit/auth/test_service_catalog.py @@ -69,19 +69,19 @@ class TestServiceCatalog(testtools.TestCase): self.assertEqual(["http://compute.region1.public/v2.0"], sot.get_urls(sf)) - def get_urls_visibility(self, sot): + def get_urls_interface(self, sot): sf = service_filter.ServiceFilter(service_type='identity', - visibility='admin') + interface='admin') self.assertEqual(["http://identity.region1.admin/v1.1/123123"], sot.get_urls(sf)) sf = service_filter.ServiceFilter(service_type='identity', - visibility='internal') + interface='internal') self.assertEqual( ["http://identity.region1.internal/v1.1/123123"], sot.get_urls(sf) ) sf = service_filter.ServiceFilter(service_type='identity', - visibility='public') + interface='public') self.assertEqual(["http://identity.region1.public/v1.1/123123"], sot.get_urls(sf)) @@ -107,9 +107,9 @@ class TestServiceCatalogV2(TestServiceCatalog): sot = catalog.ServiceCatalogV2(common.TEST_SERVICE_CATALOG_V2) self.get_urls_region(sot) - def test_get_urls_visibility(self): + def test_get_urls_interface(self): sot = catalog.ServiceCatalogV2(common.TEST_SERVICE_CATALOG_V2) - self.get_urls_visibility(sot) + self.get_urls_interface(sot) class TestServiceCatalogV3(TestServiceCatalog): @@ -133,9 +133,9 @@ class TestServiceCatalogV3(TestServiceCatalog): sot = catalog.ServiceCatalog(common.TEST_SERVICE_CATALOG_V3) self.get_urls_region(sot) - def test_get_urls_visibility(self): + def test_get_urls_interface(self): sot = catalog.ServiceCatalog(common.TEST_SERVICE_CATALOG_V3) - self.get_urls_visibility(sot) + self.get_urls_interface(sot) def test_get_versions(self): sot = catalog.ServiceCatalog(common.TEST_SERVICE_CATALOG_V3) diff --git a/openstack/tests/unit/auth/test_service_filter.py b/openstack/tests/unit/auth/test_service_filter.py index 246f84f34..6228ad9d4 100644 --- a/openstack/tests/unit/auth/test_service_filter.py +++ b/openstack/tests/unit/auth/test_service_filter.py @@ -21,41 +21,41 @@ from openstack.identity import identity_service class TestServiceFilter(testtools.TestCase): def test_minimum(self): sot = filt.ServiceFilter() - self.assertEqual("service_type=any,visibility=public", + self.assertEqual("service_type=any,interface=public", six.text_type(sot)) def test_maximum(self): - sot = filt.ServiceFilter(service_type='compute', visibility='admin', + sot = filt.ServiceFilter(service_type='compute', interface='admin', region='b', service_name='c') - exp = "service_type=compute,visibility=admin,region=b,service_name=c" + exp = "service_type=compute,interface=admin,region=b,service_name=c" self.assertEqual(exp, six.text_type(sot)) - def test_visibility(self): - sot = filt.ServiceFilter(service_type='identity', visibility='public') - self.assertEqual("service_type=identity,visibility=public", + def test_interface(self): + sot = filt.ServiceFilter(service_type='identity', interface='public') + self.assertEqual("service_type=identity,interface=public", six.text_type(sot)) sot = filt.ServiceFilter(service_type='identity', - visibility='internal') - self.assertEqual("service_type=identity,visibility=internal", + interface='internal') + self.assertEqual("service_type=identity,interface=internal", six.text_type(sot)) - sot = filt.ServiceFilter(service_type='identity', visibility='admin') - self.assertEqual("service_type=identity,visibility=admin", + sot = filt.ServiceFilter(service_type='identity', interface='admin') + self.assertEqual("service_type=identity,interface=admin", six.text_type(sot)) sot = filt.ServiceFilter(service_type='identity', - visibility='publicURL') - self.assertEqual("service_type=identity,visibility=public", + interface='publicURL') + self.assertEqual("service_type=identity,interface=public", six.text_type(sot)) sot = filt.ServiceFilter(service_type='identity', - visibility='internalURL') - self.assertEqual("service_type=identity,visibility=internal", + interface='internalURL') + self.assertEqual("service_type=identity,interface=internal", six.text_type(sot)) sot = filt.ServiceFilter(service_type='identity', - visibility='adminURL') - self.assertEqual("service_type=identity,visibility=admin", + interface='adminURL') + self.assertEqual("service_type=identity,interface=admin", six.text_type(sot)) self.assertRaises(exceptions.SDKException, filt.ServiceFilter, - service_type='identity', visibility='b') - sot = filt.ServiceFilter(service_type='identity', visibility=None) + service_type='identity', interface='b') + sot = filt.ServiceFilter(service_type='identity', interface=None) self.assertEqual("service_type=identity", six.text_type(sot)) def test_match_service_type(self): @@ -89,33 +89,33 @@ class TestServiceFilter(testtools.TestCase): self.assertFalse(sot.match_region('West')) self.assertFalse(sot.match_region(None)) - def test_match_visibility(self): + def test_match_interface(self): sot = filt.ServiceFilter(service_type='identity', - visibility='internal') - self.assertFalse(sot.match_visibility('admin')) - self.assertTrue(sot.match_visibility('internal')) - self.assertFalse(sot.match_visibility('public')) + interface='internal') + self.assertFalse(sot.match_interface('admin')) + self.assertTrue(sot.match_interface('internal')) + self.assertFalse(sot.match_interface('public')) def test_join(self): a = filt.ServiceFilter(region='east') b = filt.ServiceFilter(service_type='identity') result = a.join(b) - self.assertEqual("service_type=identity,visibility=public,region=east", + self.assertEqual("service_type=identity,interface=public,region=east", six.text_type(result)) - self.assertEqual("service_type=any,visibility=public,region=east", + self.assertEqual("service_type=any,interface=public,region=east", six.text_type(a)) - self.assertEqual("service_type=identity,visibility=public", + self.assertEqual("service_type=identity,interface=public", six.text_type(b)) - def test_join_visibility(self): - user_preference = filt.ServiceFilter(visibility='public') - service_default = filt.ServiceFilter(visibility='admin') + def test_join_interface(self): + user_preference = filt.ServiceFilter(interface='public') + service_default = filt.ServiceFilter(interface='admin') result = user_preference.join(service_default) - self.assertEqual("public", result.visibility) - user_preference = filt.ServiceFilter(visibility=None) - service_default = filt.ServiceFilter(visibility='admin') + self.assertEqual("public", result.interface) + user_preference = filt.ServiceFilter(interface=None) + service_default = filt.ServiceFilter(interface='admin') result = user_preference.join(service_default) - self.assertEqual("admin", result.visibility) + self.assertEqual("admin", result.interface) def test_join_version(self): user_preference = filt.ServiceFilter(version='v2') @@ -126,14 +126,14 @@ class TestServiceFilter(testtools.TestCase): ) self.assertEqual('', user_preference.join(service_default).version) - def test_set_visibility(self): + def test_set_interface(self): sot = filt.ServiceFilter() - sot.set_visibility("PUBLICURL") - self.assertEqual('public', sot.visibility) - sot.set_visibility("INTERNALURL") - self.assertEqual('internal', sot.visibility) - sot.set_visibility("ADMINURL") - self.assertEqual('admin', sot.visibility) + sot.set_interface("PUBLICURL") + self.assertEqual('public', sot.interface) + sot.set_interface("INTERNALURL") + self.assertEqual('internal', sot.interface) + sot.set_interface("ADMINURL") + self.assertEqual('admin', sot.interface) def test_get_module(self): sot = identity_service.IdentityService() diff --git a/openstack/tests/unit/block_store/test_block_store_service.py b/openstack/tests/unit/block_store/test_block_store_service.py index 3db9ddd3e..f02d12ac5 100644 --- a/openstack/tests/unit/block_store/test_block_store_service.py +++ b/openstack/tests/unit/block_store/test_block_store_service.py @@ -20,7 +20,7 @@ class TestBlockStoreService(testtools.TestCase): def test_service(self): sot = block_store_service.BlockStoreService() self.assertEqual("volume", sot.service_type) - self.assertEqual("public", sot.visibility) + self.assertEqual("public", sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/cluster/test_cluster_service.py b/openstack/tests/unit/cluster/test_cluster_service.py index a64cd6f58..0d7532a60 100644 --- a/openstack/tests/unit/cluster/test_cluster_service.py +++ b/openstack/tests/unit/cluster/test_cluster_service.py @@ -20,7 +20,7 @@ class TestClusterService(testtools.TestCase): def test_service(self): sot = cluster_service.ClusterService() self.assertEqual('clustering', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/compute/test_compute_service.py b/openstack/tests/unit/compute/test_compute_service.py index 449f813dd..3c5b26c8f 100644 --- a/openstack/tests/unit/compute/test_compute_service.py +++ b/openstack/tests/unit/compute/test_compute_service.py @@ -20,7 +20,7 @@ class TestComputeService(testtools.TestCase): def test_service(self): sot = compute_service.ComputeService() self.assertEqual('compute', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/database/test_database_service.py b/openstack/tests/unit/database/test_database_service.py index 236670f6c..6793acd43 100644 --- a/openstack/tests/unit/database/test_database_service.py +++ b/openstack/tests/unit/database/test_database_service.py @@ -20,7 +20,7 @@ class TestDatabaseService(testtools.TestCase): def test_service(self): sot = database_service.DatabaseService() self.assertEqual('database', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/identity/test_identity_service.py b/openstack/tests/unit/identity/test_identity_service.py index d13560b83..dbfaea3d6 100644 --- a/openstack/tests/unit/identity/test_identity_service.py +++ b/openstack/tests/unit/identity/test_identity_service.py @@ -20,7 +20,7 @@ class TestIdentityService(testtools.TestCase): def test_regular_service(self): sot = identity_service.IdentityService() self.assertEqual('identity', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(2, len(sot.valid_versions)) @@ -32,6 +32,6 @@ class TestIdentityService(testtools.TestCase): def test_admin_service(self): sot = identity_service.AdminService() self.assertEqual('identity', sot.service_type) - self.assertEqual('admin', sot.visibility) + self.assertEqual('admin', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) diff --git a/openstack/tests/unit/image/test_image_service.py b/openstack/tests/unit/image/test_image_service.py index f93b662da..293cf84b8 100644 --- a/openstack/tests/unit/image/test_image_service.py +++ b/openstack/tests/unit/image/test_image_service.py @@ -20,7 +20,7 @@ class TestImageService(testtools.TestCase): def test_service(self): sot = image_service.ImageService() self.assertEqual('image', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(2, len(sot.valid_versions)) diff --git a/openstack/tests/unit/key_management/test_key_management_service.py b/openstack/tests/unit/key_management/test_key_management_service.py index c731451b0..7f0d5b60b 100644 --- a/openstack/tests/unit/key_management/test_key_management_service.py +++ b/openstack/tests/unit/key_management/test_key_management_service.py @@ -20,7 +20,7 @@ class TestKeyManagementService(testtools.TestCase): def test_service(self): sot = key_management_service.KeyManagementService() self.assertEqual('key-manager', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/message/test_message_service.py b/openstack/tests/unit/message/test_message_service.py index 5408eea7e..7ba6626d2 100644 --- a/openstack/tests/unit/message/test_message_service.py +++ b/openstack/tests/unit/message/test_message_service.py @@ -20,7 +20,7 @@ class TestMessageService(testtools.TestCase): def test_service(self): sot = message_service.MessageService() self.assertEqual('messaging', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/metric/test_metric_service.py b/openstack/tests/unit/metric/test_metric_service.py index e55f39612..acb846b3a 100644 --- a/openstack/tests/unit/metric/test_metric_service.py +++ b/openstack/tests/unit/metric/test_metric_service.py @@ -20,7 +20,7 @@ class TestMetricService(testtools.TestCase): def test_service(self): sot = metric_service.MetricService() self.assertEqual('metric', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/network/test_network_service.py b/openstack/tests/unit/network/test_network_service.py index b888c1043..22980fe36 100644 --- a/openstack/tests/unit/network/test_network_service.py +++ b/openstack/tests/unit/network/test_network_service.py @@ -20,7 +20,7 @@ class TestNetworkService(testtools.TestCase): def test_service(self): sot = network_service.NetworkService() self.assertEqual('network', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/object_store/test_object_store_service.py b/openstack/tests/unit/object_store/test_object_store_service.py index 96b2af666..a2707a134 100644 --- a/openstack/tests/unit/object_store/test_object_store_service.py +++ b/openstack/tests/unit/object_store/test_object_store_service.py @@ -20,7 +20,7 @@ class TestObjectStoreService(testtools.TestCase): def test_service(self): sot = object_store_service.ObjectStoreService() self.assertEqual('object-store', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/orchestration/test_orchestration_service.py b/openstack/tests/unit/orchestration/test_orchestration_service.py index 54ca77795..97ee3bdde 100644 --- a/openstack/tests/unit/orchestration/test_orchestration_service.py +++ b/openstack/tests/unit/orchestration/test_orchestration_service.py @@ -20,7 +20,7 @@ class TestOrchestrationService(testtools.TestCase): def test_service(self): sot = orchestration_service.OrchestrationService() self.assertEqual('orchestration', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/telemetry/test_telemetry_service.py b/openstack/tests/unit/telemetry/test_telemetry_service.py index 56e0f0d6d..acc7da94c 100644 --- a/openstack/tests/unit/telemetry/test_telemetry_service.py +++ b/openstack/tests/unit/telemetry/test_telemetry_service.py @@ -20,7 +20,7 @@ class TestTelemetryService(testtools.TestCase): def test_service(self): sot = telemetry_service.TelemetryService() self.assertEqual('metering', sot.service_type) - self.assertEqual('public', sot.visibility) + self.assertEqual('public', sot.interface) self.assertIsNone(sot.region) self.assertIsNone(sot.service_name) self.assertEqual(1, len(sot.valid_versions)) diff --git a/openstack/tests/unit/test_profile.py b/openstack/tests/unit/test_profile.py index 177e7c767..5caf353c4 100644 --- a/openstack/tests/unit/test_profile.py +++ b/openstack/tests/unit/test_profile.py @@ -77,8 +77,8 @@ class TestProfile(base.TestCase): prof = profile.Profile() prof.set_name(prof.ALL, 'fee') prof.set_region(prof.ALL, 'fie') - prof.set_visibility(prof.ALL, 'public') + prof.set_interface(prof.ALL, 'public') for service in prof.service_names: self.assertEqual('fee', prof.get_preference(service).service_name) self.assertEqual('fie', prof.get_preference(service).region) - self.assertEqual('public', prof.get_preference(service).visibility) + self.assertEqual('public', prof.get_preference(service).interface)