cloudstack 3.0 new UI - create network offering - fix a bug that servicecapabilitylist was still passed to API when corresponding service is not selected. (API returns error: "Capabilities for LB service can be specifed only when LB service is enabled for network offering.")

This commit is contained in:
Jessica Wang 2012-01-10 14:14:37 -08:00
parent f964c4d227
commit 495e9ad113
1 changed files with 2 additions and 2 deletions

View File

@ -1049,11 +1049,11 @@
serviceCapabilityMap[serviceData[1]] = serviceData[2];
}
} else if (key == 'lbIsolation') {
} else if ((key == 'lbIsolation') && ("Lb" in serviceProviderMap)) {
inputData['servicecapabilitylist[0].service'] = 'lb';
inputData['servicecapabilitylist[0].capabilitytype'] = 'SupportedLbIsolation';
inputData['servicecapabilitylist[0].capabilityvalue'] = value;
} else if (key == 'sourceNatType') {
} else if ((key == 'sourceNatType') && ("SourceNat" in serviceProviderMap)) {
inputData['servicecapabilitylist[0].service'] = 'sourcenat';
inputData['servicecapabilitylist[0].capabilitytype'] = 'SupportedSourceNatTypes';
inputData['servicecapabilitylist[0].capabilityvalue'] = value;