mgmt: add back serviceip in ManagementServerResponse (#10891)

* mgmt: add back serviceip in ManagementServerResponse

* api: add Deprecated annotation to serviceip
This commit is contained in:
Wei Zhou 2025-05-21 06:25:52 +02:00 committed by GitHub
parent 34896a1ada
commit d0dc6d8093
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 0 deletions

View File

@ -448,6 +448,7 @@ public class ApiConstants {
public static final String SENT = "sent";
public static final String SENT_BYTES = "sentbytes";
public static final String SERIAL = "serial";
public static final String SERVICE_IP = "serviceip";
public static final String SERVICE_OFFERING_ID = "serviceofferingid";
public static final String SESSIONKEY = "sessionkey";
public static final String SHOW_CAPACITIES = "showcapacities";

View File

@ -74,6 +74,11 @@ public class ManagementServerResponse extends BaseResponse {
@Param(description = "the running OS kernel version for this Management Server")
private String kernelVersion;
@Deprecated
@SerializedName(ApiConstants.SERVICE_IP)
@Param(description = "the IP Address for this Management Server. This is deprecated, please use 'ipaddress' instead.")
private String serviceIp;
@SerializedName(ApiConstants.IP_ADDRESS)
@Param(description = "the IP Address for this Management Server")
private String ipAddress;
@ -122,6 +127,10 @@ public class ManagementServerResponse extends BaseResponse {
return lastBoot;
}
public String getServiceIp() {
return serviceIp;
}
public String getIpAddress() {
return ipAddress;
}
@ -170,6 +179,10 @@ public class ManagementServerResponse extends BaseResponse {
this.kernelVersion = kernelVersion;
}
public void setServiceIp(String serviceIp) {
this.serviceIp = serviceIp;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}

View File

@ -5445,6 +5445,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
mgmtResponse.addPeer(createPeerManagementServerNodeResponse(peer));
}
}
mgmtResponse.setServiceIp(mgmt.getServiceIP());
mgmtResponse.setIpAddress(mgmt.getServiceIP());
mgmtResponse.setObjectName("managementserver");
return mgmtResponse;