Last updated on March 13th, 2020 at 05:12 am
From my previous post, it gives example for php-opencloud for Openstack. You may using pkgcloud for nodeJS, so here is the example settings that you may need.
If you are using pkgcloud and was using API v2, you should update the code to v3. The documents doesn’t provide detail for the setting on OVH. So I make a copy in here.
Keystone API v2 for pgkcloud
var pkgcloud = require('pkgcloud');
var openstack = pkgcloud.storage.createClient({
provider: 'openstack',
region: '{region}',
username: '{username}',
password: '{password}',
authUrl: 'https://auth.cloud.ovh.net/',
});
You should change to the example below.
Keystone API v3 pkgcloud
var pkgcloud = require('pkgcloud');
var openstack = pkgcloud.storage.createClient({
provider: 'openstack',
keystoneAuthVersion: 'v3',
authUrl: 'https://auth.cloud.ovh.net/',
region: '{region}',
username: '{username}',
password: '{password}',
domainId: 'default',
domainName: '{projectID}',
});
You may use openstack.auth to test your identity access.
openstack.auth(function(err) {
if (err) {
console.error(err);
}
else {
console.log(openstack._identity);
}
});
You may read more from their documentation
- https://github.com/pkgcloud/pkgcloud/blob/master/lib/pkgcloud/openstack/context/identity.js
- https://auth.cloud.ovh.net/v3/
- https://docs.openstack.org/api-ref/identity/v3/index.html
Thank you for this post :)
What are the equivalent of domainName: ‘{projectID}’, in the V2 or what is it according to OVH specificity ?
Thanks
Quentin
It is tenantName, normally with 16 digits.
Thanks, saved me a lot of time!