From ec2276ccc549ee080581f83e8132e814b4856567 Mon Sep 17 00:00:00 2001 From: peusterm Date: Wed, 30 Aug 2017 10:03:51 +0200 Subject: [PATCH] OS API fixes, but v3.0 auth not fully supported right now. fallback to v2.0 --- .../openstack/openstack_dummies/keystone_dummy_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py b/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py index 58f56d8..ea7ae45 100755 --- a/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py +++ b/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py @@ -16,8 +16,8 @@ class KeystoneDummyApi(BaseOpenstackDummy): self.api.add_resource(Shutdown, "/shutdown") self.api.add_resource(KeystoneShowAPIv2, "/v2.0", resource_class_kwargs={'api': self}) self.api.add_resource(KeystoneGetToken, "/v2.0/tokens", resource_class_kwargs={'api': self}) - self.api.add_resource(KeystoneShowAPIv3, "/v3", resource_class_kwargs={'api': self}) - self.api.add_resource(KeystoneGetTokenv3, "/v3/auth/tokens", resource_class_kwargs={'api': self}) + self.api.add_resource(KeystoneShowAPIv3, "/v3.0", resource_class_kwargs={'api': self}) + self.api.add_resource(KeystoneGetTokenv3, "/v3.0/auth/tokens", resource_class_kwargs={'api': self}) def _start_flask(self): LOG.info("Starting %s endpoint @ http://%s:%d" % (__name__, self.ip, self.port)) @@ -150,13 +150,13 @@ class KeystoneShowAPIv3(Resource): "media-types": [ { "base": "application/json", - "type": "application/vnd.openstack.identity-v2.0+json" + "type": "application/vnd.openstack.identity-v3.0+json" } ], - "id": "v2.0", + "id": "v3.0", "links": [ { - "href": "http://%s:%d/v2.0" % (get_host(request), self.api.port), + "href": "http://%s:%d/v3.0" % (get_host(request), self.api.port), "rel": "self" } ] -- 2.25.1