Use these automation scripts to perform command line operations to configure your vCloud extension with Cohesity. These could even be integrated in your development environment to automate the tenant mapping process in vCD.
- Node v10+ Download
- Cohesity vCD extension must be installed.
- Run
npm install
to install all the required dependencies.
To add a new VCD-Cohesity tenant mapping to an existing endpoint configuration, run
const mapper = require('cs-vcd-mapping');
m.mapTenants({
href: 'https://vcd-host.com',
vcdUsername: '<provider-user>',
vcdPassword: '<provider-user-password>',
endpointName: '<endpoint-name>',
csTenantName: '<cohesity-tenant-name>',
vcdTenantName: '<vcd-tenant-name>',
csUsername: '<cohesity-tenant-user-id>',
csUserPassword: '<cohesity-tenant-user-password>',
csUserDomain: '<cohesity-tenant-user-domain>',
encryptionPassword: '<encryption-password>'
}).catch(err => {
console.error(err);
});
To remove an existing tenant mapping from an endpoint config, run
const mapper = require('cs-vcd-mapping');
mapper.unmapTenants({
href: 'https://vcd-host.com',
vcdUsername: '<provider-user>',
vcdPassword: '<provider-user-password>',
endpointName: '<endpoint-name>',
vcdTenantName: '<vcd-tenant-name>',
encryptionPassword: '<encryption-password>'
}).catch(err => {
console.error(err);
});
To get the currently mapped tenants in an endpoint
const mapper = require('cs-vcd-mapping');
mapper.listMappingDetails({
href: 'https://vcd-host.com',
vcdUsername: '<provider-user>',
vcdPassword: '<provider-user-password>',
endpointName: '<endpoint-name>',
encryptionPassword: '<encryption-password>'
}).then(list => {
console.log(list);
})
Request support for encryption password.
We love to hear from you. Please send your feedback and suggestions to support@cohesity.com