Skip to content

Commit ea431e6

Browse files
weizhouapachedhslove
authored andcommitted
mgmt: add back serviceip in ManagementServerResponse (apache#10891)
* mgmt: add back serviceip in ManagementServerResponse * api: add Deprecated annotation to serviceip
1 parent 1a34897 commit ea431e6

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ public class ApiConstants {
463463
public static final String SENT = "sent";
464464
public static final String SENT_BYTES = "sentbytes";
465465
public static final String SERIAL = "serial";
466+
public static final String SERVICE_IP = "serviceip";
466467
public static final String SERVICE_OFFERING_ID = "serviceofferingid";
467468
public static final String SESSIONKEY = "sessionkey";
468469
public static final String SHOW_CAPACITIES = "showcapacities";

api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public class ManagementServerResponse extends BaseResponse {
7474
@Param(description = "the running OS kernel version for this Management Server")
7575
private String kernelVersion;
7676

77+
@Deprecated
78+
@SerializedName(ApiConstants.SERVICE_IP)
79+
@Param(description = "the IP Address for this Management Server. This is deprecated, please use 'ipaddress' instead.")
80+
private String serviceIp;
81+
7782
@SerializedName(ApiConstants.IP_ADDRESS)
7883
@Param(description = "the IP Address for this Management Server")
7984
private String ipAddress;
@@ -138,6 +143,10 @@ public Date getLastBoot() {
138143
return lastBoot;
139144
}
140145

146+
public String getServiceIp() {
147+
return serviceIp;
148+
}
149+
141150
public String getIpAddress() {
142151
return ipAddress;
143152
}
@@ -202,6 +211,10 @@ public void setKernelVersion(String kernelVersion) {
202211
this.kernelVersion = kernelVersion;
203212
}
204213

214+
public void setServiceIp(String serviceIp) {
215+
this.serviceIp = serviceIp;
216+
}
217+
205218
public void setIpAddress(String ipAddress) {
206219
this.ipAddress = ipAddress;
207220
}

server/src/main/java/com/cloud/api/query/QueryManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5730,6 +5730,7 @@ protected ManagementServerResponse createManagementServerResponse(ManagementServ
57305730
mgmtResponse.setAgents(agents);
57315731
mgmtResponse.setAgentsCount((long) agents.size());
57325732
mgmtResponse.setPendingJobsCount(jobManager.countPendingNonPseudoJobs(mgmt.getMsid()));
5733+
mgmtResponse.setServiceIp(mgmt.getServiceIP());
57335734
mgmtResponse.setIpAddress(mgmt.getServiceIP());
57345735
mgmtResponse.setObjectName("managementserver");
57355736
return mgmtResponse;

0 commit comments

Comments
 (0)