File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
server/src/main/java/com/cloud/network Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3145,8 +3145,12 @@ public Network updateGuestNetwork(final UpdateNetworkCmd cmd) {
31453145 }
31463146
31473147 // network offering and domain suffix can be updated for Isolated networks only in 3.0
3148- if ((networkOfferingId != null || domainSuffix != null ) && network .getGuestType () != GuestType .Isolated ) {
3149- throw new InvalidParameterValueException ("NetworkOffering and domain suffix upgrade can be performed for Isolated networks only" );
3148+ if (networkOfferingId != null && network .getGuestType () != GuestType .Isolated ) {
3149+ throw new InvalidParameterValueException ("NetworkOffering update can be performed for Isolated networks only." );
3150+ }
3151+ // network offering and domain suffix can be updated for Isolated networks only in 3.0
3152+ if (domainSuffix != null && ! Arrays .asList (GuestType .Isolated , GuestType .Shared ).contains (network .getGuestType ())) {
3153+ throw new InvalidParameterValueException ("Domain suffix update can only be performed for Isolated and shared networks." );
31503154 }
31513155
31523156 boolean networkOfferingChanged = false ;
Original file line number Diff line number Diff line change 141141 </template >
142142 <a-switch v-model:checked =" form.changecidr" />
143143 </a-form-item >
144- <a-form-item name =" networkdomain" ref =" networkdomain" v-if =" isUpdatingIsolatedNetwork " >
144+ <a-form-item name =" networkdomain" ref =" networkdomain" v-if =" hasNetworkDomain " >
145145 <template #label >
146146 <tooltip-label :title =" $t('label.networkdomain')" :tooltip =" apiParams.guestvmcidr.description" />
147147 </template >
@@ -274,7 +274,7 @@ export default {
274274 ip6dns1: this .resource .ip6dns1 ,
275275 ip6dns2: this .resource .ip6dns2
276276 }
277- if (this .isUpdatingIsolatedNetwork ) {
277+ if (this .hasNetworkDomain ) {
278278 this .resourceValues .networkdomain = this .resource .networkdomain
279279 }
280280 for (var field in this .resourceValues ) {
@@ -289,6 +289,12 @@ export default {
289289 isUpdatingIsolatedNetwork () {
290290 return this .resource && this .resource .type === ' Isolated'
291291 },
292+ isUpdatingSharedNetwork () {
293+ return this .resource && this .resource .type === ' Shared'
294+ },
295+ hasNetworkDomain () {
296+ return this .isUpdatingIsolatedNetwork || this .isUpdatingSharedNetwork
297+ },
292298 selectedNetworkOfferingSupportsDns () {
293299 if (this .networkOffering ) {
294300 const services = this .networkOffering ? .service || []
You can’t perform that action at this time.
0 commit comments