Esempio n. 1
0
File: SSH.java Progetto: ning/atlas
 public SSH(Host host, Space space, String credentialName) throws IOException {
   this(
       SSHCredentials.lookup(space, credentialName)
           .otherwise(SSHCredentials.defaultCredentials(space))
           .otherwise(
               new IllegalStateException("no ssh credentials available for " + host.getId())),
       space
           .get(host.getId(), Server.class, Missing.RequireAll)
           .otherwise(new IllegalStateException("no server info available for " + host.getId()))
           .getExternalAddress());
 }
Esempio n. 2
0
File: SSH.java Progetto: ning/atlas
 public SSH(Identity hostId, String credentialName, Space space) throws IOException {
   this(
       SSHCredentials.lookup(space, credentialName)
           .otherwise(SSHCredentials.defaultCredentials(space))
           .otherwise(
               new IllegalStateException("Unable to find ssh credentials for " + credentialName)),
       space
           .get(hostId, Server.class, Missing.RequireAll)
           .otherwise(
               new IllegalStateException("Unable to find server info to ssh into " + hostId))
           .getExternalAddress());
 }