Package com.cloud.agent.api

Examples of com.cloud.agent.api.ReadyAnswer


    // ENTRY POINTS...
   

    private Answer execute(ReadyCommand cmd) {
        return new ReadyAnswer(cmd);
    }
View Full Code Here


            return Answer.createUnsupportedCommandAnswer(cmd);
        }
    }

  private Answer execute(ReadyCommand cmd) {
        return new ReadyAnswer(cmd);
    }
View Full Code Here

            } else if (cmd instanceof StopCommand) {
                return execute((StopCommand) cmd);
            } else if (cmd instanceof CheckVirtualMachineCommand) {
                return execute((CheckVirtualMachineCommand) cmd);
            } else if (cmd instanceof ReadyCommand) {
                return new ReadyAnswer((ReadyCommand)cmd);
            } else if (cmd instanceof ShutdownCommand) {
                return execute((ShutdownCommand)cmd);
            } else {
                return _simMgr.simulate(cmd, hostGuid);
            }
View Full Code Here

        try {
            VmwareContext context = getServiceContext();
            VmwareHypervisorHost hyperHost = getHyperHost(context);
            if(hyperHost.isHyperHostConnected()) {
                return new ReadyAnswer(cmd);
            } else {
                return new ReadyAnswer(cmd, "Host is not in connect state");
            }
        } catch(Exception e) {
            s_logger.error("Unexpected exception: ", e);
            return new ReadyAnswer(cmd, VmwareHelper.getExceptionMessage(e));
        }
    }
View Full Code Here

        } catch (Exception e) {
        }
        try {
            boolean result = cleanupHaltedVms(conn);
            if (!result) {
                return new ReadyAnswer(cmd, "Unable to cleanup halted vms");
            }
        } catch (XenAPIException e) {
            s_logger.warn("Unable to cleanup halted vms", e);
            return new ReadyAnswer(cmd, "Unable to cleanup halted vms");
        } catch (XmlRpcException e) {
            s_logger.warn("Unable to cleanup halted vms", e);
            return new ReadyAnswer(cmd, "Unable to cleanup halted vms");
        }

        return new ReadyAnswer(cmd);
    }
View Full Code Here

        }

    }

    private Answer executeRequest(ReadyCommand cmd) {
        return new ReadyAnswer(cmd);
    }
View Full Code Here

  protected ReadyAnswer execute(ReadyCommand cmd) {
    try {
      OvmHost.Details d = OvmHost.getDetails(_conn);
      //TODO: cleanup halted vm
      if (d.masterIp.equalsIgnoreCase(_ip)) {
        return new ReadyAnswer(cmd);
      } else {
        s_logger.debug("Master IP changes to " + d.masterIp + ", it should be " + _ip);
        return new ReadyAnswer(cmd, "I am not the master server");
      }
    } catch (XmlRpcException e) {
      s_logger.debug("XML RPC Exception" + e.getMessage(), e);
      throw new CloudRuntimeException("XML RPC Exception" + e.getMessage(), e);
    }
View Full Code Here

        } else if (cmd instanceof GetStorageStatsCommand) {
            return execute((GetStorageStatsCommand) cmd);
        } else if (cmd instanceof CheckHealthCommand) {
            return new CheckHealthAnswer((CheckHealthCommand) cmd, true);
        } else if (cmd instanceof ReadyCommand) {
            return new ReadyAnswer((ReadyCommand) cmd);
        } else if (cmd instanceof SecStorageFirewallCfgCommand) {
            return execute((SecStorageFirewallCfgCommand) cmd);
        } else if (cmd instanceof SecStorageVMSetupCommand) {
            return execute((SecStorageVMSetupCommand) cmd);
        } else if (cmd instanceof SecStorageSetupCommand) {
View Full Code Here

        return new AttachVolumeAnswer(cmd, cmd.getDeviceId(), cmd.getVolumePath());
    }

    private Answer execute(ReadyCommand cmd) {
        return new ReadyAnswer(cmd);
    }
View Full Code Here

        } else if (cmd instanceof CheckHealthCommand) {
            return new CheckHealthAnswer((CheckHealthCommand)cmd, true);
        } else if (cmd instanceof SecStorageSetupCommand){
            return new Answer(cmd, true, "success");
        } else if (cmd instanceof ReadyCommand) {
            return new ReadyAnswer((ReadyCommand)cmd);
        } else if (cmd instanceof ListTemplateCommand){
            return execute((ListTemplateCommand)cmd);  
        } else if (cmd instanceof ComputeChecksumCommand){
            return execute((ComputeChecksumCommand)cmd);
        } else {
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.ReadyAnswer

Copyright © 2018 www.massapicom. 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.