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

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

Best Java code snippets using com.cloud.agent.api.to.IpAddressTO.getTrafficType (Showing top 4 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 VIF getCorrectVif(final Connection conn, final VM router, final IpAddressTO ip) throws XmlRpcException, XenAPIException {
  final NicTO nic = new NicTO();
  nic.setType(ip.getTrafficType());
  nic.setName(ip.getNetworkName());
  if (ip.getBroadcastUri() == null) {
    nic.setBroadcastType(BroadcastDomainType.Native);
  } else {
    final URI uri = BroadcastDomainType.fromString(ip.getBroadcastUri());
    nic.setBroadcastType(BroadcastDomainType.getSchemeValue(uri));
    nic.setBroadcastUri(uri);
  }
  final Network network = getNetwork(conn, nic);
  // Determine the correct VIF on DomR to associate/disassociate the
  // IP address with
  final Set<VIF> routerVIFs = router.getVIFs(conn);
  for (final VIF vif : routerVIFs) {
    final Network vifNetwork = vif.getNetwork(conn);
    if (vifNetwork.getUuid(conn).equals(network.getUuid(conn))) {
      return vif;
    }
  }
  return null;
}
origin: apache/cloudstack

nic.setType(ip.getTrafficType());
if (ip.getBroadcastUri() == null) {
  nic.setBroadcastType(BroadcastDomainType.Native);
origin: apache/cloudstack

nic.setType(ip.getTrafficType());
if (ip.getBroadcastUri() == null) {
  nic.setBroadcastType(BroadcastDomainType.Native);
com.cloud.agent.api.toIpAddressTOgetTrafficType

Popular methods of IpAddressTO

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

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • 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
  • Top plugins for WebStorm
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