Last active
December 22, 2015 19:09
-
-
Save zack-shoylev/6518025 to your computer and use it in GitHub Desktop.
Print the results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
String provider = compute.getContext().toString().contains("rackspace") ? | |
"Rackspace CloudServers" : "Openstack Nova"; | |
System.out.println("Provider: " + provider); | |
System.out.println("Credentials: " + node.getCredentials()); | |
if (node.getCredentials().getOptionalPrivateKey().isPresent()) { | |
System.out.println(" Login: ssh -i jclouds.pem " + node.getCredentials().getUser() + "@" + address); | |
} | |
else { | |
System.out.println(" Login: ssh " + node.getCredentials().getUser() + "@" + address); | |
System.out.println(" Password: " + node.getCredentials().getPassword()); | |
} | |
if(!"demo:demo".equals(user)) { | |
System.out.println(" Go to http://" + address); | |
} | |
} | |
catch (Throwable e) { | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment