VMware Cloud Community
ivanmantilla
Contributor
Contributor

Configure an external VCO Server with a vCO workflow

We are working on a vCO workflow that creates a vCAC tenant and all the required entities by itself. At this point we managed to create almost everything but now we need to configure an external vCO Server to the tenant, we are not going to use the default vCO.

48681_48681.pngserver configuration.png

There is any way we could use vRO to change the default Orchestrator server automaticly, since we could not find any entity or resource we could use to do this?

0 Kudos
1 Reply
gmuleshkov
VMware Employee
VMware Employee

To configure external vCO I think that you can try to create a new workflow and use something like this:

var configurations = configurationService.getConfigurations(host.tenant);

var configuration = new vCACCAFEConfiguration();

if(configurations[0].getId() != null) {

    configuration.setId(configurations[0].getId());

}

if(useDefault == true) {

    var urlVariables = [

        host.tenant

    ];

    System.log("Updating ASD server configuration...");

    asdClient.putWithVariables("tenants/{tenantId}/configurations/default" ,"" ,urlVariables);

    System.log("ASD server configuration updated.");

} else {

    configuration.setTenantId(host.tenant);

    configuration.setSystemDefault(false);

    configuration.setName(name);

    configuration.setDescription(description);

    configuration.setHost(orchestratorHost);

    configuration.setPort(port);

    if(useSSO == false) {

        configuration.setSsoMode(false);

        configuration.setUsername(username);

        configuration.setPassword(password);

    } else {

        configuration.setSsoMode(true);

    }

    System.log("Updating ASD server configuration...");

    configurationService.createOrUpdateConfiguration(host.tenant, configuration);

    System.log("ASD server configuration updated.");

}

The input of the workflow should be something similar to this:

48708_48708.pngInput.png

Hope this helps.

Regards,

Georgi

0 Kudos