diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java index f561449fe2a..8b6abf8a3e4 100644 --- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java @@ -185,6 +185,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBase implem nicResponse.setGateway(userVm.getGateway()); nicResponse.setNetmask(userVm.getNetmask()); nicResponse.setNetworkid(userVm.getNetworkUuid()); + nicResponse.setNetworkName(userVm.getNetworkName()); nicResponse.setMacAddress(userVm.getMacAddress()); nicResponse.setIp6Address(userVm.getIp6Address()); nicResponse.setIp6Gateway(userVm.getIp6Gateway()); @@ -246,6 +247,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBase implem nicResponse.setGateway(uvo.getGateway()); nicResponse.setNetmask(uvo.getNetmask()); nicResponse.setNetworkid(uvo.getNetworkUuid()); + nicResponse.setNetworkName(uvo.getNetworkName()); nicResponse.setMacAddress(uvo.getMacAddress()); nicResponse.setIp6Address(uvo.getIp6Address()); nicResponse.setIp6Gateway(uvo.getIp6Gateway()); diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java index d7238224e4e..33c49cdeae9 100644 --- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java +++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java @@ -293,6 +293,9 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity { @Column(name="network_uuid") private String networkUuid; + @Column(name="network_name") + private String networkName; + @Column(name="traffic_type") @Enumerated(value=EnumType.STRING) private TrafficType trafficType; @@ -1168,6 +1171,16 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity { } + public String getNetworkName() { + return networkName; + } + + + public void setNetworkName(String networkName) { + this.networkName = networkName; + } + + public TrafficType getTrafficType() { return trafficType; } diff --git a/setup/db/db/schema-40to410.sql b/setup/db/db/schema-40to410.sql index 0f316a5acdd..9d51030876c 100644 --- a/setup/db/db/schema-40to410.sql +++ b/setup/db/db/schema-40to410.sql @@ -572,6 +572,7 @@ CREATE VIEW `cloud`.`user_vm_view` AS vpc.id vpc_id, vpc.uuid vpc_uuid, networks.uuid network_uuid, + networks.name network_name, networks.traffic_type traffic_type, networks.guest_type guest_type, user_ip_address.id public_ip_id, @@ -750,7 +751,7 @@ CREATE VIEW `cloud`.`domain_router_view` AS left join `cloud`.`networks` ON nics.network_id = networks.id left join - `cloud`.`vpc` ON networks.vpc_id = vpc.id + `cloud`.`vpc` ON domain_router.vpc_id = vpc.id left join `cloud`.`async_job` ON async_job.instance_id = vm_instance.id and async_job.instance_type = 'DomainRouter'