Tabnine Logo
IpAddressTO.isFirstIP
Code IndexAdd Tabnine to your IDE (free)

How to use
isFirstIP
method
in
com.cloud.agent.api.to.IpAddressTO

Best Java code snippets using com.cloud.agent.api.to.IpAddressTO.isFirstIP (Showing top 2 results out of 315)

origin: apache/cloudstack

@Override
public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) {
  final IpAssocCommand command = (IpAssocCommand) cmd;
  final List<IpAddress> ips = new LinkedList<IpAddress>();
  for (final IpAddressTO ip : command.getIpAddresses()) {
    final IpAddress ipAddress = new IpAddress(ip.getPublicIp(), ip.isSourceNat(), ip.isAdd(), ip.isOneToOneNat(), ip.isFirstIP(), ip.getVlanGateway(), ip.getVlanNetmask(),
        ip.getVifMacAddress(), ip.getNicDevId(), ip.isNewNic(), ip.getTrafficType().toString());
    ips.add(ipAddress);
  }
  final IpAssociation ipAssociation = new IpAssociation(ips.toArray(new IpAddress[ips.size()]));
  return generateConfigItems(ipAssociation);
}
origin: apache/cloudstack

protected Answer execute(final IpAssocCommand cmd) {
  if (s_logger.isInfoEnabled()) {
    s_logger.info("Executing resource IPAssocCommand: " + s_gson.toJson(cmd));
  }
  int i = 0;
  final String[] results = new String[cmd.getIpAddresses().length];
  try {
    final IpAddressTO[] ips = cmd.getIpAddresses();
    final String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME);
    final String controlIp = getRouterSshControlIp(cmd);
    for (final IpAddressTO ip : ips) {
      assignPublicIpAddress(routerName, controlIp, ip.getPublicIp(), ip.isAdd(), ip.isFirstIP(), ip.isSourceNat(), ip.getBroadcastUri(), ip.getVlanGateway(),
          ip.getVlanNetmask(), ip.getVifMacAddress());
      results[i++] = ip.getPublicIp() + " - success";
    }
    for (; i < cmd.getIpAddresses().length; i++) {
      results[i++] = IpAssocAnswer.errorResult;
    }
  } catch (final Throwable e) {
    s_logger.error("Unexpected exception: " + e.toString() + " will shortcut rest of IPAssoc commands", e);
    for (; i < cmd.getIpAddresses().length; i++) {
      results[i++] = IpAssocAnswer.errorResult;
    }
  }
  return new IpAssocAnswer(cmd, results);
}
com.cloud.agent.api.toIpAddressTOisFirstIP

Popular methods of IpAddressTO

  • isAdd
  • getBroadcastUri
  • getVifMacAddress
  • getPublicIp
  • setNicDevId
  • getVlanGateway
  • getVlanNetmask
  • isSourceNat
  • setNewNic
  • getTrafficType
  • <init>
  • getNetworkName
  • <init>,
  • getNetworkName,
  • getNetworkRate,
  • getNicDevId,
  • isNewNic,
  • isOneToOneNat,
  • setNetworkName,
  • setTrafficType

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • setContentView (Activity)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Path (java.nio.file)
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now