From 495e9ad113908b35811186fe0a96c97a5b70e891 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 10 Jan 2012 14:14:37 -0800 Subject: [PATCH] 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.") --- ui/scripts/configuration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index f0b6280d5cf..a77340251ea 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -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;