diff options
| author | Richard Theis <rtheis@us.ibm.com> | 2015-12-02 14:43:01 -0600 |
|---|---|---|
| committer | Richard Theis <rtheis@us.ibm.com> | 2016-01-04 13:49:49 -0600 |
| commit | 57dac0bc3add71d6c491e2cecc60ef756b75ac32 (patch) | |
| tree | 5d9194944724b4ff8448649180c5ac4b7ed8e020 /openstackclient/tests/fakes.py | |
| parent | 74a0b2a1901f8ba31ce9faee7ab18a48c6e558f9 (diff) | |
| download | python-openstackclient-57dac0bc3add71d6c491e2cecc60ef756b75ac32.tar.gz | |
Refactor network endpoint enablement checking
Move the network endpoint enablement checking from the 'server create'
command to the common client manager. This allows future network
commands to use either nova or neutron networking based on the cloud
environment.
This patch set also includes related unit test enhancements to the
common client manager to trigger authentication on the tests.
Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b
Related-Bug: #1519511
Related-to: blueprint neutron-client
Diffstat (limited to 'openstackclient/tests/fakes.py')
| -rw-r--r-- | openstackclient/tests/fakes.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/openstackclient/tests/fakes.py b/openstackclient/tests/fakes.py index 9f4dcc50..718dff69 100644 --- a/openstackclient/tests/fakes.py +++ b/openstackclient/tests/fakes.py @@ -34,7 +34,15 @@ VERSION = "3" TEST_RESPONSE_DICT = fixture.V2Token(token_id=AUTH_TOKEN, user_name=USERNAME) _s = TEST_RESPONSE_DICT.add_service('identity', name='keystone') -_s.add_endpoint(AUTH_URL + '/v2.0') +_s.add_endpoint(AUTH_URL + ':5000/v2.0') +_s = TEST_RESPONSE_DICT.add_service('network', name='neutron') +_s.add_endpoint(AUTH_URL + ':9696') +_s = TEST_RESPONSE_DICT.add_service('compute', name='nova') +_s.add_endpoint(AUTH_URL + ':8774/v2') +_s = TEST_RESPONSE_DICT.add_service('image', name='glance') +_s.add_endpoint(AUTH_URL + ':9292') +_s = TEST_RESPONSE_DICT.add_service('object', name='swift') +_s.add_endpoint(AUTH_URL + ':8080/v1') TEST_RESPONSE_DICT_V3 = fixture.V3Token(user_name=USERNAME) TEST_RESPONSE_DICT_V3.set_project_scope() @@ -103,6 +111,7 @@ class FakeClientManager(object): self.session = None self.auth_ref = None self.auth_plugin_name = None + self.network_endpoint_enabled = True def get_configuration(self): return { @@ -115,6 +124,9 @@ class FakeClientManager(object): 'identity_api_version': VERSION, } + def is_network_endpoint_enabled(self): + return self.network_endpoint_enabled + class FakeModule(object): def __init__(self, name, version): |
