@Override public boolean isSecondaryIpSetForNic(final long nicId) { final NicVO nic = _nicDao.findById(nicId); return nic.getSecondaryIp(); }
@Override public Long doInTransaction(TransactionStatus status) { boolean nicSecondaryIpSet = nicVO.getSecondaryIp(); if (!nicSecondaryIpSet) { nicVO.setSecondaryIp(true); // commit when previously set ?? s_logger.debug("Setting nics table ..."); _nicDao.update(nicId, nicVO); } s_logger.debug("Setting nic_secondary_ip table ..."); Long vmId = nicVO.getInstanceId(); NicSecondaryIpVO secondaryIpVO = new NicSecondaryIpVO(nicId, ip4AddrFinal, ip6AddrFinal, vmId, ipOwner.getId(), ipOwner.getDomainId(), networkId); _nicSecondaryIpDao.persist(secondaryIpVO); return secondaryIpVO.getId(); } });
List<String> nicSecIps = null; if (nic != null) { if (nic.getSecondaryIp()) { nicSecIps = _nicSecIpDao.getSecondaryIpAddressesForNic(nic.getId());
List<String> nicSecIps = null; if (nic != null) { if (nic.getSecondaryIp()) {
if (nicVO.getSecondaryIp()) { secIps = _nicSecIpDao.getSecondaryIpAddressesForNic(nicVO.getId());
AllFieldsSearch.and("isDefault", AllFieldsSearch.entity().isDefaultNic(), Op.EQ); AllFieldsSearch.and("broadcastUri", AllFieldsSearch.entity().getBroadcastUri(), Op.EQ); AllFieldsSearch.and("secondaryip", AllFieldsSearch.entity().getSecondaryIp(), Op.EQ); AllFieldsSearch.and("nicid", AllFieldsSearch.entity().getId(), Op.EQ); AllFieldsSearch.and("strategy", AllFieldsSearch.entity().getReservationStrategy(), Op.EQ);