IPAddressVO.getUuid
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.cloud.network.dao.IPAddressVO.getUuid(Showing top 15 results out of 315)

origin: apache/cloudstack

@Override
public String getUuid() {
  return _addr.getUuid();
}
origin: apache/cloudstack

public void createFloatingIp(IPAddressVO dbIp, StringBuffer syncLogMesg) throws Exception {
  if (dbIp.getState() == IpAddress.State.Releasing) {
    /* Don't need to push releasing ip */
    syncLogMesg.append("fip# DB: " + dbIp.getUuid() + ", state releasing, don't create in vnc\n");
    return;
  }
  syncLogMesg.append("fip# DB: " + dbIp.getAddress().addr() + "; VNC: none; action: create\n");
  if (!_manager.createFloatingIp(PublicIp.createFromAddrAndVlan(dbIp, _vlanDao.findById(dbIp.getVlanId())))) {
    syncLogMesg.append("fip# VNC: " + dbIp.getAddress().addr() + " unable to create\n");
    return;
  }
  syncLogMesg.append("fip# VNC: " + dbIp.getUuid() + " created\n");
}
origin: apache/cloudstack

  @Override
  public IPAddressVO doInTransaction(TransactionStatus status) {
    if (updateIpResourceCount(ip)) {
      _resourceLimitMgr.decrementResourceCount(_ipAddressDao.findById(addrId).getAllocatedToAccountId(), ResourceType.public_ip);
    }
    // Save usage event
    if (ip.getAllocatedToAccountId() != null && ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
      VlanVO vlan = _vlanDao.findById(ip.getVlanId());
      String guestType = vlan.getVlanType().toString();
      if (!isIpDedicated(ip)) {
        String eventType = ip.isPortable() ? EventTypes.EVENT_PORTABLE_IP_RELEASE : EventTypes.EVENT_NET_IP_RELEASE;
        UsageEventUtils.publishUsageEvent(eventType, ip.getAllocatedToAccountId(), ip.getDataCenterId(), addrId, ip.getAddress().addr(), ip.isSourceNat(),
            guestType, ip.getSystem(), ip.getClass().getName(), ip.getUuid());
      }
    }
    return _ipAddressDao.markAsUnavailable(addrId);
  }
});
origin: apache/cloudstack

  @Override
  public void doInTransactionWithoutResult(TransactionStatus status) {
    Account owner = _accountMgr.getAccount(addr.getAllocatedToAccountId());
    if (_ipAddressDao.lockRow(addr.getId(), true) != null) {
      final IPAddressVO userIp = _ipAddressDao.findById(addr.getId());
      if (userIp.getState() == IpAddress.State.Allocating || addr.getState() == IpAddress.State.Free) {
        addr.setState(IpAddress.State.Allocated);
        if (_ipAddressDao.update(addr.getId(), addr)) {
          // Save usage event
          if (owner.getAccountId() != Account.ACCOUNT_ID_SYSTEM) {
            VlanVO vlan = _vlanDao.findById(addr.getVlanId());
            String guestType = vlan.getVlanType().toString();
            if (!isIpDedicated(addr)) {
              UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_ASSIGN, owner.getId(), addr.getDataCenterId(), addr.getId(),
                  addr.getAddress().toString(),
                  addr.isSourceNat(), guestType, addr.getSystem(), addr.getClass().getName(), addr.getUuid());
            }
            if (updateIpResourceCount(addr)) {
              _resourceLimitMgr.incrementResourceCount(owner.getId(), ResourceType.public_ip);
            }
          }
        } else {
          s_logger.error("Failed to mark public IP as allocated with id=" + addr.getId() + " address=" + addr.getAddress());
        }
      }
    } else {
      s_logger.error("Failed to acquire row lock to mark public IP as allocated with id=" + addr.getId() + " address=" + addr.getAddress());
    }
  }
});
origin: apache/cloudstack

