Skip to content

Commit 3f84b9a

Browse files
committed
Merge remote-tracking branch 'origin/4.14' into 4.15
2 parents 1cfb449 + 025b654 commit 3f84b9a

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

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

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3972,7 +3972,6 @@ public NicResponse createNicResponse(Nic result) {
39723972
NicResponse response = new NicResponse();
39733973
NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId());
39743974
VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, result.getInstanceId());
3975-
UserVmJoinVO userVm = _entityMgr.findById(UserVmJoinVO.class, result.getInstanceId());
39763975
List<NicExtraDhcpOptionVO> nicExtraDhcpOptionVOs = _nicExtraDhcpOptionDao.listByNicId(result.getId());
39773976

39783977
// The numbered comments are to keep track of the data returned from here and UserVmJoinDaoImpl.setUserVmResponse()
@@ -3986,15 +3985,13 @@ public NicResponse createNicResponse(Nic result) {
39863985
response.setVmId(vm.getUuid());
39873986
}
39883987

3989-
if (userVm != null){
3990-
if (userVm.getTrafficType() != null) {
3991-
/*4: trafficType*/
3992-
response.setTrafficType(userVm.getTrafficType().toString());
3993-
}
3994-
if (userVm.getGuestType() != null) {
3995-
/*5: guestType*/
3996-
response.setType(userVm.getGuestType().toString());
3997-
}
3988+
if (network.getTrafficType() != null) {
3989+
/*4: trafficType*/
3990+
response.setTrafficType(network.getTrafficType().toString());
3991+
}
3992+
if (network.getGuestType() != null) {
3993+
/*5: guestType*/
3994+
response.setType(network.getGuestType().toString());
39983995
}
39993996
/*6: ipAddress*/
40003997
response.setIpaddress(result.getIPv4Address());
@@ -4003,9 +4000,7 @@ public NicResponse createNicResponse(Nic result) {
40034000
/*8: netmask*/
40044001
response.setNetmask(result.getIPv4Netmask());
40054002
/*9: networkName*/
4006-
if(userVm != null && userVm.getNetworkName() != null) {
4007-
response.setNetworkName(userVm.getNetworkName());
4008-
}
4003+
response.setNetworkName(network.getName());
40094004
/*10: macAddress*/
40104005
response.setMacAddress(result.getMacAddress());
40114006
/*11: IPv6Address*/

test/integration/smoke/test_vm_life_cycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ def test_03_migrate_detached_volume(self):
13291329

13301330
Volume.migrate(self.apiclient, storageid=target_pool.id, volumeid=volume1.id)
13311331

1332-
vol = Volume.list(self.apiclient, volume=volume1.id)[0]
1332+
vol = Volume.list(self.apiclient, id=volume1.id)[0]
13331333

13341334
self.assertEqual(vol.storageid, target_pool.id, "Storage pool was not the same as expected")
13351335

0 commit comments

Comments
 (0)