Merge "Adding version for neutronclient"
This commit is contained in:
commit
a503a82464
@ -50,7 +50,7 @@ neutron_opts = [
|
||||
keystone_opts = [
|
||||
cfg.StrOpt('auth_uri',
|
||||
default=os.environ.get('IDENTITY_URL',
|
||||
'http://127.0.0.1:35357'),
|
||||
'http://127.0.0.1:35357/v2.0'),
|
||||
help=_('The URL for accessing the identity service.')),
|
||||
cfg.StrOpt('admin_user',
|
||||
default=os.environ.get('SERVICE_USER'),
|
||||
|
@ -53,7 +53,7 @@ def neutron_client():
|
||||
password=password, auth_url=auth_uri)
|
||||
else:
|
||||
app.neutron = utils.get_neutron_client_simple(
|
||||
url=neutron_uri, token=auth_token)
|
||||
url=neutron_uri, auth_url=auth_uri, token=auth_token)
|
||||
|
||||
app.enable_dhcp = cfg.CONF.neutron_client.enable_dhcp
|
||||
app.neutron.format = 'json'
|
||||
|
@ -35,7 +35,7 @@ class ConfigurationTest(base.TestKuryrBase):
|
||||
self.assertEqual('http://127.0.0.1:9696',
|
||||
config.CONF.neutron_client.neutron_uri)
|
||||
|
||||
self.assertEqual('http://127.0.0.1:35357',
|
||||
self.assertEqual('http://127.0.0.1:35357/v2.0',
|
||||
config.CONF.keystone_client.auth_uri)
|
||||
|
||||
def test_check_for_neutron_ext_support_with_ex(self):
|
||||
|
@ -29,8 +29,10 @@ DOCKER_NETNS_BASE = '/var/run/docker/netns'
|
||||
PORT_POSTFIX = 'port'
|
||||
|
||||
|
||||
def get_neutron_client_simple(url, token):
|
||||
return client.Client('2.0', endpoint_url=url, token=token)
|
||||
def get_neutron_client_simple(url, auth_url, token):
|
||||
auths = auth_url.rsplit('/', 1)
|
||||
version = auths[1][1:]
|
||||
return client.Client(version, endpoint_url=url, token=token)
|
||||
|
||||
|
||||
def get_neutron_client(url, username, tenant_name, password,
|
||||
|
Loading…
Reference in New Issue
Block a user