Package org.nimbustools.api._repr

Examples of org.nimbustools.api._repr._SpotCreateRequest


    public CreateRequest getCreateRequest(String name, int durationSecs, int mem, int numNodes, String idemToken) throws Exception {
        return getCreateRequest(name, durationSecs, mem, numNodes, idemToken, null, null);
    }

    public CreateRequest getCreateRequest(String name, int durationSecs, int mem, int numNodes, String idemToken, String networkName) throws Exception {
        final _CreateRequest req = this.repr._newCreateRequest();

        populate(req, durationSecs, name, mem, numNodes, false, idemToken, networkName, null);

        return req;
    }
View Full Code Here


        return req;
    }

    public CreateRequest getCreateRequest(String name, int durationSecs, int mem, int numNodes, String idemToken, String networkName, String zoneName) throws Exception {
        final _CreateRequest req = this.repr._newCreateRequest();

        populate(req, durationSecs, name, mem, numNodes, false, idemToken, networkName, zoneName);

        return req;
    }
View Full Code Here

                  ResourceRequestDeniedException,
                  SchedulingException,
                  AuthorizationException {

        InstanceResource[] resources = this.creation.create(req, caller);
        final _CreateResult result = this.repr._newCreateResult();
        if(resources.length > 0){
            result.setCoscheduledID(resources[0].getEnsembleId());
            result.setGroupID(resources[0].getGroupId());
        }

        try {
            result.setVMs(getInstances(resources));
        } catch (CannotTranslateException e) {
            throw new MetadataException(e.getMessage(), e);
        }
       
       
View Full Code Here

        if (customizes != null && customizes.length > 0) {
            final CustomizationRequest[] crs =
                    new CustomizationRequest[customizes.length];
            for (int i = 0; i < customizes.length; i++) {
                final _CustomizationRequest cr =
                        this.repr._newCustomizationRequest();
                cr.setContent(customizes[i].getContent());
                cr.setPathOnVM(customizes[i].getPathOnVM());
                crs[i] = cr;
            }
            req.setCustomizationRequests(crs);
        }
View Full Code Here

            final String url = mdServer.getContactURL(nics);

            // all conditions are met, cause a new customization task to
            // be added:
            if (path != null && url != null) {
                final _CustomizationRequest req =
                        reprFactory._newCustomizationRequest();
                req.setContent(url);
                req.setPathOnVM(path);
                return req;
            }
        }

        return null;
View Full Code Here

        }

        // currently ignored: groupSet, placement, kernel, ramdiskid,
        // blockDeviceMapping

        final _CustomizationRequest cust;
        final String keyname = launchSpec.getKeyName();
        if (keyname != null && this.sshKeys != null) {
            cust = this.repr._newCustomizationRequest();
            final SSHKey key = this.sshKeys.findKey(ownerID, keyname);
            if (key == null) {
                throw new RemoteException("There is no key '" + keyname +
                        "' registered for you to use");
            }
            cust.setContent(key.getPubKeyValue());
            cust.setPathOnVM("/root/.ssh/authorized_keys");
        } else {
            cust = null;
        }

        final CustomizationRequest[] custRequests;
View Full Code Here

        }

        // currently ignored: groupSet, placement, kernel, ramdiskid,
        // blockDeviceMapping

        final _CustomizationRequest cust;
        final String keyname = req.getKeyName();
        if (keyname != null && this.sshKeys != null) {
            cust = this.repr._newCustomizationRequest();
            final SSHKey key = this.sshKeys.findKey(ownerID, keyname);
            if (key == null) {
                throw new RemoteException("There is no key '" + keyname +
                        "' registered for you to use");
            }
            cust.setContent(key.getPubKeyValue());
            cust.setPathOnVM("/root/.ssh/authorized_keys");
        } else {
            cust = null;
        }

        final CustomizationRequest[] custRequests;
View Full Code Here

       
        if (bindings == null || bindings.length == 0) {
            throw new CannotTranslateException("no resource?");
        }       
       
        final _RequestInfo result = repr._newRequestInfo();
       
        populate(backfillRequest, result);
       
        return result;
    }   
View Full Code Here

            throws URISyntaxException {

        if (post == null) {
            return null;
        }
        final _ShutdownTasks tasks = this.repr._newShutdownTasks();
       
        final URI target =
                this.convertURI(post.getRootPartitionUnpropagationTarget());
        tasks.setBaseFileUnpropagationTarget(target);

        tasks.setAppendID(appendID);

        return tasks;
    }
View Full Code Here

            throws URISyntaxException {
       
        if (post == null) {
            return null;
        }
        final _ShutdownTasks tasks = this.repr._newShutdownTasks();
       
        final URI target =
                this.convertURI(post.getRootPartitionUnpropagationTarget());
        tasks.setBaseFileUnpropagationTarget(target);
        tasks.setAppendID(appendID);

        return tasks;
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.api._repr._SpotCreateRequest

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.