Skip to content

Instantly share code, notes, and snippets.

@etoews
Last active October 11, 2015 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etoews/3862516 to your computer and use it in GitHub Desktop.
Save etoews/3862516 to your computer and use it in GitHub Desktop.
jclouds workshop
private void awaitSsh(String ip) throws TimeoutException {
SocketOpen socketOpen = computeServices.get(0).getContext().utils().injector().getInstance(SocketOpen.class);
Predicate<HostAndPort> socketTester = retry(socketOpen, 300, 5, 5, SECONDS);
socketTester.apply(HostAndPort.fromParts(ip, 22));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment