Skip to content

Commit d0dc6d8

Browse files
mgmt: add back serviceip in ManagementServerResponse (#10891)
* mgmt: add back serviceip in ManagementServerResponse * api: add Deprecated annotation to serviceip
1 parent 34896a1 commit d0dc6d8

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
@@ -448,6 +448,7 @@ public class ApiConstants {
448448
public static final String SENT = "sent";
449449
public static final String SENT_BYTES = "sentbytes";
450450
public static final String SERIAL = "serial";
451+
public static final String SERVICE_IP = "serviceip";
451452
public static final String SERVICE_OFFERING_ID = "serviceofferingid";
452453
public static final String SESSIONKEY = "sessionkey";
453454
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;
@@ -122,6 +127,10 @@ public Date getLastBoot() {
122127
return lastBoot;
123128
}
124129

130+
public String getServiceIp() {
131+
return serviceIp;
132+
}
133+
125134
public String getIpAddress() {
126135
return ipAddress;
127136
}
@@ -170,6 +179,10 @@ public void setKernelVersion(String kernelVersion) {
170179
this.kernelVersion = kernelVersion;
171180
}
172181

182+
public void setServiceIp(String serviceIp) {
183+
this.serviceIp = serviceIp;
184+
}
185+
173186
public void setIpAddress(String ipAddress) {
174187
this.ipAddress = ipAddress;
175188
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5445,6 +5445,7 @@ protected ManagementServerResponse createManagementServerResponse(ManagementServ
54455445
mgmtResponse.addPeer(createPeerManagementServerNodeResponse(peer));
54465446
}
54475447
}
5448+
mgmtResponse.setServiceIp(mgmt.getServiceIP());
54485449
mgmtResponse.setIpAddress(mgmt.getServiceIP());
54495450
mgmtResponse.setObjectName("managementserver");
54505451
return mgmtResponse;

0 commit comments

Comments
 (0)