adding some buggy bugs and updates from keystone/novaclient
This commit is contained in:
parent
10d738aad2
commit
b0ae2ef547
@ -36,4 +36,33 @@ Until this is fixed you need to mod python-novaclient after it gets downloaded v
|
||||
TWO:
|
||||
|
||||
funkyness w/ the extensions. the extensions url itself wont load. Seems to have to do with authorization & tenants.
|
||||
* mitigated in reddwarf/common/extensions.py, see for more information
|
||||
* mitigated in reddwarf/common/extensions.py, see for more information
|
||||
|
||||
|
||||
keystone haves issues with the get endpoints method and causing NotImplementedError/ClientException HTTP/500:
|
||||
###### BEGIN PATCH
|
||||
diff --git a/keystone/service.py b/keystone/service.py
|
||||
index d0d4470..4feb966 100644
|
||||
--- a/keystone/service.py
|
||||
+++ b/keystone/service.py
|
||||
@@ -408,8 +408,17 @@ class TokenController(wsgi.Application):
|
||||
self.token_api.delete_token(context=context, token_id=token_id)
|
||||
|
||||
def endpoints(self, context, token_id):
|
||||
- """Return a list of endpoints available to the token."""
|
||||
- raise NotImplementedError()
|
||||
+ """Return service catalog endpoints."""
|
||||
+ try:
|
||||
+ token_ref = self.token_api.get_token(context=context,
|
||||
+ token_id=token_id)
|
||||
+ except exception.NotFound:
|
||||
+ raise exception.Unauthorized()
|
||||
+
|
||||
+ catalog_ref = self.catalog_api.get_catalog(context,
|
||||
+ token_ref['user']['id'],
|
||||
+ token_ref['tenant']['id'])
|
||||
+ return {'token': {'serviceCatalog': self._format_catalog(catalog_ref)}}
|
||||
|
||||
def _format_authenticate(self, token_ref, roles_ref, catalog_ref):
|
||||
o = self._format_token(token_ref, roles_ref)
|
||||
###### END PATCH
|
@ -32,10 +32,18 @@ REDDWARF_ROLE=`get_id keystone --endpoint http://localhost:35357/v2.0 --token be
|
||||
keystone --endpoint http://localhost:35357/v2.0 --token be19c524ddc92109a224 user-role-add --tenant_id $REDDWARF_TENANT \
|
||||
--user $REDDWARF_USER \
|
||||
--role $REDDWARF_ROLE
|
||||
# These are the values
|
||||
REDDWARF_TENANT=reddwarf
|
||||
echo $REDDWARF_TENANT
|
||||
echo $REDDWARF_USER
|
||||
echo $REDDWARF_ROLE
|
||||
|
||||
# These all need to be set tenant did not work with the id but the name did match in the auth shim.
|
||||
# REDDWARF_TOKEN=
|
||||
|
||||
# Now attempt a login
|
||||
curl -d '{"auth":{"passwordCredentials":{"username": "reddwarf", "password": "REDDWARF-PASS"},"tenantName":"reddwarf"}}' \
|
||||
-H "Content-type: application/json" http://localhost:35357/v2.0/tokens
|
||||
-H "Content-type: application/json" http://localhost:35357/v2.0/tokens | python -mjson.tool
|
||||
|
||||
# now get a list of instances, which connects over python-novaclient to nova
|
||||
# NOTE THIS AUTH TOKEN NEEDS TO BE CHANGED
|
||||
@ -49,4 +57,6 @@ curl -d '{"auth":{"passwordCredentials":{"username": "reddwarf", "password": "RE
|
||||
# bin/reddwarf-manage --config-file=etc/reddwarf/reddwarf.conf.sample db_sync
|
||||
|
||||
# Also, you should start up the api node like this
|
||||
# bin/reddwarf-server --config-file=etc/reddwarf/reddwarf.conf.sample
|
||||
# bin/reddwarf-server --config-file=etc/reddwarf/reddwarf.conf.sample
|
||||
|
||||
|
||||
|
@ -33,6 +33,7 @@ PROXY_ADMIN_USER = config.Config.get('reddwarf_proxy_admin_user', 'admin')
|
||||
PROXY_ADMIN_PASS = config.Config.get('reddwarf_proxy_admin_pass', '3de4922d8b6ac5a1aad9')
|
||||
PROXY_ADMIN_TENANT_NAME = config.Config.get('reddwarf_proxy_admin_tenant_name', 'admin')
|
||||
PROXY_AUTH_URL = config.Config.get('reddwarf_auth_url', 'http://0.0.0.0:5000/v2.0')
|
||||
PROXY_TENANT_ID = config.Config.get('reddwarf_tenant_id', 'f5f71240a97c411e977452370422d7cc')
|
||||
|
||||
class ModelBase(object):
|
||||
|
||||
@ -80,7 +81,12 @@ class RemoteModelBase(ModelBase):
|
||||
@classmethod
|
||||
def get_client(cls, proxy_token):
|
||||
client = Client(PROXY_ADMIN_USER, PROXY_ADMIN_PASS,
|
||||
PROXY_ADMIN_TENANT_NAME, PROXY_AUTH_URL, token=proxy_token)
|
||||
PROXY_ADMIN_TENANT_NAME, PROXY_AUTH_URL,
|
||||
proxy_tenant_id=PROXY_TENANT_ID,
|
||||
proxy_token=proxy_token,
|
||||
region_name='RegionOne',
|
||||
service_type='compute',
|
||||
service_name="'Compute Service'")
|
||||
client.authenticate()
|
||||
return client
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user