mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 9154: Add redundant state to DomainRouterResponse
This commit is contained in:
parent
206eef2805
commit
07a61686db
@ -119,8 +119,8 @@ public class DomainRouterResponse extends BaseResponse {
|
||||
@SerializedName("serviceofferingname") @Param(description="the name of the service offering of the virtual machine")
|
||||
private String serviceOfferingName;
|
||||
|
||||
|
||||
|
||||
@SerializedName("redundantstate") @Param(description="the state of redundant virtual router")
|
||||
private String redundantState;
|
||||
|
||||
@Override
|
||||
public Long getObjectId() {
|
||||
@ -374,4 +374,12 @@ public class DomainRouterResponse extends BaseResponse {
|
||||
public void setServiceOfferingName(String serviceOfferingName) {
|
||||
this.serviceOfferingName = serviceOfferingName;
|
||||
}
|
||||
|
||||
public String getRedundantState() {
|
||||
return redundantState;
|
||||
}
|
||||
|
||||
public void setRedundantState(String redundantState) {
|
||||
this.redundantState = redundantState;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,8 +30,9 @@ public interface VirtualRouter extends VirtualMachine {
|
||||
}
|
||||
Role getRole();
|
||||
public enum RedundantState {
|
||||
UNKNOWN,
|
||||
MASTER,
|
||||
BACKUP,
|
||||
UNKNOWN
|
||||
BACKUP
|
||||
}
|
||||
RedundantState getRedundantState();
|
||||
}
|
||||
|
||||
@ -160,6 +160,7 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedundantState getRedundantState() {
|
||||
return this.redundantState;
|
||||
}
|
||||
|
||||
@ -1257,6 +1257,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
routerResponse.setTemplateId(router.getTemplateId());
|
||||
routerResponse.setCreated(router.getCreated());
|
||||
routerResponse.setState(router.getState());
|
||||
routerResponse.setRedundantState(router.getRedundantState().toString());
|
||||
|
||||
if (router.getHostId() != null) {
|
||||
routerResponse.setHostId(router.getHostId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user