File tree Expand file tree Collapse file tree
server/src/main/java/com/cloud/network Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3065,8 +3065,12 @@ public Network updateGuestNetwork(final UpdateNetworkCmd cmd) {
30653065 }
30663066
30673067 // network offering and domain suffix can be updated for Isolated networks only in 3.0
3068- if ((networkOfferingId != null || domainSuffix != null ) && network .getGuestType () != GuestType .Isolated ) {
3069- throw new InvalidParameterValueException ("NetworkOffering and domain suffix upgrade can be performed for Isolated networks only" );
3068+ if (networkOfferingId != null && network .getGuestType () != GuestType .Isolated ) {
3069+ throw new InvalidParameterValueException ("NetworkOffering update can be performed for Isolated networks only." );
3070+ }
3071+ // network offering and domain suffix can be updated for Isolated networks only in 3.0
3072+ if (domainSuffix != null && ! Arrays .asList (GuestType .Isolated , GuestType .Shared ).contains (network .getGuestType ())) {
3073+ throw new InvalidParameterValueException ("Domain suffix update can only be performed for Isolated and shared networks." );
30703074 }
30713075
30723076 boolean networkOfferingChanged = false ;
You can’t perform that action at this time.
0 commit comments