mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	NSX: Prevent creation of L2 and Shared networks for NSX
This commit is contained in:
		
							parent
							
								
									886c071a6c
								
							
						
					
					
						commit
						516fbf4710
					
				@ -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.",
 | 
			
		||||
 | 
			
		||||
@ -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 () {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user