Skip to content

Commit bd238ce

Browse files
committed
CLOUDSTACK-5431: permit 'http' as service type for GSLB rule
1 parent c60a256 commit bd238ce

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ public static boolean isValidPersistence(String persistence) {
5050
}
5151

5252
enum ServiceType {
53-
tcp, udp;
53+
tcp, udp, http;
5454
public static boolean isValidServiceType(String serviceType) {
55-
if (tcp.name().equalsIgnoreCase(serviceType) || udp.name().equalsIgnoreCase(serviceType)) {
55+
if (tcp.name().equalsIgnoreCase(serviceType) ||
56+
udp.name().equalsIgnoreCase(serviceType) ||
57+
http.name().equalsIgnoreCase(serviceType)) {
5658
return true;
5759
}
5860
return false;

api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
8787
@Parameter(name = ApiConstants.GSLB_SERVICE_DOMAIN_NAME, type = CommandType.STRING, required = true, description = "domain name for the GSLB service.")
8888
private String serviceDomainName;
8989

90-
@Parameter(name = ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp)")
90+
@Parameter(name = ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp, http)")
9191
private String serviceType;
9292

9393
/////////////////////////////////////////////////////

0 commit comments

Comments
 (0)