OS API fixes, but v3.0 auth not fully supported right now. fallback to v2.0
authorpeusterm <manuel.peuster@uni-paderborn.de>
Wed, 30 Aug 2017 08:03:51 +0000 (10:03 +0200)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Wed, 30 Aug 2017 08:03:51 +0000 (10:03 +0200)
src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py

index 58f56d8..ea7ae45 100755 (executable)
@@ -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"
                 }
             ]