You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2023/12/21 20:03:46 UTC

(cloudstack) branch nsx-ui-zone-bug updated (85a85cb01d2 -> 8637ac47372)

This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a change to branch nsx-ui-zone-bug
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


 discard 85a85cb01d2 fix zone wizard public traffic issue
     new 8637ac47372 fix zone wizard public traffic issue

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (85a85cb01d2)
            \
             N -- N -- N   refs/heads/nsx-ui-zone-bug (8637ac47372)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ui/src/config/section/compute.js | 1 -
 1 file changed, 1 deletion(-)


(cloudstack) 01/01: fix zone wizard public traffic issue

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-ui-zone-bug
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 8637ac4737287e7bf6cc4c0d876d57ddd1b42c56
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Thu Dec 21 14:56:47 2023 -0500

    fix zone wizard public traffic issue
---
 ui/src/config/section/compute.js                 |  1 -
 ui/src/views/infra/zone/IpAddressRangeForm.vue   |  4 ++-
 ui/src/views/infra/zone/ZoneWizardLaunchZone.vue | 39 ++++++++----------------
 3 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js
index b9c8964e0f4..16349668650 100644
--- a/ui/src/config/section/compute.js
+++ b/ui/src/config/section/compute.js
@@ -532,7 +532,6 @@ export default {
       docHelp: 'plugins/cloudstack-kubernetes-service.html',
       permission: ['listKubernetesClusters'],
       columns: (store) => {
-        console.log(store)
         var fields = ['name', 'state', 'clustertype', 'size', 'cpunumber', 'memory', 'kubernetesversionname']
         if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) {
           fields.push('account')
diff --git a/ui/src/views/infra/zone/IpAddressRangeForm.vue b/ui/src/views/infra/zone/IpAddressRangeForm.vue
index d7c5671d87e..c39534d7b93 100644
--- a/ui/src/views/infra/zone/IpAddressRangeForm.vue
+++ b/ui/src/views/infra/zone/IpAddressRangeForm.vue
@@ -261,8 +261,10 @@ export default {
     handleAddRange () {
       this.formRef.value.validate().then(() => {
         const values = toRaw(this.form)
+        const len = this.isValidSetup() ? this.ipRanges.length - 1 : 0
+        const key = this.isValidSetup() ? this.ipRanges[len].key : 0
         this.ipRanges.push({
-          key: this.ipRanges.length.toString(),
+          key: key + 1,
           gateway: values.gateway,
           netmask: values.netmask,
           vlan: values.vlan,
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index 7d34bd3975a..269e4176bb1 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -213,8 +213,6 @@ export default {
         status: STATUS_PROCESS
       })
       this.setStepStatus(STATUS_PROCESS)
-      console.log('steps:')
-      console.log(this.steps)
     },
     setStepStatus (status) {
       const index = this.steps.findIndex(step => step.index === this.currentStep)
@@ -235,8 +233,6 @@ export default {
     },
     handleFixesError () {
       const stepError = this.steps.filter(step => step.index === this.currentStep)
-      console.log(this.currentStep)
-      console.log(stepError)
       if (stepError && stepError.length > 0) {
         const step = stepError[0].step
         this.$emit('stepError', step, this.stepData)
@@ -861,11 +857,6 @@ export default {
         if (!this.stepData.stepMove.includes('createPod')) {
           this.stepData.podReturned = await this.createPod(params)
           this.stepData.stepMove.push('createPod')
-          // await this.stepConfigurePublicTraffic('message.configuring.public.traffic', 'publicTraffic', 0)
-          // if (this.stepData.isNsxZone) {
-          //   console.log('continue')
-          //   await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
-          // }
         }
         await this.stepConfigurePublicTraffic('message.configuring.public.traffic', 'publicTraffic', 0)
       } catch (e) {
@@ -906,7 +897,6 @@ export default {
       }
     },
     async stepConfigurePublicTraffic (message, trafficType, idx) {
-      console.log(trafficType)
       if (
         (this.isBasicZone &&
           (this.havingSG && this.havingEIP && this.havingELB)) ||
@@ -920,8 +910,10 @@ export default {
 
         let stopNow = false
         this.stepData.returnedPublicTraffic = this.stepData?.returnedPublicTraffic || []
-        for (let index = 0; index < this.prefillContent['public-ipranges'].length; index++) {
-          const publicVlanIpRange = this.prefillContent['public-ipranges'][index]
+        let publicIpRanges = this.prefillContent['public-ipranges']
+        publicIpRanges = publicIpRanges.filter(item => item.fornsx === (idx === 1))
+        for (let index = 0; index < publicIpRanges.length; index++) {
+          const publicVlanIpRange = publicIpRanges[index]
           let isExisting = false
 
           this.stepData.returnedPublicTraffic.forEach(publicVlan => {
@@ -967,14 +959,10 @@ export default {
           try {
             if (!this.stepData.stepMove.includes('createPublicVlanIpRange' + idx + index)) {
               const vlanIpRangeItem = await this.createVlanIpRange(params)
-              console.log(vlanIpRangeItem)
               this.stepData.returnedPublicTraffic.push(vlanIpRangeItem)
               this.stepData.stepMove.push('createPublicVlanIpRange' + idx + index)
-              console.log(this.stepData)
             }
           } catch (e) {
-            console.log('error')
-            console.log(this.stepData)
             this.messageError = e
             this.processStatus = STATUS_FAILED
             this.setStepStatus(STATUS_FAILED)
@@ -989,16 +977,16 @@ export default {
           return
         }
 
-        if (this.stepData.isTungstenZone) {
-          await this.stepCreateTungstenFabricPublicNetwork()
-        } else if (this.stepData.isNsxZone) {
-          await this.stepAddNsxController()
-        } else {
-          await this.stepConfigureStorageTraffic()
-        }
-        if (this.stepData.isNsxZone && this.nsx) {
-          console.log(this.nsx)
+        if (idx === 0) {
           await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
+        } else {
+          if (this.stepData.isTungstenZone) {
+            await this.stepCreateTungstenFabricPublicNetwork()
+          } else if (this.stepData.isNsxZone) {
+            await this.stepAddNsxController()
+          } else {
+            await this.stepConfigureStorageTraffic()
+          }
         }
       } else if (this.isAdvancedZone && this.sgEnabled) {
         if (this.stepData.isTungstenZone) {
@@ -1016,7 +1004,6 @@ export default {
           }
         }
       }
-      console.log(this.nsx)
     },
     async stepCreateTungstenFabricPublicNetwork () {
       this.setStepStatus(STATUS_FINISH)