logger.info("OS_AUTH_URL: %s" % os.environ["OS_AUTH_URL"])
logger.info("OS_IDENTITY_API_VERSION: %s " %
os.environ["OS_IDENTITY_API_VERSION"])
+ logger.info("OS_USER_DOMAIN_NAME: %s" %
+ os.environ["OS_USER_DOMAIN_NAME"])
+ logger.info("OS_PROJECT_DOMAIN_NAME: %s" %
+ os.environ["OS_PROJECT_DOMAIN_NAME"])
except KeyError:
logger.error("Please set the OS environment variables")
os.environ["OS_TEST_IMAGE"] = image_id
os.environ["OS_TEST_FLAVOR"] = flavor_id
os.environ["OS_TEST_NETWORK"] = network_dic["net_id"]
- os.environ["OS_TENANT_NAME"] = PROMISE_TENANT_NAME
+ os.environ["OS_PROJECT_NAME"] = PROMISE_PROJECT_NAME
os.environ["OS_USERNAME"] = PROMISE_USER_NAME
os.chdir(PROMISE_REPO_DIR + '/source/')
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'
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
.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 ->