Examples of executeCommand()


Examples of org.platformlayer.ops.OpsTarget.executeCommand()

    target.executeCommand("sync");
    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }
View Full Code Here

Examples of org.platformlayer.ops.OpsTarget.executeCommand()

    target.executeCommand("umount {0}", new File(rootfsDir, "proc"));

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
View Full Code Here

Examples of org.platformlayer.ops.OpsTarget.executeCommand()

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
View Full Code Here

Examples of org.platformlayer.ops.OpsTarget.executeCommand()

    if (!buildTar) {
      target.executeCommand("sync");
      target.executeCommand("umount {0}", rootfsDir);
      target.executeCommand("sync");
      target.executeCommand("kpartx -d {0}", imageFile);
      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
      target.executeCommand(compress.setTimeout(TimeSpan.FIFTEEN_MINUTES));
View Full Code Here

Examples of org.platformlayer.ops.OpsTarget.executeCommand()

      target.executeCommand("sync");
    }

    if (buildTar) {
      Command compress = Command.build("cd {0}; tar jcf {1} .", rootfsDir, imageFile);
      target.executeCommand(compress.setTimeout(TimeSpan.FIFTEEN_MINUTES));
    }

    FilesystemInfo imageInfo = target.getFilesystemInfoFile(imageFile);

    File uploadImageFile;
View Full Code Here

Examples of org.platformlayer.ops.OpsTarget.executeCommand()

        // 3) Mounting a qcow2 image (or other image formats) is tricky vs
        // loopback mount
        uploadImageFile = new File(imageFile.getParentFile(), "image.qcow2");
        command = Command.build("qemu-img convert -f raw -O qcow2 {0} {1}", imageFile, uploadImageFile);
        command.setTimeout(TimeSpan.THIRTY_MINUTES);
        target.executeCommand(command);
      } else {
        uploadImageFile = new File(imageFile.getParentFile(), "image.raw.gz");

        command = Command.build("gzip -c --best {0} > {1}", imageFile, uploadImageFile);
        command.setTimeout(TimeSpan.THIRTY_MINUTES);
View Full Code Here

Examples of org.springframework.data.mongodb.core.MongoTemplate.executeCommand()

    assertEquals("localhost", servers.get(1).getHost());
    assertEquals(10001, servers.get(0).getPort());
    assertEquals(10002, servers.get(1).getPort());

    MongoTemplate template = new MongoTemplate(mongo, "admin");
    CommandResult result = template.executeCommand("{replSetGetStatus : 1}");
    assertEquals("blort", result.getString("set"));
  }
}
View Full Code Here

Examples of org.springframework.shell.core.JLineShellComponent.executeCommand()

  @Test
  public void testShellWithCredentials() throws Exception {
    Bootstrap bootstrap = new Bootstrap();
    JLineShellComponent shell = bootstrap.getJLineShellComponent();
    CommandResult commandResult = shell.executeCommand("admin config server --uri http://localhost:" + adminPort + " --username admin --password whosThere");
    assertThat(commandResult.isSuccess(), is(true));
    commandResult = shell.executeCommand("module list");
    assertThat(commandResult.isSuccess(), is(true));
    assertThat(commandResult.getResult(), instanceOf(Table.class));
    assertThat(((Table) commandResult.getResult()).getHeaders().size(), greaterThan(0));
View Full Code Here

Examples of org.teiid.cdk.api.ConnectorHost.executeCommand()

    }

    public void helpTestQuery(String sql, TranslationUtility metadata, int waitTime, int rowCount, Object[][] expectedResults) throws TranslatorException {
      ConnectorHost host = new ConnectorHost(exampleProperties(waitTime, rowCount), null, metadata);
                             
      List actualResults = host.executeCommand(sql);
      
        // Compare actual and expected results
        assertEquals("Did not get expected number of rows", expectedResults.length, actualResults.size()); //$NON-NLS-1$
       
        if(expectedResults.length > 0) {
View Full Code Here

Examples of org.teiid.cdk.api.ConnectorHost.executeCommand()

       
        ConnectorHost host = new ConnectorHost(exampleProperties(waitTime, 1), null, FakeTranslationFactory.getInstance().getBQTTranslationUtility());
               
        for(int i=0; i<testCount; i++) {
            long before = System.currentTimeMillis();
            host.executeCommand("SELECT intkey FROM BQT1.SmallA"); //$NON-NLS-1$
            long after = System.currentTimeMillis();
            assertTrue("Waited too long", (after-before) <= waitTime); //$NON-NLS-1$
        }           
    }
   
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.