Skip to content

Commit fc16e29

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-2914: default lb scheme to Public when the service LB is enabled, and scheme is not specified explicitly
1 parent b0ea02e commit fc16e29

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
9595
@Parameter(name=ApiConstants.IS_PERSISTENT, type=CommandType.BOOLEAN, description="true if network offering supports persistent networks; defaulted to false if not specified")
9696
private Boolean isPersistent;
9797

98-
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", description="Template details in key/value pairs." +
98+
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", description="Network offering details in key/value pairs." +
9999
" Supported keys are internallbprovider/publiclbprovider with service provider as a value")
100100
protected Map details;
101101

server/src/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3968,9 +3968,6 @@ public NetworkOfferingVO createNetworkOffering(String name, String displayText,
39683968
_networkModel.checkCapabilityForProvider(serviceProviderMap.get(Service.Lb), Service.Lb, Capability.LbSchemes, publicLbStr);
39693969
internalLb = publicLbStr.contains("internal");
39703970
publicLb = publicLbStr.contains("public");
3971-
} else {
3972-
//if not specified, default public lb to true
3973-
publicLb = true;
39743971
}
39753972
}
39763973
}
@@ -4009,6 +4006,11 @@ public NetworkOfferingVO createNetworkOffering(String name, String displayText,
40094006
}
40104007
}
40114008
}
4009+
4010+
if (serviceProviderMap.containsKey(Service.Lb) && !internalLb && !publicLb) {
4011+
//if not specified, default public lb to true
4012+
publicLb = true;
4013+
}
40124014

40134015
NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, trafficType, systemOnly, specifyVlan,
40144016
networkRate, multicastRate, isDefault, availability, tags, type, conserveMode, dedicatedLb,

0 commit comments

Comments
 (0)