bug 7140: Add MAC address in response list of LlistVirtualMachines API.

status 7140: resolved fixed
This commit is contained in:
nit 2011-04-29 18:39:17 +05:30
parent 25fd7cd999
commit f5cc308e77
2 changed files with 12 additions and 0 deletions

11
api/src/com/cloud/api/response/NicResponse.java Normal file → Executable file
View File

@ -52,6 +52,9 @@ public class NicResponse extends BaseResponse {
@SerializedName("isdefault") @Param(description="true if nic is default, false otherwise")
private Boolean isDefault;
@SerializedName("macaddress") @Param(description="true if nic is default, false otherwise")
private String macAddress;
public Long getId() {
return id;
}
@ -131,4 +134,12 @@ public class NicResponse extends BaseResponse {
public void setIsDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
public String getMacAddress() {
return macAddress;
}
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}
}

View File

@ -1185,6 +1185,7 @@ public class ApiResponseHelper implements ResponseGenerator {
nicResponse.setGateway(singleNicProfile.getGateway());
nicResponse.setNetmask(singleNicProfile.getNetmask());
nicResponse.setNetworkid(singleNicProfile.getNetworkId());
nicResponse.setMacAddress(singleNicProfile.getMacAddress());
if (acct.getType() == Account.ACCOUNT_TYPE_ADMIN) {
if (singleNicProfile.getBroadCastUri() != null) {
nicResponse.setBroadcastUri(singleNicProfile.getBroadCastUri().toString());