コード例 #1
0
ファイル: SSH.java プロジェクト: 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());
 }
コード例 #2
0
ファイル: SSH.java プロジェクト: 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());
 }