Examples of authorizeIngressPortsToCIDRs()


Examples of org.jclouds.cloudstack.features.SecurityGroupApi.authorizeIngressPortsToCIDRs()

      expect(client.getAsyncJobApi()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-1")).andReturn(zone);
      expect(secClient.getSecurityGroupByName("group-1")).andReturn(null);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupApi.authorizeIngressPortsToCIDRs()

      expect(client.getZoneApi()).andReturn(zoneClient);
      expect(client.getAsyncJobApi()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-abc1")).andReturn(zone);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupApi.authorizeIngressPortsToCIDRs()

      expect(client.getAsyncJobApi()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-1")).andReturn(zone);
      expect(secClient.getSecurityGroupByName("group-1")).andReturn(null);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupApi.authorizeIngressPortsToCIDRs()

      expect(client.getZoneApi()).andReturn(zoneClient);
      expect(client.getAsyncJobApi()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-abc1")).andReturn(zone);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupClient.authorizeIngressPortsToCIDRs()

      expect(client.getAsyncJobClient()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-1")).andReturn(zone);
      expect(secClient.getSecurityGroupByName("group-1")).andReturn(null);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupClient.authorizeIngressPortsToCIDRs()

      expect(client.getZoneClient()).andReturn(zoneClient);
      expect(client.getAsyncJobClient()).andReturn(jobClient).anyTimes();

      expect(zoneClient.getZone("zone-abc1")).andReturn(zone);
      expect(secClient.createSecurityGroup("group-1")).andReturn(group);
      expect(secClient.authorizeIngressPortsToCIDRs("sec-1234",
                                                    "TCP",
                                                    22,
                                                    22,
                                                    ImmutableSet.of("0.0.0.0/0"))).andReturn("job-1234");
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupClient.authorizeIngressPortsToCIDRs()

        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()));
            }
View Full Code Here

Examples of org.jclouds.cloudstack.features.SecurityGroupClient.authorizeIngressPortsToCIDRs()

        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()));
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.