mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 9154: Add isRedundantRouter to DomainRouterResponse
This commit is contained in:
parent
1616084f47
commit
9466106c40
@ -119,6 +119,9 @@ public class DomainRouterResponse extends BaseResponse {
|
||||
@SerializedName("serviceofferingname") @Param(description="the name of the service offering of the virtual machine")
|
||||
private String serviceOfferingName;
|
||||
|
||||
@SerializedName("isredundantrouter") @Param(description="if this router is an redundant virtual router")
|
||||
private boolean isRedundantRouter;
|
||||
|
||||
@SerializedName("redundantstate") @Param(description="the state of redundant virtual router")
|
||||
private String redundantState;
|
||||
|
||||
@ -382,4 +385,12 @@ public class DomainRouterResponse extends BaseResponse {
|
||||
public void setRedundantState(String redundantState) {
|
||||
this.redundantState = redundantState;
|
||||
}
|
||||
|
||||
public boolean getIsRedundantRouter() {
|
||||
return isRedundantRouter;
|
||||
}
|
||||
|
||||
public void setIsRedundantRouter(boolean isRedundantRouter) {
|
||||
this.isRedundantRouter = isRedundantRouter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ public interface VirtualRouter extends VirtualMachine {
|
||||
DHCP_USERDATA
|
||||
}
|
||||
Role getRole();
|
||||
boolean getIsRedundantRouter();
|
||||
public enum RedundantState {
|
||||
UNKNOWN,
|
||||
MASTER,
|
||||
|
||||
@ -139,6 +139,7 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRedundantRouter() {
|
||||
return this.isRedundantRouter;
|
||||
}
|
||||
|
||||
@ -1257,6 +1257,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
routerResponse.setTemplateId(router.getTemplateId());
|
||||
routerResponse.setCreated(router.getCreated());
|
||||
routerResponse.setState(router.getState());
|
||||
routerResponse.setIsRedundantRouter(router.getIsRedundantRouter());
|
||||
routerResponse.setRedundantState(router.getRedundantState().toString());
|
||||
|
||||
if (router.getHostId() != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user