CLOUDSTACK-5431: permit 'http' as service type for GSLB rule

This commit is contained in:
Murali Reddy 2013-12-10 08:07:22 +05:30
parent c60a256ebd
commit bd238ce24e
2 changed files with 5 additions and 3 deletions

View File

@ -50,9 +50,11 @@ public interface GlobalLoadBalancerRule extends Identity, InternalIdentity, Cont
}
enum ServiceType {
tcp, udp;
tcp, udp, http;
public static boolean isValidServiceType(String serviceType) {
if (tcp.name().equalsIgnoreCase(serviceType) || udp.name().equalsIgnoreCase(serviceType)) {
if (tcp.name().equalsIgnoreCase(serviceType) ||
udp.name().equalsIgnoreCase(serviceType) ||
http.name().equalsIgnoreCase(serviceType)) {
return true;
}
return false;

View File

@ -87,7 +87,7 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
@Parameter(name = ApiConstants.GSLB_SERVICE_DOMAIN_NAME, type = CommandType.STRING, required = true, description = "domain name for the GSLB service.")
private String serviceDomainName;
@Parameter(name = ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp)")
@Parameter(name = ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp, http)")
private String serviceType;
/////////////////////////////////////////////////////