@@ -1337,12 +1337,9 @@ export default {
13371337 }
13381338 this .zone = _ .find (this .options .zones , (option ) => option .id === instanceConfig .zoneid )
13391339 this .affinityGroups = _ .filter (this .options .affinityGroups , (option ) => _ .includes (instanceConfig .affinitygroupids , option .id ))
1340- this .networks = _ .filter (this .options .networks , (option ) => _ .includes (instanceConfig .networkids , option .id ))
1340+ this .networks = this . getSelectedNetworksWithExistingConfig ( _ .filter (this .options .networks , (option ) => _ .includes (instanceConfig .networkids , option .id ) ))
13411341
13421342 this .diskOffering = _ .find (this .options .diskOfferings , (option ) => option .id === instanceConfig .diskofferingid )
1343- this .zone = _ .find (this .options .zones , (option ) => option .id === instanceConfig .zoneid )
1344- this .affinityGroups = _ .filter (this .options .affinityGroups , (option ) => _ .includes (instanceConfig .affinitygroupids , option .id ))
1345- this .networks = _ .filter (this .options .networks , (option ) => _ .includes (instanceConfig .networkids , option .id ))
13461343 this .sshKeyPair = _ .find (this .options .sshKeyPairs , (option ) => option .name === instanceConfig .keypair )
13471344
13481345 if (this .zone ) {
@@ -2594,6 +2591,19 @@ export default {
25942591 },
25952592 handleNicsNetworkSelection (nicToNetworkSelection ) {
25962593 this .nicToNetworkSelection = nicToNetworkSelection
2594+ },
2595+ getSelectedNetworksWithExistingConfig (networks ) {
2596+ for (var i in this .networks ) {
2597+ var n = this .networks [i]
2598+ for (var c of this .networkConfig ) {
2599+ if (n .id === c .key ) {
2600+ n = { ... n, ... c }
2601+ networks[i] = n
2602+ break
2603+ }
2604+ }
2605+ }
2606+ return networks
25972607 }
25982608 }
25992609}
0 commit comments