RIFT-15418: Removal of gateway-address in input-params result in failed string 05/1005/1
authorKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Mon, 23 Jan 2017 18:41:12 +0000 (13:41 -0500)
committerKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Mon, 23 Jan 2017 18:41:12 +0000 (13:41 -0500)
Signed-off-by: KIRAN KASHALKAR <kiran.kashalkar@riftio.com>
skyquake/plugins/launchpad/src/instantiate/instantiateParameters.jsx
skyquake/plugins/launchpad/src/instantiate/instantiateStore.js

index 0e5fa1f..5681851 100644 (file)
@@ -44,52 +44,53 @@ class Instantiate extends Component {
             <PanelWrapper>
             <InstantiateDescriptorPanel descriptor={selectedNSD} />
             <Panel title="Input Parameters">
-        <InstantiateInputParams
+                <InstantiateInputParams
 
-            nsFn={this.props.nsFn()}
-            vnfFn={this.props.vnfFn()}
-            vldFn={this.props.vldFn()}
-            ipProfileFn={this.props.ipProfileFn()}
-            dnsFn={this.props.dnsFn()}
-            usersFn={this.props.usersFn()}
-            sshFn={this.props.sshFn()}
-            updateName={this.props.nameUpdated}
-            updateInputParam={this.props.updateInputParam}
+                    nsFn={this.props.nsFn()}
+                    vnfFn={this.props.vnfFn()}
+                    vldFn={this.props.vldFn()}
+                    ipProfileFn={this.props.ipProfileFn()}
+                    dnsFn={this.props.dnsFn()}
+                    usersFn={this.props.usersFn()}
+                    sshFn={this.props.sshFn()}
+                    updateName={this.props.nameUpdated}
+                    updateInputParam={this.props.updateInputParam}
 
-            nsd={selectedNSD}
-            selectedNSDid={this.props.selectedNSDid}
-            name={this.props.name}
+                    nsd={selectedNSD}
+                    selectedNSDid={this.props.selectedNSDid}
+                    name={this.props.name}
 
-            cloudAccounts={this.props.cloudAccounts}
-            selectedCloudAccount={this.props.selectedCloudAccount}
-            vnfdCloudAccounts={this.props.vnfdCloudAccounts}
-            ro={this.props.ro}
-            dataCenters={this.props.dataCenters}
-            configAgentAccounts={this.props.configAgentAccounts}
-            inputParameters={this.props['input-parameters']}
+                    cloudAccounts={this.props.cloudAccounts}
+                    selectedCloudAccount={this.props.selectedCloudAccount}
+                    vnfdCloudAccounts={this.props.vnfdCloudAccounts}
+                    ro={this.props.ro}
+                    dataCenters={this.props.dataCenters}
+                    configAgentAccounts={this.props.configAgentAccounts}
+                    inputParameters={this.props['input-parameters']}
 
-            displayPlacementGroups={this.props.displayPlacementGroups}
+                    displayPlacementGroups={this.props.displayPlacementGroups}
 
 
-            nsPlacementGroups={this.props['ns-placement-groups']}
-            vnfPlacementGroups={this.props['vnf-placement-groups']}
+                    nsPlacementGroups={this.props['ns-placement-groups']}
+                    vnfPlacementGroups={this.props['vnf-placement-groups']}
 
-            vlds={this.props.vld}
+                    vlds={this.props.vld}
 
-            ipProfileList={this.props.ipProfiles}
+                    ipProfileList={this.props.ipProfiles}
 
-            sshKeysList={this.props.sshKeysList}
-            sshKeysRef={this.props.sshKeysRef}
+                    sshKeysList={this.props.sshKeysList}
+                    sshKeysRef={this.props.sshKeysRef}
 
-            dnsServers={this.props.dnsServers}
+                    dnsServers={this.props.dnsServers}
 
-            usersList = {this.props.usersList}
-            selectedID={this.props.selectedNSDid}
-            selectedNSD={selectedNSD}
+                    usersList = {this.props.usersList}
+                    selectedID={this.props.selectedNSDid}
+                    selectedNSD={selectedNSD}
 
-            isOpenMano={this.props.isOpenMano}
+                    isOpenMano={this.props.isOpenMano}
 
-        /></Panel>
+                />
+            </Panel>
         </PanelWrapper>
     )
   }
index 2e6e242..e779beb 100644 (file)
@@ -484,6 +484,11 @@ class LaunchNetworkServiceStore {
                     let value = e.target.nodeName == "SELECT" ? JSON.parse(e.target.value) : e.target.value;
                     self.ipProfiles[i]['ip-profile-params'][key] = value;
 
+                    if (value == '') {
+                        // Don't send this key
+                        delete self.ipProfiles[i]['ip-profile-params'][key];
+                    }
+
                     self.setState({ipProfiles:self.ipProfiles});
                 }
             },