@Override public void execCommand(String id, String command, String login, String key) { DeploymentGetResponse response = null; try { response = computeManagementClient.getDeploymentsOperations().getByName(id,id); } catch (IOException e) { e.printStackTrace(); } catch (ServiceException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } catch (URISyntaxException e) { e.printStackTrace(); } SSHConnector sc=new SSHConnector(key, login, response.getVirtualIPAddresses().get(0).getAddress().getHostAddress()); sc.execCommandSsh(command); }
String ip=response.getVirtualIPAddresses().get(0).getAddress().getHostAddress(); runtimeInformation.put("publicAddress", ip); a.setId(a.getName());