6.2

Table 411. Input Variables
Variable Type
sourceHost string
targetHost string
var CONTENT_MANAGEMENT_SERVICE = "com.vmware.csp.core.content.service.api";
var content;
System.log("Source host: " + sourceHost.url);
System.log("Source tenant: " + sourceHost.tenant);
var contentClientExport = sourceHost.createRestClient(CONTENT_MANAGEMENT_SERVICE);
System.log("Exporting...");
content = contentClientExport.getFile("content");
System.log("Export successful");
System.log("Target host: " + targetHost.url);
System.log("Target tenant: " + targetHost.tenant);
var contentClientImport = targetHost.createRestClient(CONTENT_MANAGEMENT_SERVICE);
System.log("Importing...");
contentClientImport.postFile("content", content);
System.log("Import successful");
Chapter 4 Example vCloud Automation Center Plug-In Scripts
VMware, Inc. 35