Search in sources :

Example 1 with ImageServerConf

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);
}
Also used : SSHSession(com.emc.storageos.networkcontroller.SSHSession) ImageServerConf(com.emc.storageos.imageservercontroller.ImageServerConf) NetworkDeviceControllerException(com.emc.storageos.networkcontroller.exceptions.NetworkDeviceControllerException)

Aggregations

ImageServerConf (com.emc.storageos.imageservercontroller.ImageServerConf)1 SSHSession (com.emc.storageos.networkcontroller.SSHSession)1 NetworkDeviceControllerException (com.emc.storageos.networkcontroller.exceptions.NetworkDeviceControllerException)1