Examples of PreparePxeServerAnswer


Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

    try {
      String tpl = profile.getTemplate().getUrl();
      assert tpl != null : "How can a null template get here!!!";
      PreparePxeServerCommand cmd = new PreparePxeServerCommand(ip, mac, mask, gateway, dns, tpl,
          profile.getVirtualMachine().getInstanceName(), dest.getHost().getName());
      PreparePxeServerAnswer ans = (PreparePxeServerAnswer) _agentMgr.send(pxeServerId, cmd);
      if (!ans.getResult()) {
        s_logger.warn("Unable tot program PXE server: " + pxeVo.getId() + " because " + ans.getDetails());
        return false;
      }
     
      IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe);
      Answer anw = _agentMgr.send(dest.getHost().getId(), bootCmd);
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

      }
     
      String script = String.format("python /usr/bin/prepare_tftp_bootfile.py restore %1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s %10$s %11$s",
          _tftpDir, cmd.getMac(), _storageServer, _share, _dir, cmd.getTemplate(), _cifsUserName, _cifsPassword, cmd.getIp(), cmd.getNetMask(), cmd.getGateWay());
      if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) {
        return new PreparePxeServerAnswer(cmd, "prepare PING at " + _ip + " failed, command:" + script);
     
      s_logger.debug("Prepare Ping PXE server successfully");
     
      return new PreparePxeServerAnswer(cmd);
    } catch (Exception e){
      s_logger.debug("Prepare PING pxe server failed", e);
      return new PreparePxeServerAnswer(cmd, e.getMessage());
    } finally {
      if (sshConnection != null) {
        sshConnection.close();
      }
    }
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

        try {
            String tpl = profile.getTemplate().getUrl();
            assert tpl != null : "How can a null template get here!!!";
            PreparePxeServerCommand cmd =
                new PreparePxeServerCommand(ip, mac, mask, gateway, dns, tpl, profile.getVirtualMachine().getInstanceName(), dest.getHost().getName());
            PreparePxeServerAnswer ans = (PreparePxeServerAnswer)_agentMgr.send(pxeServerId, cmd);
            if (!ans.getResult()) {
                s_logger.warn("Unable tot program PXE server: " + pxeVo.getId() + " because " + ans.getDetails());
                return false;
            }

            IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe);
            Answer anw = _agentMgr.send(dest.getHost().getId(), bootCmd);
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

            String script =
                String.format("python /usr/bin/prepare_tftp_bootfile.py restore %1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s %10$s %11$s", _tftpDir, cmd.getMac(),
                    _storageServer, _share, _dir, cmd.getTemplate(), _cifsUserName, _cifsPassword, cmd.getIp(), cmd.getNetMask(), cmd.getGateWay());
            if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) {
                return new PreparePxeServerAnswer(cmd, "prepare PING at " + _ip + " failed, command:" + script);
            }
            s_logger.debug("Prepare Ping PXE server successfully");

            return new PreparePxeServerAnswer(cmd);
        } catch (Exception e) {
            s_logger.debug("Prepare PING pxe server failed", e);
            return new PreparePxeServerAnswer(cmd, e.getMessage());
        } finally {
            if (sshConnection != null) {
                sshConnection.close();
            }
        }
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

     
      String script = String.format("python /usr/bin/prepare_tftp_bootfile.py restore %1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s %10$s %11$s",
          _tftpDir, cmd.getMac(), _storageServer, _share, _dir, cmd.getTemplate(), _cifsUserName, _cifsPassword, cmd.getIp(), cmd.getNetMask(), cmd.getGateWay());
      s_logger.debug("Prepare Ping PXE server successfully");
      if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) {
        return new PreparePxeServerAnswer(cmd, "prepare PING at " + _ip + " failed, command:" + script);
     
     
      return new PreparePxeServerAnswer(cmd);
    } catch (Exception e){
      s_logger.debug("Prepare PING pxe server failed", e);
      return new PreparePxeServerAnswer(cmd, e.getMessage());
    } finally {
      if (sshConnection != null) {
        sshConnection.close();
      }
    }
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

    try {
      String tpl = profile.getTemplate().getUrl();
      assert tpl != null : "How can a null template get here!!!";
      PreparePxeServerCommand cmd = new PreparePxeServerCommand(ip, mac, mask, gateway, dns, tpl,
          profile.getVirtualMachine().getInstanceName(), dest.getHost().getName());
      PreparePxeServerAnswer ans = (PreparePxeServerAnswer) _agentMgr.send(pxeServerId, cmd);
      return ans.getResult();
    } catch (Exception e) {
      s_logger.warn("Cannot prepare PXE server", e);
      return false;
    }
  }
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

    try {
      String tpl = profile.getTemplate().getUrl();
      assert tpl != null : "How can a null template get here!!!";
      PreparePxeServerCommand cmd = new PreparePxeServerCommand(ip, mac, mask, gateway, dns, tpl,
          profile.getVirtualMachine().getInstanceName(), dest.getHost().getName());
      PreparePxeServerAnswer ans = (PreparePxeServerAnswer) _agentMgr.send(pxeServerId, cmd);
      if (!ans.getResult()) {
        s_logger.warn("Unable tot program PXE server: " + pxeVo.getId() + " because " + ans.getDetails());
        return false;
      }
     
      IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe);
      Answer anw = _agentMgr.send(dest.getHost().getId(), bootCmd);
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

    try {
      String tpl = profile.getTemplate().getUrl();
      assert tpl != null : "How can a null template get here!!!";
      PreparePxeServerCommand cmd = new PreparePxeServerCommand(ip, mac, mask, gateway, dns, tpl,
          profile.getVirtualMachine().getInstanceName(), dest.getHost().getName());
      PreparePxeServerAnswer ans = (PreparePxeServerAnswer) _agentMgr.send(pxeServerId, cmd);
      if (!ans.getResult()) {
        s_logger.warn("Unable tot program PXE server: " + pxeVo.getId() + " because " + ans.getDetails());
        return false;
      }
     
      IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe);
      Answer anw = _agentMgr.send(dest.getHost().getId(), bootCmd);
View Full Code Here

Examples of com.cloud.agent.api.baremetal.PreparePxeServerAnswer

      }
     
      String script = String.format("python /usr/bin/prepare_tftp_bootfile.py restore %1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s %10$s %11$s",
          _tftpDir, cmd.getMac(), _storageServer, _share, _dir, cmd.getTemplate(), _cifsUserName, _cifsPassword, cmd.getIp(), cmd.getNetMask(), cmd.getGateWay());
      if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) {
        return new PreparePxeServerAnswer(cmd, "prepare PING at " + _ip + " failed, command:" + script);
     
      s_logger.debug("Prepare Ping PXE server successfully");
     
      return new PreparePxeServerAnswer(cmd);
    } catch (Exception e){
      s_logger.debug("Prepare PING pxe server failed", e);
      return new PreparePxeServerAnswer(cmd, e.getMessage());
    } finally {
      if (sshConnection != null) {
        sshConnection.close();
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.