Enable Keystone v3 endpoints for Inspector
Change-Id: Iaa6d1b9dcca401987ac5f8ccc37e337736905b92 Closes-Bug: #1531236
This commit is contained in:
parent
1350b06b16
commit
40c17e30fc
@ -154,7 +154,7 @@ function configure_inspector {
|
||||
|
||||
cp "$IRONIC_INSPECTOR_DIR/example.conf" "$IRONIC_INSPECTOR_CONF_FILE"
|
||||
inspector_iniset DEFAULT debug $IRONIC_INSPECTOR_DEBUG
|
||||
inspector_iniset ironic os_auth_url "$KEYSTONE_SERVICE_URI/v2.0"
|
||||
inspector_iniset ironic os_auth_url "$KEYSTONE_SERVICE_URI"
|
||||
inspector_iniset ironic os_username $IRONIC_INSPECTOR_ADMIN_USER
|
||||
inspector_iniset ironic os_password $SERVICE_PASSWORD
|
||||
inspector_iniset ironic os_tenant_name $SERVICE_TENANT_NAME
|
||||
|
@ -15,7 +15,7 @@ import socket
|
||||
import unittest
|
||||
|
||||
from ironicclient import client
|
||||
import keystoneclient.v2_0.client as keystone_client
|
||||
from keystoneclient import client as keystone_client
|
||||
from keystonemiddleware import auth_token
|
||||
from oslo_config import cfg
|
||||
|
||||
@ -70,7 +70,7 @@ class TestCheckAuth(base.BaseTest):
|
||||
CONF.set_override('admin_user', 'admin', 'keystone_authtoken')
|
||||
CONF.set_override('admin_tenant_name', 'admin', 'keystone_authtoken')
|
||||
CONF.set_override('admin_password', 'password', 'keystone_authtoken')
|
||||
CONF.set_override('auth_uri', 'http://127.0.0.1:5000/v2.0',
|
||||
CONF.set_override('auth_uri', 'http://127.0.0.1:5000',
|
||||
'keystone_authtoken')
|
||||
CONF.set_override('identity_uri', 'http://127.0.0.1:35357',
|
||||
'keystone_authtoken')
|
||||
@ -87,7 +87,7 @@ class TestCheckAuth(base.BaseTest):
|
||||
self.assertEqual('admin', args1['admin_tenant_name'])
|
||||
self.assertEqual('password', args1['admin_password'])
|
||||
self.assertTrue(args1['delay_auth_decision'])
|
||||
self.assertEqual('http://127.0.0.1:5000/v2.0', args1['auth_uri'])
|
||||
self.assertEqual('http://127.0.0.1:5000', args1['auth_uri'])
|
||||
self.assertEqual('http://127.0.0.1:35357', args1['identity_uri'])
|
||||
|
||||
@mock.patch.object(auth_token, 'AuthProtocol')
|
||||
|
@ -16,7 +16,7 @@ import socket
|
||||
|
||||
import eventlet
|
||||
from ironicclient import client
|
||||
import keystoneclient.v2_0.client as keystone_client
|
||||
from keystoneclient import client as keystone_client
|
||||
from keystonemiddleware import auth_token
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
@ -82,6 +82,9 @@ def get_client(token=None,
|
||||
'auth_url': CONF.ironic.os_auth_url,
|
||||
'tenant_name': CONF.ironic.os_tenant_name}
|
||||
keystone = keystone_client.Client(**keystone_creds)
|
||||
# FIXME(sambetts): Work around for Bug 1539839 as client.authenticate
|
||||
# is not called.
|
||||
keystone.authenticate()
|
||||
ironic_url = keystone.service_catalog.url_for(
|
||||
service_type=CONF.ironic.os_service_type,
|
||||
endpoint_type=CONF.ironic.os_endpoint_type)
|
||||
|
Loading…
Reference in New Issue
Block a user