congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SecurityGroupClient.createSecurityGroup
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.provisionr/provisionr-cloudstack

public static SecurityGroup createSecurityGroup(CloudStackClient cloudStackClient, String securityGroupName) {
  SecurityGroupClient securityGroupClient = cloudStackClient.getSecurityGroupClient();
  return securityGroupClient.createSecurityGroup(securityGroupName);
}
origin: jclouds/legacy-jclouds

@Test
public void testCreateDestroySecurityGroup() {
 try {
   zone = Iterables.find(client.getZoneClient().listZones(), new Predicate<Zone>() {
    @Override
    public boolean apply(Zone arg0) {
      return arg0.isSecurityGroupsEnabled();
    }
   });
   securityGroupsSupported = true;
   for (SecurityGroup securityGroup : client.getSecurityGroupClient().listSecurityGroups(
      ListSecurityGroupsOptions.Builder.named(prefix))) {
    for (IngressRule rule : securityGroup.getIngressRules())
      assertTrue(jobComplete.apply(client.getSecurityGroupClient().revokeIngressRule(rule.getId())), rule.toString());
    client.getSecurityGroupClient().deleteSecurityGroup(securityGroup.getId());
   }
   group = client.getSecurityGroupClient().createSecurityGroup(prefix);
   assertEquals(group.getName(), prefix);
   checkGroup(group);
   try {
    client.getSecurityGroupClient().createSecurityGroup(prefix);
    fail("Expected IllegalStateException");
   } catch (IllegalStateException e) {
   }
 } catch (NoSuchElementException e) {
   e.printStackTrace();
 }
}
org.jclouds.cloudstack.featuresSecurityGroupClientcreateSecurityGroup

Javadoc

Creates a security group

Popular methods of SecurityGroupClient

  • authorizeIngressICMPToCIDRs
    Authorizes a particular ICMP ingress rule for this security group
  • authorizeIngressPortsToCIDRs
    Authorizes a particular TCP or UDP ingress rule for this 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
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
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