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 2024/01/08 13:17:29 UTC
(cloudstack) branch nsx-l2-shared-nw-unsupported created (now 516fbf4710a)
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a change to branch nsx-l2-shared-nw-unsupported
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
at 516fbf4710a NSX: Prevent creation of L2 and Shared networks for NSX
This branch includes the following new commits:
new 516fbf4710a NSX: Prevent creation of L2 and Shared networks for NSX
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.
(cloudstack) 01/01: NSX: Prevent creation of L2 and Shared networks for NSX
Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch nsx-l2-shared-nw-unsupported
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 516fbf4710afb25008ae1e6c4a1beda2a91713a8
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Mon Jan 8 08:17:18 2024 -0500
NSX: Prevent creation of L2 and Shared networks for NSX
---
ui/public/locales/en.json | 2 ++
ui/src/views/network/CreateL2NetworkForm.vue | 13 +++++++++++--
ui/src/views/network/CreateNetwork.vue | 3 ++-
ui/src/views/network/CreateSharedNetworkForm.vue | 13 +++++++++++--
4 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index be035adc4ba..d6559243f71 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -2969,6 +2969,7 @@
"message.kubernetes.cluster.stop": "Please confirm that you want to stop the cluster.",
"message.kubernetes.cluster.upgrade": "Please select new Kubernetes version.",
"message.kubernetes.version.delete": "Please confirm that you want to delete this Kubernetes version.",
+"message.l2.network.unsupported.for.nsx": "L2 networks aren't supported for NSX enabled zones",
"message.launch.zone": "Zone is ready to launch; please proceed to the next step.",
"message.launch.zone.description": "Zone is ready to launch; please proceed to the next step.",
"message.launch.zone.hint": "Configure Network components and traffic including IP addresses.",
@@ -3116,6 +3117,7 @@
"message.setup.physical.network.during.zone.creation": "When adding a zone, you need to set up one or more physical Networks. Each Network corresponds to a NIC on the hypervisor. Each physical Network can carry one or more types of traffic, with certain restrictions on how they may be combined. Add or remove one or more traffic types onto each physical Network.",
"message.setup.physical.network.during.zone.creation.basic": "When adding a basic zone, you can set up one physical Network, which corresponds to a NIC on the hypervisor. The Network carries several types of traffic.<br/><br/>You may also <strong>add</strong> other traffic types onto the physical Network.",
"message.shared.network.offering.warning": "Domain admins and regular Users can only create shared Networks from Network offering with the setting specifyvlan=false. Please contact an administrator to create a Network offering if this list is empty.",
+"message.shared.network.unsupported.for.nsx": "Shared networks aren't supported for NSX enabled zones",
"message.shutdown.triggered": "A shutdown has been triggered. CloudStack will not accept new jobs",
"message.snapshot.additional.zones": "Snapshots will always be created in its native zone - %x, here you can select additional zone(s) where it will be copied to at creation time",
"message.sourcenatip.change.warning": "WARNING: Changing the sourcenat IP address of the network will cause connectivity downtime for the Instances with NICs in the Network.",
diff --git a/ui/src/views/network/CreateL2NetworkForm.vue b/ui/src/views/network/CreateL2NetworkForm.vue
index 76695eb625f..6bb87e178f3 100644
--- a/ui/src/views/network/CreateL2NetworkForm.vue
+++ b/ui/src/views/network/CreateL2NetworkForm.vue
@@ -18,7 +18,14 @@
<template>
<a-spin :spinning="loading">
<div class="form-layout" v-ctrl-enter="handleSubmit">
- <div class="form">
+ <div v-if="isNsxEnabled">
+ <a-alert type="warning">
+ <template #message>
+ <span v-html="$t('message.l2.network.unsupported.for.nsx')" />
+ </template>
+ </a-alert>
+ </div>
+ <div v-else class="form">
<a-form
:ref="formRef"
:model="form"
@@ -248,7 +255,8 @@ export default {
networkOfferings: [],
networkOfferingLoading: false,
selectedNetworkOffering: {},
- isolatePvlanType: 'none'
+ isolatePvlanType: 'none',
+ isNsxEnabled: false
}
},
watch: {
@@ -328,6 +336,7 @@ export default {
},
handleZoneChange (zone) {
this.selectedZone = zone
+ this.isNsxEnabled = zone?.isnsxenabled || false
this.updateVPCCheckAndFetchNetworkOfferingData()
},
fetchDomainData () {
diff --git a/ui/src/views/network/CreateNetwork.vue b/ui/src/views/network/CreateNetwork.vue
index 44921f45e9a..5c83e9d3a44 100644
--- a/ui/src/views/network/CreateNetwork.vue
+++ b/ui/src/views/network/CreateNetwork.vue
@@ -66,6 +66,7 @@ export default {
}
},
data () {
+ console.log(this.resource)
return {
isAdvancedZoneWithoutSGAvailable: false,
defaultNetworkTypeTabKey: '1',
@@ -87,6 +88,7 @@ export default {
},
methods: {
fetchData () {
+ console.log('here')
const promises = []
promises.push(this.fetchActionZoneData())
Promise.all(promises).then(() => {
@@ -106,7 +108,6 @@ export default {
fetchActionZoneData () {
this.loading = true
const params = {}
- console.log(this.resource)
if (this.$route.name === 'deployVirtualMachine' && this.resource.zoneid) {
params.id = this.resource.zoneid
}
diff --git a/ui/src/views/network/CreateSharedNetworkForm.vue b/ui/src/views/network/CreateSharedNetworkForm.vue
index 93bf693008f..4fd42370946 100644
--- a/ui/src/views/network/CreateSharedNetworkForm.vue
+++ b/ui/src/views/network/CreateSharedNetworkForm.vue
@@ -18,7 +18,14 @@
<template>
<a-spin :spinning="loading">
<div class="form-layout" v-ctrl-enter="handleSubmit">
- <div class="form">
+ <div v-if="isNsxEnabled">
+ <a-alert type="warning">
+ <template #message>
+ <span v-html="$t('message.shared.network.unsupported.for.nsx')" />
+ </template>
+ </a-alert>
+ </div>
+ <div v-else class="form">
<a-form
:ref="formRef"
:model="form"
@@ -546,7 +553,8 @@ export default {
minMTU: 68,
setMTU: false,
errorPublicMtu: '',
- errorPrivateMtu: ''
+ errorPrivateMtu: '',
+ isNsxEnabled: false
}
},
watch: {
@@ -665,6 +673,7 @@ export default {
this.setMTU = zone?.allowuserspecifyvrmtu || false
this.privateMtuMax = zone?.routerprivateinterfacemaxmtu || 1500
this.publicMtuMax = zone?.routerpublicinterfacemaxmtu || 1500
+ this.isNsxEnabled = zone?.isnsxenabled || false
if (isAdmin()) {
this.fetchPhysicalNetworkData()
} else {