mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
allow domain suffix update in shared networks (#9585)
* allow domeain suffix update in shared networks * add network domain edit for shared networks to UI
This commit is contained in:
parent
68f459b334
commit
b19c069ade
@ -3145,8 +3145,12 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
// network offering and domain suffix can be updated for Isolated networks only in 3.0
|
// network offering and domain suffix can be updated for Isolated networks only in 3.0
|
||||||
if ((networkOfferingId != null || domainSuffix != null) && network.getGuestType() != GuestType.Isolated) {
|
if (networkOfferingId != null && network.getGuestType() != GuestType.Isolated) {
|
||||||
throw new InvalidParameterValueException("NetworkOffering and domain suffix upgrade can be performed for Isolated networks only");
|
throw new InvalidParameterValueException("NetworkOffering update can be performed for Isolated networks only.");
|
||||||
|
}
|
||||||
|
// network offering and domain suffix can be updated for Isolated networks only in 3.0
|
||||||
|
if (domainSuffix != null && ! Arrays.asList(GuestType.Isolated, GuestType.Shared).contains(network.getGuestType())) {
|
||||||
|
throw new InvalidParameterValueException("Domain suffix update can only be performed for Isolated and shared networks.");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean networkOfferingChanged = false;
|
boolean networkOfferingChanged = false;
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<a-switch v-model:checked="form.changecidr" />
|
<a-switch v-model:checked="form.changecidr" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item name="networkdomain" ref="networkdomain" v-if="isUpdatingIsolatedNetwork">
|
<a-form-item name="networkdomain" ref="networkdomain" v-if="hasNetworkDomain">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.networkdomain')" :tooltip="apiParams.guestvmcidr.description"/>
|
<tooltip-label :title="$t('label.networkdomain')" :tooltip="apiParams.guestvmcidr.description"/>
|
||||||
</template>
|
</template>
|
||||||
@ -274,7 +274,7 @@ export default {
|
|||||||
ip6dns1: this.resource.ip6dns1,
|
ip6dns1: this.resource.ip6dns1,
|
||||||
ip6dns2: this.resource.ip6dns2
|
ip6dns2: this.resource.ip6dns2
|
||||||
}
|
}
|
||||||
if (this.isUpdatingIsolatedNetwork) {
|
if (this.hasNetworkDomain) {
|
||||||
this.resourceValues.networkdomain = this.resource.networkdomain
|
this.resourceValues.networkdomain = this.resource.networkdomain
|
||||||
}
|
}
|
||||||
for (var field in this.resourceValues) {
|
for (var field in this.resourceValues) {
|
||||||
@ -289,6 +289,12 @@ export default {
|
|||||||
isUpdatingIsolatedNetwork () {
|
isUpdatingIsolatedNetwork () {
|
||||||
return this.resource && this.resource.type === 'Isolated'
|
return this.resource && this.resource.type === 'Isolated'
|
||||||
},
|
},
|
||||||
|
isUpdatingSharedNetwork () {
|
||||||
|
return this.resource && this.resource.type === 'Shared'
|
||||||
|
},
|
||||||
|
hasNetworkDomain () {
|
||||||
|
return this.isUpdatingIsolatedNetwork || this.isUpdatingSharedNetwork
|
||||||
|
},
|
||||||
selectedNetworkOfferingSupportsDns () {
|
selectedNetworkOfferingSupportsDns () {
|
||||||
if (this.networkOffering) {
|
if (this.networkOffering) {
|
||||||
const services = this.networkOffering?.service || []
|
const services = this.networkOffering?.service || []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user