Package org.nimbustools.api._repr.vm

Examples of org.nimbustools.api._repr.vm._Kernel


               
        return backfill;
    }

    public ShutdownTasks getShutdownTasks() throws URISyntaxException {
        final _ShutdownTasks sht = this.repr._newShutdownTasks();
        sht.setBaseFileUnpropagationTarget(new URI("something"));
        return sht;
    }
View Full Code Here


            throw new RemoteException("Error in spot price conversion.");
        }   
       
        boolean persistent = DefaultDescribeSI.PERSISTENT.equalsIgnoreCase(req.getType());
       
        final _SpotCreateRequest screq = this.repr._newSpotCreateRequest();

        screq.setContext(null);
        screq.setCoScheduleDone(false);
        screq.setCoScheduleID(null);
        screq.setCoScheduleMember(false);
        screq.setCustomizationRequests(custRequests);
        screq.setInitialStateRequest(State.STATE_Running);
        screq.setName(imageID);
        screq.setRequestedKernel(null); // todo
        screq.setRequestedNics(nics);
        screq.setRequestedRA(ra);
        screq.setRequestedSchedule(null); // ask for default
        screq.setRequiredVMM(reqVMM);
        screq.setShutdownType(CreateRequest.SHUTDOWN_TYPE_TRASH);
        screq.setVMFiles(files);
        screq.setMdUserData(userData);
        screq.setSshKeyName(keyname);
       
        screq.setPersistent(persistent);
        screq.setSpotPrice(spotPrice);
       
        return screq;
    }
View Full Code Here

        superuser.setSuperUser(true);
        return superuser;
    }
   
    public SpotCreateRequest getBasicRequestSI(String name, int numNodes, Double spotPrice, boolean persistent) throws Exception {
        final _SpotCreateRequest reqSI = this.repr._newSpotCreateRequest();
        reqSI.setInstanceType(SIConstants.SI_TYPE_BASIC);
        reqSI.setSpotPrice(spotPrice);
        reqSI.setPersistent(persistent);       
       
        populate(reqSI, 500, name, SIConstants.SI_TYPE_BASIC_MEM, numNodes, true, null, null, null);
       
        return reqSI;
    }
View Full Code Here

            List<SpotPriceEntry> result = new LinkedList<SpotPriceEntry>();
            do {
                // rs was next'd above already
                Long timeMillis = rs.getLong(1);               
                Double spotPrice = rs.getDouble(2);
                _SpotPriceEntry spotPriceEntry = repr._newSpotPriceEntry();
               
                Calendar timeStamp = Calendar.getInstance();
                timeStamp.setTimeInMillis(timeMillis);

                spotPriceEntry.setTimeStamp(timeStamp);
                spotPriceEntry.setSpotPrice(spotPrice);
               
                result.add(spotPriceEntry);
               
                if (this.dbTrace) {
                    logger.trace("found spot price entry: '" +
View Full Code Here

       
        if (bindings == null || bindings.length == 0) {
            throw new CannotTranslateException("no resource?");
        }       
       
        final _SpotRequestInfo result = repr._newSpotRequestInfo();

        populate(siRequest, result);       
       
        result.setPersistent(siRequest.isPersistent());
        result.setSpotPrice(siRequest.getMaxBid());       
               
        return result;
    }
View Full Code Here

        if (earm == null) {
            throw new CannotTranslateException("no usage information");
        }

        final _Usage usage = this.repr._newUsage();
        usage.setElapsedMinutes(earm.getElapsed());
        usage.setReservedMinutes(earm.getReserved());
        return usage;
    }
View Full Code Here

        if (bootstrapText == null || bootstrapText.trim().length() == 0) {
            throw new ContextBrokerException(
                    "context broker did not provide bootstrapPath");
        }
       
        final _Context ctx = this.repr._newContext();
        ctx.setBootstrapPath(bootstrapPath);
        ctx.setBootstrapText(bootstrapText);
        return ctx;
    }
View Full Code Here

        result.setRequestID(asyncReq.getId());
        result.setVMFiles(this.getStorage(bindings[0]));
        result.setSshKeyName(asyncReq.getSshKeyName());
        result.setVMIds(getVMIDs(asyncReq.getVMIds()));
       
        _SIRequestState state = new DefaultSIRequestState();
        state.setState(this.getSIRequestState(asyncReq.getStatus()));
        result.setState(state);
       
        //FIXME remove if not used
        //result.setMdUserData(bindings[0].getMdUserData());
        //result.setResourceAllocation(this.getRA(bindings[0])); 
View Full Code Here

            }
        }

        final Kernel_Type kernel = requires.getKernel();
        if (kernel != null) {
            final _Kernel reqKernel = this.repr._newKernel();
            final URI image = kernel.getImage();
            reqKernel.setKernel(this.convertURI(image));
            reqKernel.setParameters(kernel.getParameters());
            req.setRequestedKernel(reqKernel);
        }
    }
View Full Code Here

        if (wsnic == null) {
            throw new IllegalArgumentException("wsnic may not be null");
        }
       
        final _NIC nic = this.repr._newNIC();
       
        nic.setNetworkName(wsnic.getAssociation());
        nic.setMAC(wsnic.getMAC());
        nic.setName(wsnic.getName());

        final IPConfig_Type ipconfig = wsnic.getIpConfig();
        if (ipconfig == null) {
            throw new CannotTranslateException(
                        "IPConfig_Type in nic request was missing?");
        }

        final String method =
                (String) acqMethodMap.get(ipconfig.getAcquisitionMethod());
        if (method == null) {
            throw new CannotTranslateException("unrecognized acquisition " +
                    "type (IPConfig_TypeAcquisitionMethod enumeration)");
        }

        nic.setAcquisitionMethod(method);

        nic.setBroadcast(ipconfig.getBroadcast());
        nic.setGateway(ipconfig.getGateway());
        nic.setHostname(ipconfig.getHostname());
        nic.setIpAddress(ipconfig.getIpAddress());
        nic.setNetmask(ipconfig.getNetmask());
        nic.setNetwork(ipconfig.getNetwork());

        return nic;
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.api._repr.vm._Kernel

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.