summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@redhat.com>2013-12-06 12:37:27 +0100
committerImre Farkas <ifarkas@redhat.com>2013-12-06 14:30:13 +0100
commit7d1eec06cfc1f7dd28e8f0f1d404692395e7a0f3 (patch)
treeb7d028c1178286792517bef2c8d902df8c836c6e
parent127e0195ad8b870a97ceaa6344c40e720d9db4b6 (diff)
downloadtuskar-ui-7d1eec06cfc1f7dd28e8f0f1d404692395e7a0f3.tar.gz
Delete REMOTE_NOVA_BAREMETAL_CREDS0.0.6
Tuskar-ui should use the Nova instance registered with the service catalog instead of a remote instance as was the case for POC. This makes the REMOTE_NOVA_BAREMETAL_CREDS option unnecessary. Change-Id: I17eb720ad5261f687bbe83f2b630db657cfcaa3b
-rw-r--r--docs/install.rst21
-rw-r--r--local_settings.py.example11
-rw-r--r--tuskar_ui/api.py50
3 files changed, 14 insertions, 68 deletions
diff --git a/docs/install.rst b/docs/install.rst
index 1defc8d5..fe4307b1 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -99,27 +99,6 @@ editor. You will want to customize several settings:
OpenStack server to change them.)
- ``TUSKAR_ENDPOINT_URL`` should point to the Tuskar server you
configured. It normally runs on port 8585.
-- ``REMOTE_NOVA_BAREMETAL_CREDS`` is optional. It's a dictionary of settings
- for connecting to a remote Nova Baremetal. If not set, this information is
- gathered from Keystone's service catalog, but a common configuration with
- Tuskar and friends is to have Nova Baremetal reachable only from certain
- machines, so the credentials are held separately right now. The
- ``user``, ``password``, and ``tenant`` settings will very likely
- match those of Keystone, and ``auth_url`` may also be the same.
- ``bypass_url`` points directly to the Nova Baremetal API, with the
- last parameter in the URL being your tenant ID.
-
-You can find the tenant ID by running the following from the command
-line:
-
-::
-
- keystone --os-username=USERNAME --os-password=PASSWORD --os-tenant-name=TENANTNAME --os-auth-url=http://AUTHURL:5000/v2.0/ tenant-list
-
-and selecting the id column that matches your tenant name.
-
-(Of course, substituting the appropriate values in for ``USERNAME``,
-``PASSWORD``, ``TENANTNAME`` and ``AUTHURL``)
Final setup
-----------
diff --git a/local_settings.py.example b/local_settings.py.example
index ac2ec28b..1e57b471 100644
--- a/local_settings.py.example
+++ b/local_settings.py.example
@@ -381,17 +381,6 @@ SECURITY_GROUP_RULES = {
TUSKAR_ENDPOINT_URL = "http://127.0.0.1:8585"
-# The REMOTE_NOVA_BAREMETAL_CREDS settings can be used to connect to a remote
-# Nova Baremetal instance instead of the one defined in the Keystone service
-# catalog.
-# REMOTE_NOVA_BAREMETAL_CREDS = {
-# 'user': 'admin',
-# 'password': 'password',
-# 'tenant': 'admin',
-# 'auth_url': 'http://localhost:5000/v2.0/',
-# 'bypass_url': 'http://<OS_AUTH_HOST>:8774/v2/<ADMIN_TENANT_ID>'
-# }
-
OVERCLOUD_CREDS = {
'user': 'admin',
'password': 'password',
diff --git a/tuskar_ui/api.py b/tuskar_ui/api.py
index 13df4ca9..ca283e65 100644
--- a/tuskar_ui/api.py
+++ b/tuskar_ui/api.py
@@ -32,9 +32,6 @@ from tuskar_ui.cached_property import cached_property # noqa
LOG = logging.getLogger(__name__)
TUSKAR_ENDPOINT_URL = getattr(django.conf.settings, 'TUSKAR_ENDPOINT_URL')
-REMOTE_NOVA_BAREMETAL_CREDS = getattr(django.conf.settings,
- 'REMOTE_NOVA_BAREMETAL_CREDS',
- False)
OVERCLOUD_CREDS = getattr(django.conf.settings, 'OVERCLOUD_CREDS', False)
@@ -46,39 +43,20 @@ def tuskarclient(request):
def baremetalclient(request):
- def create_remote_nova_client_baremetal():
- nc = nova.nova_client.Client(
- REMOTE_NOVA_BAREMETAL_CREDS['user'],
- REMOTE_NOVA_BAREMETAL_CREDS['password'],
- REMOTE_NOVA_BAREMETAL_CREDS['tenant'],
- auth_url=REMOTE_NOVA_BAREMETAL_CREDS['auth_url'],
- bypass_url=REMOTE_NOVA_BAREMETAL_CREDS['bypass_url'],
- )
- return nc
-
- def create_nova_client_baremetal():
- insecure = getattr(django.conf.settings, 'OPENSTACK_SSL_NO_VERIFY',
- False)
- nc = nova.nova_client.Client(
- request.user.username,
- request.user.token.id,
- project_id=request.user.tenant_id,
- auth_url=base.url_for(request, 'compute'),
- insecure=insecure,
- http_log_debug=django.conf.settings.DEBUG)
- nc.client.auth_token = request.user.token.id
- nc.client.management_url = base.url_for(request, 'compute')
-
- return nc
-
- if REMOTE_NOVA_BAREMETAL_CREDS:
- LOG.debug('remote nova baremetal client connection created')
- nc = create_remote_nova_client_baremetal()
- else:
- LOG.debug('nova baremetal client connection created using token "%s" '
- 'and url "%s"' %
- (request.user.token.id, base.url_for(request, 'compute')))
- nc = create_nova_client_baremetal()
+ insecure = getattr(django.conf.settings, 'OPENSTACK_SSL_NO_VERIFY', False)
+ nc = nova.nova_client.Client(
+ request.user.username,
+ request.user.token.id,
+ project_id=request.user.tenant_id,
+ auth_url=base.url_for(request, 'compute'),
+ insecure=insecure,
+ http_log_debug=django.conf.settings.DEBUG)
+ nc.client.auth_token = request.user.token.id
+ nc.client.management_url = base.url_for(request, 'compute')
+
+ LOG.debug('nova baremetal client connection created using token "%s" '
+ 'and url "%s"' %
+ (request.user.token.id, base.url_for(request, 'compute')))
return baremetal.BareMetalNodeManager(nc)