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.

server configuration.png

There is any way we could use vCO to create this server automaticly with vCO, since we could not find any entity or resource we could use to do this?

0 Kudos
2 Replies
SeanKohler
Expert
Expert

So that is only for your ASD connection, right?

Have you checked to see if there is a REST call when you run the update to the external orchestrator server (firebug in firefox works well)?  If there is, then you might be able to send it over parameterized from vRO during your tenant creation.  (I am not sure how the password would be handled.)

At least, I think I would look in this direction first... but one of the experts probably has a more definitive answer.

0 Kudos
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:

Input.png

Hope this helps.

Regards,

Georgi

0 Kudos