@Override public int hashCode() { final int prime = 31; int result = 1; String oid = this.getId(); result = prime * result + ((oid == null) ? 0 : oid.hashCode()); return result; }
public void setIpAddress(final Set<NicResponse> nics) { if (nics != null && nics.size() > 0) { this.ipAddress = nics.iterator().next().getIpaddress(); } }
NicResponse nicResponse = new NicResponse(); nicResponse.setId(vr.getNicUuid()); nicResponse.setIpaddress(vr.getIpAddress()); nicResponse.setGateway(vr.getGateway()); nicResponse.setNetmask(vr.getNetmask()); nicResponse.setNetworkid(vr.getNetworkUuid()); nicResponse.setNetworkName(vr.getNetworkName()); nicResponse.setMacAddress(vr.getMacAddress()); nicResponse.setIp6Address(vr.getIp6Address()); nicResponse.setIp6Gateway(vr.getIp6Gateway()); nicResponse.setIp6Cidr(vr.getIp6Cidr()); if (vr.getBroadcastUri() != null) { nicResponse.setBroadcastUri(vr.getBroadcastUri().toString()); nicResponse.setIsolationUri(vr.getIsolationUri().toString()); nicResponse.setTrafficType(vr.getTrafficType().toString()); nicResponse.setType(vr.getGuestType().toString()); nicResponse.setIsDefault(vr.isDefaultNic()); nicResponse.setObjectName("nic"); vrData.addNic(nicResponse);
NicResponse response = new NicResponse(); NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId()); VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, result.getInstanceId()); response.setId(result.getUuid()); response.setNetworkid(network.getUuid()); response.setVmId(vm.getUuid()); response.setTrafficType(userVm.getTrafficType().toString()); response.setType(userVm.getGuestType().toString()); response.setIpaddress(result.getIPv4Address()); response.setGateway(result.getIPv4Gateway()); response.setNetmask(result.getIPv4Netmask()); response.setNetworkName(userVm.getNetworkName()); response.setMacAddress(result.getMacAddress()); response.setIp6Address(result.getIPv6Address()); response.setIp6Gateway(result.getIPv6Gateway()); response.setIp6Cidr(result.getIPv6Cidr());
for (Nic r : results) { NicResponse resp = _responseGenerator.createNicResponse(r); resp.setObjectName("nic"); resList.add(resp);
NicResponse nicResponse = new NicResponse(); nicResponse.setId(uvo.getNicUuid()); nicResponse.setNetworkid(uvo.getNetworkUuid()); nicResponse.setTrafficType(uvo.getTrafficType().toString()); nicResponse.setType(uvo.getGuestType().toString()); nicResponse.setIpaddress(uvo.getIpAddress()); nicResponse.setGateway(uvo.getGateway()); nicResponse.setNetmask(uvo.getNetmask()); nicResponse.setNetworkName(uvo.getNetworkName()); nicResponse.setMacAddress(uvo.getMacAddress()); nicResponse.setIp6Address(uvo.getIp6Address()); nicResponse.setIp6Gateway(uvo.getIp6Gateway()); nicResponse.setIp6Cidr(uvo.getIp6Cidr()); nicResponse.setBroadcastUri(uvo.getBroadcastUri().toString()); nicResponse.setIsolationUri(uvo.getIsolationUri().toString());
long nic_id = userVm.getNicId(); if (nic_id > 0) { NicResponse nicResponse = new NicResponse(); nicResponse.setId(userVm.getNicUuid()); nicResponse.setIpaddress(userVm.getIpAddress()); 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()); nicResponse.setIp6Cidr(userVm.getIp6Cidr()); if (userVm.getBroadcastUri() != null) { nicResponse.setBroadcastUri(userVm.getBroadcastUri().toString()); nicResponse.setIsolationUri(userVm.getIsolationUri().toString()); nicResponse.setTrafficType(userVm.getTrafficType().toString()); nicResponse.setType(userVm.getGuestType().toString()); nicResponse.setIsDefault(userVm.isDefaultNic()); List<NicSecondaryIpVO> secondaryIps = ApiDBUtils.findNicSecondaryIps(userVm.getNicId()); if (secondaryIps != null) { nicResponse.setSecondaryIps(ipList); nicResponse.setObjectName("nic");
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NicResponse other = (NicResponse)obj; String oid = this.getId(); if (oid == null) { if (other.getId() != null) return false; } else if (!oid.equals(other.getId())) return false; return true; }
NicResponse nicResponse = new NicResponse(); nicResponse.setId(router.getNicUuid()); nicResponse.setIpaddress(router.getIpAddress()); nicResponse.setGateway(router.getGateway()); nicResponse.setNetmask(router.getNetmask()); nicResponse.setNetworkid(router.getNetworkUuid()); nicResponse.setNetworkName(router.getNetworkName()); nicResponse.setMacAddress(router.getMacAddress()); nicResponse.setIp6Address(router.getIp6Address()); nicResponse.setIp6Gateway(router.getIp6Gateway()); nicResponse.setIp6Cidr(router.getIp6Cidr()); if (router.getBroadcastUri() != null) { nicResponse.setBroadcastUri(router.getBroadcastUri().toString()); nicResponse.setIsolationUri(router.getIsolationUri().toString()); nicResponse.setTrafficType(router.getTrafficType().toString()); nicResponse.setType(router.getGuestType().toString()); nicResponse.setIsDefault(router.isDefaultNic()); nicResponse.setObjectName("nic"); routerResponse.addNic(nicResponse);