Skip to content

Commit 6bc12fa

Browse files
minchen07chipchilders
authored andcommitted
CLOUDSTACK-1511 and CLOUDSTACK-1446
1 parent 86a2a75 commit 6bc12fa

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public UserVmResponse newUserVmResponse(String objectName, UserVmJoinVO userVm,
185185
nicResponse.setGateway(userVm.getGateway());
186186
nicResponse.setNetmask(userVm.getNetmask());
187187
nicResponse.setNetworkid(userVm.getNetworkUuid());
188+
nicResponse.setNetworkName(userVm.getNetworkName());
188189
nicResponse.setMacAddress(userVm.getMacAddress());
189190
nicResponse.setIp6Address(userVm.getIp6Address());
190191
nicResponse.setIp6Gateway(userVm.getIp6Gateway());
@@ -246,6 +247,7 @@ public UserVmResponse setUserVmResponse(UserVmResponse userVmData, UserVmJoinVO
246247
nicResponse.setGateway(uvo.getGateway());
247248
nicResponse.setNetmask(uvo.getNetmask());
248249
nicResponse.setNetworkid(uvo.getNetworkUuid());
250+
nicResponse.setNetworkName(uvo.getNetworkName());
249251
nicResponse.setMacAddress(uvo.getMacAddress());
250252
nicResponse.setIp6Address(uvo.getIp6Address());
251253
nicResponse.setIp6Gateway(uvo.getIp6Gateway());

server/src/com/cloud/api/query/vo/UserVmJoinVO.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
293293
@Column(name="network_uuid")
294294
private String networkUuid;
295295

296+
@Column(name="network_name")
297+
private String networkName;
298+
296299
@Column(name="traffic_type")
297300
@Enumerated(value=EnumType.STRING)
298301
private TrafficType trafficType;
@@ -1168,6 +1171,16 @@ public void setNetworkId(long networkId) {
11681171
}
11691172

11701173

1174+
public String getNetworkName() {
1175+
return networkName;
1176+
}
1177+
1178+
1179+
public void setNetworkName(String networkName) {
1180+
this.networkName = networkName;
1181+
}
1182+
1183+
11711184
public TrafficType getTrafficType() {
11721185
return trafficType;
11731186
}

setup/db/db/schema-40to410.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ CREATE VIEW `cloud`.`user_vm_view` AS
572572
vpc.id vpc_id,
573573
vpc.uuid vpc_uuid,
574574
networks.uuid network_uuid,
575+
networks.name network_name,
575576
networks.traffic_type traffic_type,
576577
networks.guest_type guest_type,
577578
user_ip_address.id public_ip_id,
@@ -750,7 +751,7 @@ CREATE VIEW `cloud`.`domain_router_view` AS
750751
left join
751752
`cloud`.`networks` ON nics.network_id = networks.id
752753
left join
753-
`cloud`.`vpc` ON networks.vpc_id = vpc.id
754+
`cloud`.`vpc` ON domain_router.vpc_id = vpc.id
754755
left join
755756
`cloud`.`async_job` ON async_job.instance_id = vm_instance.id
756757
and async_job.instance_type = 'DomainRouter'

0 commit comments

Comments
 (0)