diff options
author | Bertrand Souville <souville@docomolab-euro.com> | 2017-10-02 16:27:15 +0200 |
---|---|---|
committer | Gerald Kunzmann <kunzmann@docomolab-euro.com> | 2017-10-02 15:11:33 +0000 |
commit | 5698eda65d99786a9668bd00e49b5a158be90c35 (patch) | |
tree | c5f83915a268f2b6d4e1f782b00ee521b9c6f1d8 /source | |
parent | de3619244e2f050fc03de7c7fec2d17182f343cb (diff) |
Added support for Keystone v3
JIRA: PROMISE-80
Modified Promise shim-layer as well
Change-Id: I82340a6af5c3e6056e77323ca5c44ecdf4e109b6
Signed-off-by: Bertrand Souville <souville@docomolab-euro.com>
(cherry picked from commit a8cd506d6759833231b1b8806082d793faf0997a)
Diffstat (limited to 'source')
-rw-r--r-- | source/config/custom-environment-variables.yaml | 8 | ||||
-rw-r--r-- | source/config/functest.yaml | 2 | ||||
-rw-r--r-- | source/promise.yaml | 2 | ||||
-rw-r--r-- | source/schema/opnfv-promise.yang | 4 | ||||
-rw-r--r-- | source/spec/promise-intents.coffee | 27 |
5 files changed, 29 insertions, 14 deletions
diff --git a/source/config/custom-environment-variables.yaml b/source/config/custom-environment-variables.yaml index 30a72d2..001e799 100644 --- a/source/config/custom-environment-variables.yaml +++ b/source/config/custom-environment-variables.yaml @@ -11,11 +11,13 @@ openstack: auth: endpoint: OS_AUTH_URL strategy: OS_AUTH_STRATEGY - tenant: - id: OS_TENANT_ID - name: OS_TENANT_NAME + project: + id: OS_PROJECT_ID + name: OS_PROJECT_NAME + domain-name: OS_PROJECT_DOMAIN_NAME username: OS_USERNAME password: OS_PASSWORD + user-domain-name: OS_USER_DOMAIN_NAME test: image: OS_TEST_IMAGE flavor: OS_TEST_FLAVOR diff --git a/source/config/functest.yaml b/source/config/functest.yaml index 8cc84d3..6655fc4 100644 --- a/source/config/functest.yaml +++ b/source/config/functest.yaml @@ -5,5 +5,5 @@ opnfv-functest: images: - name: cirros - path: /home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img + path: /home/opnfv/functest/images/cirros-0.3.5-x86_64-disk.img diff --git a/source/promise.yaml b/source/promise.yaml index be12082..98dcdc4 100644 --- a/source/promise.yaml +++ b/source/promise.yaml @@ -255,7 +255,7 @@ complex-type: services.forEach (service) => switch service.type when 'compute' - url = service.endpoints[0].publicURL + url = service.endpoints[0].url @set 'services.compute.endpoint', url request .get "#{url}/limits" diff --git a/source/schema/opnfv-promise.yang b/source/schema/opnfv-promise.yang index b606382..9ee7564 100644 --- a/source/schema/opnfv-promise.yang +++ b/source/schema/opnfv-promise.yang @@ -620,9 +620,11 @@ module opnfv-promise { default "http://localhost:5000/v2.0"; } } - container tenant { + leaf user-domain-name { type string; } + container project { leaf id { type string; } leaf name { type string; } + leaf domain-name { type string; } } } output { diff --git a/source/spec/promise-intents.coffee b/source/spec/promise-intents.coffee index afb0e24..4fad0b1 100644 --- a/source/spec/promise-intents.coffee +++ b/source/spec/promise-intents.coffee @@ -320,9 +320,19 @@ module.exports = payload = switch input.get 'provider-type' when 'openstack' auth: - tenantId: input.get 'tenant.id' - tenantName: input.get 'tenant.name' - passwordCredentials: input.get 'username', 'password' + identity: + methods: [ "password" ] + password: + user: + name: input.get 'username' + password: input.get 'password' + domain: + name: input.get 'user-domain-name' + scope: + project: + name: input.get 'project.name' + domain: + name: input.get 'project.domain-name' unless payload? return done 'Sorry, only openstack supported at this time' @@ -330,7 +340,7 @@ module.exports = url = input.get 'endpoint' switch input.get 'strategy' when 'keystone', 'oauth' - url += '/tokens' unless /\/tokens$/.test url + url += '/auth/tokens' unless /\/tokens$/.test url providers = @access 'promise.providers' request @@ -340,11 +350,12 @@ module.exports = .end (err, res) => if err? or !res.ok then return done res.error #console.log JSON.stringify res.body, null, 2 - access = res.body.access + console.log res.headers + console.log res.body.token.catalog provider = @create 'ResourceProvider', - token: access?.token?.id - name: access?.token?.tenant?.name - provider.invoke 'update', access.serviceCatalog + token: res.headers['x-subject-token'] + name: res.body.token.project.name + provider.invoke 'update', res.body.token.catalog .then (res) -> res.save() .then -> |