@Override
@ActionEvent(eventType = EventTypes.EVENT_DISABLE_STATIC_NAT, eventDescription = "disabling static nat", async = true)
public boolean disableStaticNat(long ipId) throws ResourceUnavailableException, NetworkRuleConflictException, InsufficientAddressCapacityException {
  CallContext ctx = CallContext.current();
  Account caller = ctx.getCallingAccount();
  IPAddressVO ipAddress = _ipAddressDao.findById(ipId);
  checkIpAndUserVm(ipAddress, null, caller, false);
  if (ipAddress.getSystem()) {
    InvalidParameterValueException ex = new InvalidParameterValueException("Can't disable static nat for system IP address with specified id");
    ex.addProxyObject(ipAddress.getUuid(), "ipId");
    throw ex;
  }
  Long vmId = ipAddress.getAssociatedWithVmId();
  if (vmId == null) {
    InvalidParameterValueException ex = new InvalidParameterValueException("Specified IP address id is not associated with any vm Id");
    ex.addProxyObject(ipAddress.getUuid(), "ipId");
    throw ex;
  }
  // if network has elastic IP functionality supported, we first have to disable static nat on old ip in order to
  // re-enable it on the new one enable static nat takes care of that
  Network guestNetwork = _networkModel.getNetwork(ipAddress.getAssociatedWithNetworkId());
  NetworkOffering offering = _entityMgr.findById(NetworkOffering.class, guestNetwork.getNetworkOfferingId());
  if (offering.getElasticIp()) {
    if (offering.getAssociatePublicIP()) {
      getSystemIpAndEnableStaticNatForVm(_vmDao.findById(vmId), true);
      return true;
    }
  }
  return disableStaticNat(ipId, caller, ctx.getCallingUserId(), false);
}
origin: apache/cloudstack

FloatingIpModel current = fipPoolModel.getFloatingIpModel(db.getUuid());
if (current == null) {
  s_logger.debug("add model " + db.getAddress().addr());
  FloatingIpModel fipModel = new FloatingIpModel(db.getUuid());
  fipModel.addToFloatingIpPool(fipPoolModel);
  fipModel.build(_manager.getModelController(), PublicIp.createFromAddrAndVlan(db, _vlanDao.findById(db.getVlanId())));
origin: apache/cloudstack

for (final IPAddressVO ip : ips) {
  UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_ASSIGN, vlanOwner.getId(), ip.getDataCenterId(), ip.getId(), ip.getAddress().toString(),
      ip.isSourceNat(), vlan.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid());
origin: apache/cloudstack

lbResponse.setPublicIpId(publicIp.getUuid());
lbResponse.setPublicIp(publicIp.getAddress().addr());
lbResponse.setPublicPort(Integer.toString(loadBalancer.getSourcePortStart()));
origin: apache/cloudstack

ipaddr.getAddress().toString(), ipaddr.isSourceNat(), null, ipaddr.getSystem(), ipaddr.getClass().getName(), ipaddr.getUuid());
origin: apache/cloudstack

List<String> floatingIpUuids = new ArrayList<String>();
for (IPAddressVO ip : ips) {
  floatingIpUuids.add(ip.getUuid());
origin: apache/cloudstack

 ipAddress.getAddress()+" with Id " +ipAddress.getUuid()+" as the vm " +vm.getInstanceName() + " with Id " +
vm.getUuid() +" is already associated with another public ip " + oldIP.getAddress() +" with id "+
oldIP.getUuid());
origin: apache/cloudstack

throwInvalidIdException("Can't release system IP address with specified id", ipVO.getUuid(), "systemIpAddrId");
origin: apache/cloudstack

ex.addProxyObject(ipAddress.getUuid(), "ipId");
throw ex;
origin: apache/cloudstack

resourceCountToBeDecrement++;
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, acctVln.get(0).getAccountId(), ip.getDataCenterId(), ip.getId(),
    ip.getAddress().toString(), ip.isSourceNat(), vlanRange.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid());
origin: apache/cloudstack

if (!ipsInUse.contains(ip)) {
  UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, acctVln.get(0).getAccountId(), ip.getDataCenterId(), ip.getId(), ip.getAddress().toString(),
      ip.isSourceNat(), vlan.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid());
com.cloud.network.daoIPAddressVOgetUuid

Popular methods of IPAddressVO

  • getId
  • getAddress
  • getVlanId
  • isSourceNat
  • getAllocatedTime
  • getAssociatedWithNetworkId
  • getAssociatedWithVmId
  • getDataCenterId
  • getState
  • getVpcId
  • isOneToOneNat
  • setAssociatedWithNetworkId
  • isOneToOneNat,
  • setAssociatedWithNetworkId,
  • setState,
  • getAllocatedToAccountId,
  • getSystem,
  • getVmIp,
  • isPortable,
  • setAssociatedWithVmId,
  • setOneToOneNat

Popular classes and methods

  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Runner (org.openjdk.jmh.runner)
    Runner executes JMH benchmarks.This is the entry point for JMH Java API. Runner is not usually reu

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)