mirror of https://github.com/apache/cloudstack.git
IPv6: Add nic response to user vm
This commit is contained in:
parent
f7047eba73
commit
f55c23318a
|
|
@ -93,6 +93,7 @@ public class ApiConstants {
|
|||
public static final String INTERNAL_DNS2 = "internaldns2";
|
||||
public static final String INTERVAL_TYPE = "intervaltype";
|
||||
public static final String IP_ADDRESS = "ipaddress";
|
||||
public static final String IP6_ADDRESS = "ip6address";
|
||||
public static final String IP_ADDRESS_ID = "ipaddressid";
|
||||
public static final String IP_AVAILABLE = "ipavailable";
|
||||
public static final String IP_LIMIT = "iplimit";
|
||||
|
|
|
|||
|
|
@ -186,8 +186,4 @@ public class VlanIpRangeResponse extends BaseResponse implements ControlledEntit
|
|||
public void setIp6Cidr(String ip6Cidr) {
|
||||
this.ip6Cidr = ip6Cidr;
|
||||
}
|
||||
|
||||
public String getphysicalNetworkId() {
|
||||
return physicalNetworkId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1627,6 +1627,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
nicResponse.setIpaddress(singleNicProfile.getIp4Address());
|
||||
nicResponse.setGateway(singleNicProfile.getGateway());
|
||||
nicResponse.setNetmask(singleNicProfile.getNetmask());
|
||||
nicResponse.setIp6Address(singleNicProfile.getIp6Address());
|
||||
nicResponse.setIp6Gateway(singleNicProfile.getIp6Gateway());
|
||||
nicResponse.setIp6Cidr(singleNicProfile.getIp6Cidr());
|
||||
nicResponse.setNetworkid(singleNicProfile.getNetworkId());
|
||||
nicResponse.setNetworkName(ApiDBUtils.findNetworkById(singleNicProfile.getNetworkId()).getName());
|
||||
if (acct.getType() == Account.ACCOUNT_TYPE_ADMIN) {
|
||||
|
|
@ -1769,6 +1772,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
nicResponse.setIpaddress(singleNicProfile.getIp4Address());
|
||||
nicResponse.setGateway(singleNicProfile.getGateway());
|
||||
nicResponse.setNetmask(singleNicProfile.getNetmask());
|
||||
nicResponse.setIp6Address(singleNicProfile.getIp6Address());
|
||||
nicResponse.setIp6Gateway(singleNicProfile.getIp6Gateway());
|
||||
nicResponse.setIp6Cidr(singleNicProfile.getIp6Cidr());
|
||||
nicResponse.setNetworkid(singleNicProfile.getNetworkId());
|
||||
nicResponse.setNetworkName(network.getName());
|
||||
|
||||
|
|
@ -3415,6 +3421,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
nr.setNetmask(nd.getNetmask());
|
||||
nr.setGateway(nd.getGateway());
|
||||
nr.setIpaddress(nd.getIpaddress());
|
||||
nr.setIp6Address(nd.getIp6Address());
|
||||
nr.setIp6Gateway(nd.getIp6Gateway());
|
||||
nr.setIp6Cidr(nd.getIp6Cidr());
|
||||
nr.setIsolationUri(nd.getIsolationUri());
|
||||
nr.setBroadcastUri(nd.getBroadcastUri());
|
||||
nr.setTrafficType(nd.getTrafficType());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ public class PublicIpv6AddressVO implements PublicIpv6Address {
|
|||
@Column(name="id")
|
||||
long id;
|
||||
|
||||
@Id
|
||||
@Column(name="ip_address")
|
||||
@Enumerated(value=EnumType.STRING)
|
||||
private String address = null;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
|
|||
"vm_template.enable_password, service_offering.id, disk_offering.name, storage_pool.id, storage_pool.pool_type, " +
|
||||
"service_offering.cpu, service_offering.speed, service_offering.ram_size, volumes.id, volumes.device_id, volumes.volume_type, security_group.id, security_group.name, " +
|
||||
"security_group.description, nics.id, nics.ip4_address, nics.default_nic, nics.gateway, nics.network_id, nics.netmask, nics.mac_address, nics.broadcast_uri, nics.isolation_uri, " +
|
||||
"nics.ip6_address, nics.ip6_gateway, nics.ip6_cidr, " +
|
||||
"networks.traffic_type, networks.guest_type, user_ip_address.id, user_ip_address.public_ip_address from vm_instance " +
|
||||
"left join account on vm_instance.account_id=account.id " +
|
||||
"left join domain on vm_instance.domain_id=domain.id " +
|
||||
|
|
@ -508,7 +509,10 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
|
|||
nicResponse.setGateway(rs.getString("nics.gateway"));
|
||||
nicResponse.setNetmask(rs.getString("nics.netmask"));
|
||||
nicResponse.setNetworkid(rs.getLong("nics.network_id"));
|
||||
nicResponse.setMacAddress(rs.getString("nics.mac_address"));
|
||||
nicResponse.setMacAddress(rs.getString("nics.mac_address"));
|
||||
nicResponse.setIp6Address(rs.getString("nics.ip6_address"));
|
||||
nicResponse.setIp6Gateway(rs.getString("nics.ip6_gateway"));
|
||||
nicResponse.setIp6Cidr(rs.getString("nics.ip6_cidr"));
|
||||
|
||||
int account_type = rs.getInt("account.type");
|
||||
if (account_type == Account.ACCOUNT_TYPE_ADMIN) {
|
||||
|
|
|
|||
|
|
@ -450,6 +450,9 @@ public class UserVmData {
|
|||
private String type;
|
||||
private Boolean isDefault;
|
||||
private String macAddress;
|
||||
private String ip6Gateway;
|
||||
private String ip6Address;
|
||||
private String ip6Cidr;
|
||||
|
||||
public String getObjectName() {
|
||||
return objectName;
|
||||
|
|
@ -571,6 +574,30 @@ public class UserVmData {
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getIp6Gateway() {
|
||||
return ip6Gateway;
|
||||
}
|
||||
|
||||
public void setIp6Gateway(String ip6Gateway) {
|
||||
this.ip6Gateway = ip6Gateway;
|
||||
}
|
||||
|
||||
public String getIp6Address() {
|
||||
return ip6Address;
|
||||
}
|
||||
|
||||
public void setIp6Address(String ip6Address) {
|
||||
this.ip6Address = ip6Address;
|
||||
}
|
||||
|
||||
public String getIp6Cidr() {
|
||||
return ip6Cidr;
|
||||
}
|
||||
|
||||
public void setIp6Cidr(String ip6Cidr) {
|
||||
this.ip6Cidr = ip6Cidr;
|
||||
}
|
||||
}
|
||||
|
||||
public class SecurityGroupData {
|
||||
|
|
|
|||
Loading…
Reference in New Issue