Package org.globus.workspace.service.binding.vm

Examples of org.globus.workspace.service.binding.vm.VirtualMachine


    protected void init() throws WorkspaceException {
        this.name = "Ready-For-Transport";
        this.doFakeLag = true;
        this.async = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());

            final ArrayList exe =
                    this.ctx.getLocator().getPropagationAdapter().
                            constructUnpropagateCommand(vm);
View Full Code Here


    protected void init() throws WorkspaceException {
        this.name = "MOCK-Shutdown-Trash";
        this.doFakeLag = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm == null) {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
       
        final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());
        final ArrayList exe = XenUtil.constructRemoveCommand(vm, true);
        ssh.addAll(exe);

        if (fail) {
            this.doFakeFail = true;
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Shutdown-Normal";
        this.doFakeLag = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
        final ArrayList exe =
                XenUtil.constructRemoveCommand(vm, false);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Pause";
        this.doFakeLag = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());
            final ArrayList exe = XenUtil.constructPauseCommand(vm);
            ssh.addAll(exe);
            this.cmd = (String[]) ssh.toArray(new String[ssh.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Shutdown-Trash";
        this.doFakeLag = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());
            final ArrayList exe = XenUtil.constructRemoveCommand(vm, true);
            ssh.addAll(exe);
            this.cmd = (String[]) ssh.toArray(new String[ssh.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Start";
        this.doFakeLag = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList exe =
                    XenUtil.constructCreateCommand(vm, false);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
View Full Code Here

        if (traceLog) {
            logger.trace("Beginning start pre-execute");
        }

        // init would have thrown exception if null
        final VirtualMachine vm = this.ctx.getVm();

        final FileCopyNeed[] needs = vm.getFileCopyNeeds();
        if (needs == null || needs.length == 0) {
            if (traceLog) {
                logger.debug("customization file push: nothing to do");
            }
            return null;
        }

        final PathConfigs paths = this.ctx.getLocator().getPathConfigs();
        final String backendDirectory = paths.getBackendTempDirPath();
        final String localDirectory = paths.getLocalTempDirPath();

        try {
            XenUtil.doFilePushLocalTarget(vm,
                                          localDirectory,
                                          backendDirectory,
                                          fake,
                                          eventLog,
                                          traceLog);
        } catch (Exception e) {
            return e;
        }

        // todo: do not like this concept (waiting for ORM overhaul)
        final int vmid = vm.getID().intValue();
        for (int i = 0; i < needs.length; i++) {
            try {
                needs[i].setOnImage(true);
                this.ctx.getLocator().getPersistenceAdapter().
                        setFileCopyOnImage(vmid, needs[i]);
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Propagate-To-Pause";
        this.doFakeLag = true;
        this.async = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());

            final ArrayList exe =
                    this.ctx.getLocator().getPropagationAdapter().
                            constructPropagateToPauseCommand(vm);
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Propagate-To-Start";
        this.doFakeLag = true;
        this.async = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {

            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());

            final ArrayList exe =
                    this.ctx.getLocator().getPropagationAdapter().
                            constructPropagateToStartCommand(vm);
View Full Code Here

    protected void init() throws WorkspaceException {
        this.name = "Propagate-Only";
        this.doFakeLag = true;
        this.async = true;

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList ssh = SSHUtil.constructSshCommand(vm.getNode());
            final ArrayList exe = this.ctx.getLocator().
                         getPropagationAdapter().constructPropagateCommand(vm);
            ssh.addAll(exe);

            final String credentialName = vm.getCredentialName();
            if (credentialName != null) {

                ssh.add("--prop-extra-args");
                ssh.add("'credential=" + credentialName + "'");
            }
View Full Code Here

TOP

Related Classes of org.globus.workspace.service.binding.vm.VirtualMachine

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.