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
|
||||
if ((networkOfferingId != null || domainSuffix != null) && network.getGuestType() != GuestType.Isolated) {
|
||||
throw new InvalidParameterValueException("NetworkOffering and domain suffix upgrade can be performed for Isolated networks only");
|
||||
if (networkOfferingId != null && network.getGuestType() != GuestType.Isolated) {
|
||||
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;
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
</template>
|
||||
<a-switch v-model:checked="form.changecidr" />
|
||||
</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>
|
||||
<tooltip-label :title="$t('label.networkdomain')" :tooltip="apiParams.guestvmcidr.description"/>
|
||||
</template>
|
||||
@ -274,7 +274,7 @@ export default {
|
||||
ip6dns1: this.resource.ip6dns1,
|
||||
ip6dns2: this.resource.ip6dns2
|
||||
}
|
||||
if (this.isUpdatingIsolatedNetwork) {
|
||||
if (this.hasNetworkDomain) {
|
||||
this.resourceValues.networkdomain = this.resource.networkdomain
|
||||
}
|
||||
for (var field in this.resourceValues) {
|
||||
@ -289,6 +289,12 @@ export default {
|
||||
isUpdatingIsolatedNetwork () {
|
||||
return this.resource && this.resource.type === 'Isolated'
|
||||
},
|
||||
isUpdatingSharedNetwork () {
|
||||
return this.resource && this.resource.type === 'Shared'
|
||||
},
|
||||
hasNetworkDomain () {
|
||||
return this.isUpdatingIsolatedNetwork || this.isUpdatingSharedNetwork
|
||||
},
|
||||
selectedNetworkOfferingSupportsDns () {
|
||||
if (this.networkOffering) {
|
||||
const services = this.networkOffering?.service || []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user