Don't allow users to set all API versions the same
Setting all API versions to be the same is totally unrealistic. As such it's confusing to have code that allows something that's totally unrealistic. Let's remove things that will never ever happen. Change-Id: Ie7cab8ec60b17262183e034d01bb648d28bb7ad1
This commit is contained in:
parent
06ac942a8d
commit
faf22a1832
|
@ -190,12 +190,7 @@ class Profile(object):
|
|||
:param str service: Service type.
|
||||
:param str version: Desired service version.
|
||||
"""
|
||||
if service == self.ALL:
|
||||
services = self.service_names
|
||||
else:
|
||||
services = [service]
|
||||
for service in services:
|
||||
self._get_service(service).version = version
|
||||
self._get_service(service).version = version
|
||||
|
||||
def set_visibility(self, service, visibility):
|
||||
"""Set the desired visibility for the specified service.
|
||||
|
|
|
@ -77,10 +77,8 @@ class TestProfile(base.TestCase):
|
|||
prof = profile.Profile()
|
||||
prof.set_name(prof.ALL, 'fee')
|
||||
prof.set_region(prof.ALL, 'fie')
|
||||
prof.set_version(prof.ALL, 'foe')
|
||||
prof.set_visibility(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('foe', prof.get_preference(service).version)
|
||||
self.assertEqual('public', prof.get_preference(service).visibility)
|
||||
|
|
Loading…
Reference in New Issue