Tabnine Logo
SecurityGroupClient.authorizeIngressPortsToCIDRs
Code IndexAdd Tabnine to your IDE (free)

How to use
authorizeIngressPortsToCIDRs
method
in
org.jclouds.cloudstack.features.SecurityGroupClient

Best Java code snippets using org.jclouds.cloudstack.features.SecurityGroupClient.authorizeIngressPortsToCIDRs (Showing top 2 results out of 315)

origin: org.apache.provisionr/provisionr-cloudstack

  public static void applyNetworkRules(CloudStackClient cloudStackClient, SecurityGroup securityGroup, Network network) {
    SecurityGroupClient securityGroupClient = cloudStackClient.getSecurityGroupClient();
    for (Rule rule : network.getIngress()) {
      if (rule.getProtocol() == Protocol.ICMP) {
        securityGroupClient.authorizeIngressICMPToCIDRs(securityGroup.getId(), DEFAULT_ICMP_CODE,
          DEFAULT_ICMP_TYPE, ImmutableList.of(rule.getCidr()));
      } else {
        securityGroupClient.authorizeIngressPortsToCIDRs(securityGroup.getId(),
          rule.getProtocol().name(),
          rule.getPorts().lowerEndpoint(),
          rule.getPorts().upperEndpoint(),
          Lists.newArrayList(rule.getCidr()));
      }
    }
  }
}
origin: jclouds/legacy-jclouds

ImmutableSet<String> cidrs = ImmutableSet.of(cidr);
assertTrue(jobComplete.apply(client.getSecurityGroupClient().authorizeIngressICMPToCIDRs(group.getId(), 0, 8, cidrs)), group.toString());
assertTrue(jobComplete.apply(client.getSecurityGroupClient().authorizeIngressPortsToCIDRs(group.getId(), "TCP", 22,
   22, cidrs)), group.toString());
org.jclouds.cloudstack.featuresSecurityGroupClientauthorizeIngressPortsToCIDRs

Javadoc

Authorizes a particular TCP or UDP ingress rule for this security group

Popular methods of SecurityGroupClient

  • authorizeIngressICMPToCIDRs
    Authorizes a particular ICMP ingress rule for this security group
  • createSecurityGroup
    Creates a security group
  • deleteSecurityGroup
    delete a specific security group by id
  • listSecurityGroups
    Lists security groups
  • revokeIngressRule
    Deletes a particular ingress rule from this security group
  • getSecurityGroup
    get a specific security group by id

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JList (javax.swing)
  • 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