The HP Helion Cloud provider in pkgcloud supports the following services:
If this is your first time using HP Helion Cloud Services, please follow this guide to get started.
We've provided a simple compute example where it creates a couple of compute instances.
For all of the HP Cloud services, you create a client with the same options:
var client = require('pkgcloud').compute.createClient({
provider: 'hp',
username: 'your-user-name',
apiKey: 'your-api-key'
});
You can provision API keys in your cloud management console. Please see here for more instructions.
All of the HP createClient
calls have a few options that can be provided:
authUrl
specifies the authentication endpoint used to create a token for your HP client.
See here for more details : Regions
If you're targeting an HP Private Cloud instance, please contact your administrator for the authUrl.
var client = require('pkgcloud').compute.createClient({
provider: 'hp',
username: 'your-user-name',
apiKey: 'your-api-key',
region: 'region-a.geo-1',
authUrl: 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
});
var client = require('pkgcloud').compute.createClient({
provider: 'hp',
username: 'your-user-name',
apiKey: 'your-api-key',
region: 'region-b.geo-1',
authUrl: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
});
region
specifies which region of a service to use. HP has services deployed in multiple regions.
See here for more details : Regions
If you're targeting an HP Private Cloud instance, please contact your administrator for region names.
var client = require('pkgcloud').compute.createClient({
provider: 'hp',
username: 'your-user-name',
apiKey: 'your-api-key',
region: 'region-a.custom.corp'
});
When you make your first call to a HP provider, your client is authenticated transparent to your API call. HP will issue you a token, with an expiration. When that token expires, the client will automatically re-authenticate and retrieve a new token. The caller shouldn't have to worry about this happening.