Package com.xensource.xenapi

Examples of com.xensource.xenapi.Connection


    private Answer execute(RevertToVMSnapshotCommand cmd) {
        String vmName = cmd.getVmName();
        List<VolumeTO> listVolumeTo = cmd.getVolumeTOs();
        VMSnapshot.Type vmSnapshotType = cmd.getTarget().getType();
        Boolean snapshotMemory = vmSnapshotType == VMSnapshot.Type.DiskAndMemory;
        Connection conn = getConnection();
        VirtualMachine.State vmState = null;
        VM vm = null;
        try {

            // remove vm from s_vms, for delta sync
View Full Code Here


            s_logger.debug("Cannot destory CD-ROM device for VM " + vmName + " due to " + e.toString(), e);
        }
    }

    protected CheckSshAnswer execute(CheckSshCommand cmd) {
        Connection conn = getConnection();
        String vmName = cmd.getName();
        String privateIp = cmd.getIp();
        int cmdPort = cmd.getPort();

        if (s_logger.isDebugEnabled()) {
View Full Code Here

            }
        }
    }
   
    private Answer execute(PvlanSetupCommand cmd) {
      Connection conn = getConnection();
     
      String primaryPvlan = cmd.getPrimary();
      String isolatedPvlan = cmd.getIsolated();
      String op = cmd.getOp();
      String dhcpName = cmd.getDhcpName();
View Full Code Here

      return new Answer(cmd, true, result);
    }

    @Override
    public StartAnswer execute(StartCommand cmd) {
        Connection conn = getConnection();
        VirtualMachineTO vmSpec = cmd.getVirtualMachine();
        String vmName = vmSpec.getName();
        State state = State.Stopped;
        VM vm = null;
        try {
View Full Code Here

        }
        return true;
    }

    private Answer execute(PingTestCommand cmd) {
        Connection conn = getConnection();
        boolean result = false;
        final String computingHostIp = cmd.getComputingHostIp();

        if (computingHostIp != null) {
            result = doPingTest(conn, computingHostIp);
View Full Code Here

        }
        return new Answer(cmd);
    }

    private CheckS2SVpnConnectionsAnswer execute(CheckS2SVpnConnectionsCommand cmd) {
        Connection conn = getConnection();
        String args = "checkbatchs2svpn.sh " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
        for (String ip : cmd.getVpnIps()) {
            args += " " + ip;
        }
        String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args);
View Full Code Here

        }
        return new CheckS2SVpnConnectionsAnswer(cmd, true, result);
    }

    private CheckRouterAnswer execute(CheckRouterCommand cmd) {
        Connection conn = getConnection();
        String args = "checkrouter.sh " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
        String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args);
        if (result == null || result.isEmpty()) {
            return new CheckRouterAnswer(cmd, "CheckRouterCommand failed");
        }
View Full Code Here

        }
        return new CheckRouterAnswer(cmd, result, true);
    }

    private GetDomRVersionAnswer execute(GetDomRVersionCmd cmd) {
        Connection conn = getConnection();
        String args = "get_template_version.sh " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
        String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args);
        if (result == null || result.isEmpty()) {
            return new GetDomRVersionAnswer(cmd, "getDomRVersionCmd failed");
        }
View Full Code Here

        }
        return new GetDomRVersionAnswer(cmd, result, lines[0], lines[1]);
    }

    private Answer execute(BumpUpPriorityCommand cmd) {
        Connection conn = getConnection();
        String args = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
        String result = callHostPlugin(conn, "vmops", "bumpUpPriority", "args", args);
        if (result == null || result.isEmpty()) {
            return new Answer(cmd, false, "BumpUpPriorityCommand failed");
        }
View Full Code Here

        }
        return new Answer(cmd, true, result);
    }

    protected MaintainAnswer execute(MaintainCommand cmd) {
        Connection conn = getConnection();
        try {
            Pool pool = Pool.getByUuid(conn, _host.pool);
            Pool.Record poolr = pool.getRecord(conn);

            Host.Record hostr = poolr.master.getRecord(conn);
View Full Code Here

TOP

Related Classes of com.xensource.xenapi.Connection

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.