bug 9154: Add isRedundantRouter to DomainRouterResponse

This commit is contained in:
Sheng Yang 2011-06-15 14:39:28 -07:00
parent 1616084f47
commit 9466106c40
4 changed files with 14 additions and 0 deletions

View File

@ -119,6 +119,9 @@ public class DomainRouterResponse extends BaseResponse {
@SerializedName("serviceofferingname") @Param(description="the name of the service offering of the virtual machine") @SerializedName("serviceofferingname") @Param(description="the name of the service offering of the virtual machine")
private String serviceOfferingName; 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") @SerializedName("redundantstate") @Param(description="the state of redundant virtual router")
private String redundantState; private String redundantState;
@ -382,4 +385,12 @@ public class DomainRouterResponse extends BaseResponse {
public void setRedundantState(String redundantState) { public void setRedundantState(String redundantState) {
this.redundantState = redundantState; this.redundantState = redundantState;
} }
public boolean getIsRedundantRouter() {
return isRedundantRouter;
}
public void setIsRedundantRouter(boolean isRedundantRouter) {
this.isRedundantRouter = isRedundantRouter;
}
} }

View File

@ -29,6 +29,7 @@ public interface VirtualRouter extends VirtualMachine {
DHCP_USERDATA DHCP_USERDATA
} }
Role getRole(); Role getRole();
boolean getIsRedundantRouter();
public enum RedundantState { public enum RedundantState {
UNKNOWN, UNKNOWN,
MASTER, MASTER,

View File

@ -139,6 +139,7 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
this.role = role; this.role = role;
} }
@Override
public boolean getIsRedundantRouter() { public boolean getIsRedundantRouter() {
return this.isRedundantRouter; return this.isRedundantRouter;
} }

View File

@ -1257,6 +1257,7 @@ public class ApiResponseHelper implements ResponseGenerator {
routerResponse.setTemplateId(router.getTemplateId()); routerResponse.setTemplateId(router.getTemplateId());
routerResponse.setCreated(router.getCreated()); routerResponse.setCreated(router.getCreated());
routerResponse.setState(router.getState()); routerResponse.setState(router.getState());
routerResponse.setIsRedundantRouter(router.getIsRedundantRouter());
routerResponse.setRedundantState(router.getRedundantState().toString()); routerResponse.setRedundantState(router.getRedundantState().toString());
if (router.getHostId() != null) { if (router.getHostId() != null) {