> + }
> +
> + private NodeMetadata locateInstance(final String instanceName, final
> String zone)
> + throws RunNodesException, TimeoutException {
> + System.out.format("Locating instance: %s%n", zone + "/" +
> instanceName);
> +
> + NodeMetadata instance = computeService.getNodeMetadata(zone + "/" +
> instanceName);
> +
> + return instance;
> + }
> +
> + private void executeSimpleCommand(
> + final NodeMetadata instance, final String googleUserName, final
> String sshPrivateKey) {
> + String script = new ScriptBuilder()
> + .addStatement(exec("ls -l /"))
> + .render(OsFamily.UNIX);
The script builder shouldn't be used directly. Change this to just `Statement
script = Statements.exec("ls -l /")` and pass directly the Statement object to
the `runScriptOnNode` method?
This way jclouds will automatically render it based on the node operating
system type. There's no need to manually render the statement.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/56/files#r15585536