Skip to content

Commit f5cc308

Browse files
bug 7140: Add MAC address in response list of LlistVirtualMachines API.
status 7140: resolved fixed
1 parent 25fd7cd commit f5cc308

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎api/src/com/cloud/api/response/NicResponse.java‎

100644100755
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public class NicResponse extends BaseResponse {
5252
@SerializedName("isdefault") @Param(description="true if nic is default, false otherwise")
5353
private Boolean isDefault;
5454

55+
@SerializedName("macaddress") @Param(description="true if nic is default, false otherwise")
56+
private String macAddress;
57+
5558
public Long getId() {
5659
return id;
5760
}
@@ -131,4 +134,12 @@ public Boolean getIsDefault() {
131134
public void setIsDefault(Boolean isDefault) {
132135
this.isDefault = isDefault;
133136
}
137+
138+
public String getMacAddress() {
139+
return macAddress;
140+
}
141+
142+
public void setMacAddress(String macAddress) {
143+
this.macAddress = macAddress;
144+
}
134145
}

‎server/src/com/cloud/api/ApiResponseHelper.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ public List<UserVmResponse> createUserVmResponse(String objectName, UserVm... us
11851185
nicResponse.setGateway(singleNicProfile.getGateway());
11861186
nicResponse.setNetmask(singleNicProfile.getNetmask());
11871187
nicResponse.setNetworkid(singleNicProfile.getNetworkId());
1188+
nicResponse.setMacAddress(singleNicProfile.getMacAddress());
11881189
if (acct.getType() == Account.ACCOUNT_TYPE_ADMIN) {
11891190
if (singleNicProfile.getBroadCastUri() != null) {
11901191
nicResponse.setBroadcastUri(singleNicProfile.getBroadCastUri().toString());

0 commit comments

Comments
 (0)