@@ -487,7 +487,6 @@ export default {
487487 if (physicalNetwork .isolationMethod === ' NSX' &&
488488 physicalNetwork .traffics .findIndex (traffic => traffic .type === ' public' || traffic .type === ' guest' ) > - 1 ) {
489489 this .stepData .isNsxZone = true
490- this .stepData .tungstenPhysicalNetworkId = physicalNetworkReturned .id
491490 }
492491 } else {
493492 this .stepData .physicalNetworkReturned = this .stepData .physicalNetworkItem [' createPhysicalNetwork' + index]
@@ -980,7 +979,7 @@ export default {
980979 return
981980 }
982981
983- if (idx === 0 ) {
982+ if (idx === 0 && this . stepData . isNsxZone ) {
984983 await this .stepConfigurePublicTraffic (' message.configuring.nsx.public.traffic' , ' nsxPublicTraffic' , 1 )
985984 } else {
986985 if (this .stepData .isTungstenZone ) {
@@ -1080,6 +1079,7 @@ export default {
10801079 providerParams .transportzone = this .prefillContent ? .transportZone || ' '
10811080
10821081 await this .addNsxController (providerParams)
1082+ await this .updateNsxServiceProviderStatus ()
10831083 this .stepData .stepMove .push (' addNsxController' )
10841084 }
10851085 this .stepData .stepMove .push (' nsx' )
@@ -1090,6 +1090,18 @@ export default {
10901090 this .setStepStatus (STATUS_FAILED )
10911091 }
10921092 },
1093+ async updateNsxServiceProviderStatus () {
1094+ const listParams = {}
1095+ listParams .name = ' Nsx'
1096+ const nsxPhysicalNetwork = this .stepData .physicalNetworksReturned .find (net => net .isolationmethods .trim ().toUpperCase () === ' NSX' )
1097+ const nsxPhysicalNetworkId = nsxPhysicalNetwork? .id || null
1098+ listParams .physicalNetworkId = nsxPhysicalNetworkId
1099+ const nsxProviderId = await this .listNetworkServiceProviders (listParams, ' nsxProvider' )
1100+ console .log (nsxProviderId)
1101+ if (nsxProviderId !== null ) {
1102+ await this .updateNetworkServiceProvider (nsxProviderId)
1103+ }
1104+ },
10931105 async stepConfigureStorageTraffic () {
10941106 let targetNetwork = false
10951107 this .prefillContent .physicalNetworks .forEach (physicalNetwork => {
0 commit comments