Can someone please advise how I can add a new storage policy to an existing VDC? I've got this code snippet that doesn't work. It throws an exception that parameter 'source' is required.
ReferenceType referenceType = GetProviderVdcRef(out errorMessage);
ProviderVdc providerVdc = ProviderVdc.GetProviderVdcByReference(_client, referenceType);
List<ReferenceType> providerVdcStorageProfiles = providerVdc.GetProviderVdcStorageProfileRefs();
ReferenceType providerVdcStorageProfileRef = providerVdc.GetProviderVdcStorageProfileRefs().FirstOrDefault(o => o.name.ToLower() == "nfs01");
VdcStorageProfileParamsType vdcStorageProfile = new VdcStorageProfileParamsType();
vdcStorageProfile.Enabled = true;
vdcStorageProfile.Default = true;
vdcStorageProfile.Limit = 10000;
vdcStorageProfile.Units = "MB";
vdcStorageProfile.ProviderVdcStorageProfile = providerVdcStorageProfileRef;
List<VdcStorageProfileParamsType> VdcStorageProfileParamsTypeList = new List<VdcStorageProfileParamsType>();
VdcStorageProfileParamsTypeList.Add(vdcStorageProfile);
adminVdc.UpdateAdminVdcStorageProfiles(VdcStorageProfileParamsTypeList, providerVdcStorageProfiles);
And I have no clue where that parameter is or being set.
Thanks in advance
↧
How can I add a storage policy to a VDC?
↧