use of com.emc.storageos.imageservercontroller.ImageServerConf in project coprhd-controller by CoprHD.
the class ImageServerDialog method main.
public static void main(String[] args) {
ImageServerDialog d = null;
try {
ImageServerConf imageServerConf = new ImageServerConf();
imageServerConf.setImageServerIp("<IP>");
imageServerConf.setImageServerUser("root");
imageServerConf.setImageServerPassword("<password>");
imageServerConf.setTftpbootDir("/opt/tftpboot/");
imageServerConf.setImageServerSecondIp("<IP>");
imageServerConf.setImageServerHttpPort("44491");
imageServerConf.setImageDir("images");
SSHSession session = new SSHSession();
session.connect(imageServerConf.getImageServerIp(), imageServerConf.getSshPort(), imageServerConf.getImageServerUser(), imageServerConf.getImageServerPassword());
d = new ImageServerDialog(session, imageServerConf.getSshTimeoutMs());
d.init();
d.cd("/tmp");
} catch (Exception e) {
logger.error(e.getMessage(), e);
} finally {
if (d != null && d.isConnected()) {
d.close();
}
}
System.out.println("exit");
System.exit(0);
}
Aggregations