mirror of https://github.com/apache/cloudstack.git
Added "state" parameter to LoadBalancerRules response
This commit is contained in:
parent
75b02e806d
commit
59cf483043
|
|
@ -50,6 +50,9 @@ public class LoadBalancerResponse extends BaseResponse {
|
|||
|
||||
@SerializedName("domain") @Param(description="the domain of the load balancer rule")
|
||||
private String domainName;
|
||||
|
||||
@SerializedName("state") @Param(description="the state of the rule")
|
||||
private String state;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
|
|
@ -130,4 +133,12 @@ public class LoadBalancerResponse extends BaseResponse {
|
|||
public void setDomainName(String domainName) {
|
||||
this.domainName = domainName;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -633,6 +633,12 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
lbResponse.setPublicPort(Integer.toString(loadBalancer.getSourcePortStart()));
|
||||
lbResponse.setPrivatePort(Integer.toString(loadBalancer.getDefaultPortStart()));
|
||||
lbResponse.setAlgorithm(loadBalancer.getAlgorithm());
|
||||
FirewallRule.State state = loadBalancer.getState();
|
||||
String stateToSet = state.toString();
|
||||
if (state.equals(FirewallRule.State.Revoke)) {
|
||||
stateToSet = "Deleting";
|
||||
}
|
||||
lbResponse.setState(stateToSet);
|
||||
|
||||
Account accountTemp = ApiDBUtils.findAccountById(loadBalancer.getAccountId());
|
||||
if (accountTemp != null) {
|
||||
|
|
|
|||
|
|
@ -2088,6 +2088,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
}
|
||||
}
|
||||
|
||||
s_logger.debug("Restarting network " + networkId + "...");
|
||||
|
||||
boolean success = true;
|
||||
if (!applyIpAssociations(network, false)) {
|
||||
s_logger.warn("Failed to apply ips as a part of network " + networkId + " restart");
|
||||
|
|
|
|||
Loading…
Reference in New Issue