userVmData.addSecurityGroup(resp);
}
long nic_id = rs.getLong("nics.id");
if (nic_id > 0){
NicData nicResponse = userVmData.newNicData();
nicResponse.setId(nic_id);
nicResponse.setIpaddress(rs.getString("nics.ip4_address"));
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"));
int account_type = rs.getInt("account.type");
if (account_type == Account.ACCOUNT_TYPE_ADMIN) {
nicResponse.setBroadcastUri(rs.getString("nics.broadcast_uri"));
nicResponse.setIsolationUri(rs.getString("nics.isolation_uri"));
}
nicResponse.setTrafficType(rs.getString("networks.traffic_type"));
nicResponse.setType(rs.getString("networks.guest_type"));
nicResponse.setIsDefault(rs.getBoolean("nics.default_nic"));
nicResponse.setObjectName("nic");
userVmData.addNic(nicResponse);
}
long publicIpId = rs.getLong("user_ip_address.id");
if (publicIpId > 0){