Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

vCloud plugin 5.1 create a new Vdc problem

$
0
0

Hi,

 

I need your help once again with a problem with vCloud plugin 5.1. I cannot create a new Organizational Vdc. It is related to the new objects because I do it in version 1.5.

 

There is a "createVdcStorageProfileParams" and a "createVdcStorageProfiles" but I can't find any "createVdcStorageProfile".

 

Can you help me please?

 

 

This is my code:

 

var cpuMHz = 2048;
var memMB = 4096;
var storageMB = 10240;
var vmQuota = 10;
//Compute Capacity
var cpuCapacity = System.getModule("com.vmware.library.vCloud.schema.objects").createCapacityWithUsage(
cpuMHz,
cpuMHz,
0,
0,
"MHz",
0
);
var memCapacity = System.getModule("com.vmware.library.vCloud.schema.objects").createCapacityWithUsage(
memMB,
memMB,
0,
0,
"MB",
0
);
var computeCapacity = System.getModule("com.vmware.library.vCloud.schema.objects").createComputeCapacity(
cpuCapacity,
memCapacity
);
//Storage Profile
var storageProfileParams = System.getModule("com.vmware.library.vCloud.schema.objects").createVdcStorageProfileParams(
true,
true,
storageMB,
providerVdcStorageProfile, //this is a property of the workflow
"MB"
);
//this doesn't work, but I cannot found any "createVdcStorageProfile" method.
var storageProfiles = System.getModule("com.vmware.library.vCloud.schema.objects").createVdcStorageProfiles(
      [ storageProfileParams ] //vdcStorageProfileArg
      );
//Vdc Params
var adminVdcParams = System.getModule("com.vmware.library.vCloud.schema.objects").createAdminVdcParams(
     allocationModel, //this is a property of the workflow
     null, //availableNetworksArg, don't know what this is
     null, //capabilitiesArg, don't know what this is
     computeCapacity,
     description,
     enabled,
     thinProvision, //this is a property of the workflow
     name, ////this is an imput of the workflow
     networkPool, //this is a property of the workflow
     networkQuota, //this is a property of the workflow
     nicQuota, //this is a property of the workflow
     "", //operationKeyArg,
     providerVdc, //this is a property of the workflow
     null, //resourceEntitiesArg, dont know what this is
     resourcesGuaranteedCpu, //this is a property of the workflow
     resourcesGuaranteedMemory, //this is a property of the workflow
     0, //statusArg, don't know what this is
     storage,
     0, //usedNetworkCountArg,
     usesFastProvisioning, //this is a property of the workflow
     cpuMHz,
     storageProfiles, //this doesn't work
     null, //vendorServicesArg, don't know what this is
     vmQuota
);
var adminOrg = organization.toAdminObject();
adminVdc = adminOrg.addAdminVdc(adminVdcParams);
if (adminVdc.tasks != null) {
     task = adminVdc.tasks.getTasks()[0];
}
System.log("Vdc creado");

Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>