Hi there,
not sure if this is the right place to post to or if the Chargeback forums are preferred, but I have a weird problem wrt new organization VDCs and Chargeback records: If I create an org VDC directly via vCloud Director UI, it turns up just fine in Chargeback under the appropriate allocation model (pay-as-you-go in my case), however if I create an org VDC with exactly the same parameters using this VCO workflow I don't see any entries in Chargeback and thus no VM resources are recorded:
// input params:
// - name (string): vdc name
// - providerVdc (Vcl: ProviderVdc): an existing provider VDC, selected from Inventory
// - vclCommonModule (Module): com.vmware.library.vCloud.common workflow module
// - org (Vcl: Organization): organization where the resulting VDC should be created
var params = new VclAdminVdcParams();
params.name = name;
params.description = name + " description";
params.isEnabled = true;
params.providerVdcReference = providerVdc.getReference();
params.allocationModel = VclAllocationModelType.ALLOCATIONVAPP;
params.isThinProvision = true;
params.usesFastProvisioning = false;
params.networkQuota = -1;
params.resourceGuaranteedCpu = 0;
params.resourceGuaranteedMemory = 1;
params.vCpuInMhz = 2000;
var storageCapacity = new VclCapacityWithUsage();
storageCapacity.units = "MB";
storageCapacity.allocated = 0;
params.storageCapacity = storageCapacity;
var computeCapacity = new VclComputeCapacity();
var cpuc = new VclCapacityWithUsage();
var memoryc = new VclCapacityWithUsage();
cpuc.units = "MHz";
cpuc.allocated = 0;
memoryc.units = "MB";
memoryc.allocated = 0;
computeCapacity.memory = memoryc;
computeCapacity.cpu = cpuc;
computeCapacity.memory = memoryc;
params.computeCapacity = computeCapacity;
var adminVdc = System.getModule("com.vmware.library.vCloud.Admin.Vdc").createAdminVdc(org, params);
if (adminVdc.tasks != null) {
var task = adminVdc.tasks.getTasks()[0];
vclCommonModule.VclWaitTaskEnd(task, 1, 0);
}
org.updateInternalState();
var vdcOut = adminVdc.toUserObject();
vdcOut.updateInternalState();
System.log("vdc: " + vdcOut.name);
So is there anything else I'm missing here?
Regards,
Igor