Tabnine Logo
SecurityGroupApi.createRuleAllowingSecurityGroupId
Code IndexAdd Tabnine to your IDE (free)

How to use
createRuleAllowingSecurityGroupId
method
in
org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupApi

Best Java code snippets using org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupApi.createRuleAllowingSecurityGroupId (Showing top 8 results out of 315)

origin: org.apache.jclouds.api/openstack-nova

RegionAndId regionAndId = RegionAndId.fromSlashEncoded(regionAndGroupRaw);
String groupId = regionAndId.getId();
sgApi.get().createRuleAllowingSecurityGroupId(id,
    Ingress.builder()
        .ipProtocol(ipPermission.getIpProtocol())
origin: io.cloudsoft.jclouds.api/openstack-nova

ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(zoneAndGroupRaw);
String groupId = zoneAndId.getId();
sgApi.get().createRuleAllowingSecurityGroupId(id,
    Ingress.builder()
        .ipProtocol(ipPermission.getIpProtocol())
origin: com.amysta.jclouds.api/openstack-nova

RegionAndId regionAndId = RegionAndId.fromSlashEncoded(regionAndGroupRaw);
String groupId = regionAndId.getId();
sgApi.get().createRuleAllowingSecurityGroupId(id,
    Ingress.builder()
        .ipProtocol(ipPermission.getIpProtocol())
origin: apache/jclouds

RegionAndId regionAndId = RegionAndId.fromSlashEncoded(regionAndGroupRaw);
String groupId = regionAndId.getId();
sgApi.get().createRuleAllowingSecurityGroupId(id,
    Ingress.builder()
        .ipProtocol(ipPermission.getIpProtocol())
origin: jclouds/legacy-jclouds

assertNotNull(rule);
SecurityGroupRule rule2 = securityGroupApi.createRuleAllowingSecurityGroupId(securityGroup.getId(),
    Ingress.builder().ipProtocol(IpProtocol.TCP).fromPort(port).toPort(port).build(), securityGroup
         .getId());
origin: apache/jclouds

assertNotNull(rule);
SecurityGroupRule rule2 = securityGroupApi.createRuleAllowingSecurityGroupId(securityGroup.getId(),
    Ingress.builder().ipProtocol(IpProtocol.TCP).fromPort(port).toPort(port).build(), securityGroup
         .getId());
origin: jclouds/legacy-jclouds

public void testCreateSecurityGroupRuleForSecurityGroupIdWhenResponseIs2xx() throws Exception {
 HttpRequest createRule = HttpRequest
      .builder()
      .method("POST")
      .endpoint("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")
      .addHeader("Accept", "application/json")
      .addHeader("X-Auth-Token", authToken)
      .payload(
          payloadFromStringWithContentType(
               "{\"security_group_rule\":{\"group_id\":\"999\",\"parent_group_id\":\"161\",\"ip_protocol\":\"tcp\",\"from_port\":\"80\",\"to_port\":\"8080\"}}",
               "application/json")).build();
 HttpResponse createRuleResponse = HttpResponse.builder().statusCode(200).payload(
      payloadFromResource("/securitygrouprule_created.json")).build();
 NovaApi apiWhenSecurityGroupsExist = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
      responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createRule,
      createRuleResponse);
 assertEquals(apiWhenSecurityGroupsExist.getSecurityGroupExtensionForZone("az-1.region-a.geo-1").get()
      .createRuleAllowingSecurityGroupId("161",
          Ingress.builder().ipProtocol(IpProtocol.TCP).fromPort(80).toPort(8080).build(), "999")
      .toString(), createRuleExpected().toString());
}
origin: apache/jclouds

public void testCreateSecurityGroupRuleForSecurityGroupIdWhenResponseIs2xx() throws Exception {
 HttpRequest createRule = HttpRequest
      .builder()
      .method("POST")
      .endpoint("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v2/3456/os-security-group-rules")
      .addHeader("Accept", "application/json")
      .addHeader("X-Auth-Token", authToken)
      .payload(
          payloadFromStringWithContentType(
               "{\"security_group_rule\":{\"group_id\":\"999\",\"parent_group_id\":\"161\",\"ip_protocol\":\"tcp\",\"from_port\":\"80\",\"to_port\":\"8080\"}}",
               "application/json")).build();
 HttpResponse createRuleResponse = HttpResponse.builder().statusCode(200).payload(
      payloadFromResource("/securitygrouprule_created.json")).build();
 NovaApi apiWhenSecurityGroupsExist = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
      responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, createRule,
      createRuleResponse);
 assertEquals(apiWhenSecurityGroupsExist.getSecurityGroupApi("az-1.region-a.geo-1").get()
      .createRuleAllowingSecurityGroupId("161",
          Ingress.builder().ipProtocol(IpProtocol.TCP).fromPort(80).toPort(8080).build(), "999")
      .toString(), createRuleExpected().toString());
}
org.jclouds.openstack.nova.v2_0.extensionsSecurityGroupApicreateRuleAllowingSecurityGroupId

Javadoc

Create a Security Group Rule.

Popular methods of SecurityGroupApi

  • createRuleAllowingCidrBlock
    Create a Security Group Rule.
  • list
    List all Security Groups.
  • createWithDescription
    Create a Security Group
  • delete
    Delete a Security Group.
  • deleteRule
    Delete a Security Group Rule.
  • get
    Get a specific Security Group

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JTextField (javax.swing)
  • Top Sublime Text plugins
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