Examples of StatementList


Examples of org.jclouds.scriptbuilder.domain.StatementList

   public static Statement version() {
      return exec(String.format("head -1 %s/VERSION.txt | cut -f1 -d ' '", JETTY_HOME));
   }

   public static Statement install() {
      return new StatementList(
            AdminAccess.builder().adminUsername("web").build(),
            InstallJDK.fromOpenJDK(),
            authorizePortInIpTables(),
            extractTargzAndFlattenIntoDirectory(JETTY_URL, JETTY_HOME),
            exec("chown -R web " + JETTY_HOME));
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

            extractTargzAndFlattenIntoDirectory(JETTY_URL, JETTY_HOME),
            exec("chown -R web " + JETTY_HOME));
   }

   private static Statement authorizePortInIpTables() {
      return new StatementList(
            exec("iptables -I INPUT 1 -p tcp --dport " + port + " -j ACCEPT"),
            exec("iptables-save"));
   }
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

            statements.add(new AuthorizeRSAPublicKeys(sshDir, authorizeRSAPublicKeys));
         if (installRSAPrivateKey != null)
            statements.add(new InstallRSAPrivateKey(sshDir, installRSAPrivateKey));
      }
      statements.add(Statements.exec(String.format("chown -R %s %s", login, homeDir)));
      return new StatementList(statements.build()).render(family);
   }
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

      }

      Set<? extends NodeMetadata> metadatas = null;

      if (!statements.isEmpty()) {
          options.runScript(new StatementList(statements));
      }

      try {
         metadatas = service.createNodesInGroup(group, number, builder.options(options).build());
      } catch (RunNodesException ex) {
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

                     .cookbookPath("/var/chef/cookbooks") //
                     .runlist(RunList.builder().recipes(recipeList).build()) //
                     .build());

               // Build the statement that will perform all the operations above
               StatementList bootstrap = new StatementList(bootstrapBuilder.build());

               // Run the script in the nodes of the group
               runScriptOnGroup(compute, login, groupName, bootstrap);
               break;
            case CHEF:
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

      if (options.getPrivateKey() != null)
         bootstrap.add(new InstallRSAPrivateKey(options.getPrivateKey()));
      if (bootstrap.size() >= 1) {
         if (options.getTaskName() == null && !(options.getRunScript() instanceof InitScript))
            options.nameTask("bootstrap");
         return bootstrap.size() == 1 ? bootstrap.get(0) : new StatementList(bootstrap);
      }
      return null;
   }
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

   public static Statement version() {
      return exec(String.format("head -1 %s/VERSION.txt | cut -f1 -d ' '", JETTY_HOME));
   }

   public static Statement install() {
      return new StatementList(
            AdminAccess.builder().adminUsername("web").build(),
            InstallJDK.fromOpenJDK(),
            authorizePortInIpTables(),
            extractTargzAndFlattenIntoDirectory(JETTY_URL, JETTY_HOME),
            exec("chown -R web " + JETTY_HOME));
View Full Code Here

Examples of org.jclouds.scriptbuilder.domain.StatementList

            extractTargzAndFlattenIntoDirectory(JETTY_URL, JETTY_HOME),
            exec("chown -R web " + JETTY_HOME));
   }

   private static Statement authorizePortInIpTables() {
      return new StatementList(
            exec("iptables -I INPUT 1 -p tcp --dport " + port + " -j ACCEPT"),
            exec("iptables-save"));
   }
View Full Code Here

Examples of org.lilystudio.javascript.StatementList

    }

    if (items.size() > 0) {
      CaseItem item = items.get(items.size() - 1);
      if (item.statement instanceof BlockStatement) {
        StatementList statements = ((BlockStatement) item.statement)
            .getStatementList();
        IStatement statement = statements.get(statements.size() - 1);
        if (statement instanceof ControlStatement
            && ((ControlStatement) statement).getType() == Token.BREAK) {
          statements.remove(statements.size() - 1);
        }
      }
    }

    Node nextNode = node.getNext().getNext();
View Full Code Here

Examples of org.xvr.s3D.statementList

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetStmList(statementList newStmList, NotificationChain msgs)
  {
    statementList oldStmList = stmList;
    stmList = newStmList;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, S3DPackage.CASE_STATEMENT__STM_LIST, oldStmList, newStmList);
      if (msgs == null) msgs = notification; else msgs.add(notification);
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.