summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/config/custom-environment-variables.yaml8
-rw-r--r--source/config/functest.yaml2
-rw-r--r--source/promise.yaml2
-rw-r--r--source/schema/opnfv-promise.yang4
-rw-r--r--source/spec/promise-intents.coffee27
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 ->