Package org.jclouds.googlecomputeengine.domain

Examples of org.jclouds.googlecomputeengine.domain.Firewall$Rule$Builder


            String segment = currTextSegment.toString();
            List<Rule> parentMatches = getMatches().peek();
            int len = parentMatches.size();
            for ( int i = 0; i < len; ++i )
            {
                Rule r = parentMatches.get( i );
                if ( r instanceof TextSegmentHandler )
                {
                    TextSegmentHandler h = (TextSegmentHandler) r;
                    try
                    {
View Full Code Here


    {

        @Override
        protected void configure()
        {
            forPattern( "bar" ).addRule( new Rule()
            {

                @Override
                public void body( String namespace, String name, String text )
                    throws Exception
View Full Code Here

            Log log = getDigester().getLogger();
            boolean debug = log.isDebugEnabled();
            for ( int i = 0; i < rules.size(); i++ )
            {
                int j = ( rules.size() - i ) - 1;
                Rule rule = rules.get( j );
                if ( debug )
                {
                    log.debug( "  Fire end() for " + rule );
                }
                try
                {
                    rule.end( namespaceURI, name );
                }
                catch ( Exception e )
                {
                    throw getDigester().createSAXException( e );
                }
View Full Code Here

                              .build()))
              .addSourceRange("10.0.0.0/8")
              .addSourceTag("tag1")
              .addTargetTag("tag2");

      Firewall firewall = api().get(FIREWALL_NAME);
      assertNotNull(firewall);
      assertFirewallEquals(firewall, patchedFirewall);
   }
View Full Code Here

    * @see org.jclouds.googlecomputeengine.features.FirewallAsyncApi#patch(String, org.jclouds.googlecomputeengine.options.FirewallOptions)
    */
   private void getOrCreateFirewall(GoogleComputeEngineTemplateOptions templateOptions, Network network,
                                    String sharedResourceName) {

      Firewall firewall = api.getFirewallApiForProject(userProject.get()).get(sharedResourceName);

      if (firewall != null) {
         return;
      }

View Full Code Here

                              .build()))
              .addSourceRange("10.0.0.0/8")
              .addSourceTag("tag1")
              .addTargetTag("tag2");

      Firewall firewall = api().get(FIREWALL_NAME);
      assertNotNull(firewall);
      assertFirewallEquals(firewall, patchedFirewall);
   }
View Full Code Here

      FirewallApi firewallApi = api.getFirewallApiForProject(projectName);
      Set<AtomicReference<Operation>> operations = Sets.newHashSet();

      for (Integer port : templateOptions.getInboundPorts()) {
         String name = naming.name(port);
         Firewall firewall = firewallApi.get(name);
         if (firewall == null) {
            ImmutableSet<Firewall.Rule> rules = ImmutableSet.of(Firewall.Rule.permitTcpRule(port), Firewall.Rule.permitUdpRule(port));
            FirewallOptions firewallOptions = new FirewallOptions()
                    .name(name)
                    .network(network.getSelfLink())
View Full Code Here

    * @see org.jclouds.googlecomputeengine.features.FirewallAsyncApi#patch(String, org.jclouds.googlecomputeengine.options.FirewallOptions)
    */
   private void getOrCreateFirewall(GoogleComputeEngineTemplateOptions templateOptions, Network network,
                                    String sharedResourceName) {

      Firewall firewall = api.getFirewallApiForProject(userProject.get()).get(sharedResourceName);

      if (firewall != null) {
         return;
      }

View Full Code Here

                              .build()))
              .addSourceRange("10.0.0.0/8")
              .addSourceTag("tag1")
              .addTargetTag("tag2");

      Firewall firewall = api().get(FIREWALL_NAME);
      assertNotNull(firewall);
      assertFirewallEquals(firewall, patchedFirewall);
   }
View Full Code Here

      FirewallApi firewallApi = api.getFirewallApiForProject(projectName);
      Set<AtomicReference<Operation>> operations = Sets.newHashSet();

      for (Integer port : templateOptions.getInboundPorts()) {
         String name = naming.name(port);
         Firewall firewall = firewallApi.get(name);
         if (firewall == null) {
            ImmutableSet<Firewall.Rule> rules = ImmutableSet.of(Firewall.Rule.permitTcpRule(port), Firewall.Rule.permitUdpRule(port));
            FirewallOptions firewallOptions = new FirewallOptions()
                    .name(name)
                    .network(network.getSelfLink())
View Full Code Here

TOP

Related Classes of org.jclouds.googlecomputeengine.domain.Firewall$Rule$Builder

Copyright © 2018 www.massapicom. 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.