Package org.nimbustools.api.services.rm

Examples of org.nimbustools.api.services.rm.MetadataException


        }

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


        AsyncRequest siRequest = this.creation.addAsyncRequest(req, caller);
       
        try {
            return dataConvert.getSpotRequest(siRequest);
        } catch (CannotTranslateException e) {
            throw new MetadataException("Could not translate request from internal representation to RM API representation.", e);
        }
    }    
View Full Code Here

        AsyncRequest backfillRequest = this.creation.addAsyncRequest(req, caller);
       
        try {
            return dataConvert.getRequestInfo(backfillRequest);
        } catch (CannotTranslateException e) {
            throw new MetadataException("Could not translate request from internal representation to RM API representation.", e);
        }
    }
View Full Code Here

            throw new CreationException("no createrequest name?");
        }

        final RequiredVMM reqVMM = req.getRequiredVMM();
        if (reqVMM != null && reqVMM.getType() == null) {
            throw new MetadataException(
                    "RequiredVMM encountered with missing type");
        }

        final Kernel kernel = req.getRequestedKernel();
        if (kernel != null && kernel.getKernel() == null) {
            throw new MetadataException(
                    "RequestedKernel encountered with missing location URI");
        }

        final Context context = req.getContext();
        if (context != null) {
View Full Code Here

    // -------------------------------------------------------------------------

    protected void checkFiles(VMFile[] vmFiles) throws MetadataException {
       
        if (vmFiles == null || vmFiles.length == 0) {
            throw new MetadataException("no files in request");
        }

        for (int i = 0; i < vmFiles.length; i++) {
            if (vmFiles[i] == null) {
                throw new MetadataException("VM file request array " +
                        "may not contain nulls");
            }
        }
    }
View Full Code Here

        }

        for (int i = 0; i < nics.length; i++) {

            if (nics[i] == null) {
                throw new MetadataException("NIC request array " +
                    "may not contain nulls");
            }

            final String acqMethod = nics[i].getAcquisitionMethod();
            if (acqMethod == null) {
                throw new MetadataException("NIC acquisition method " +
                    "is missing");
            }

            if (!acqMethod.equals(NIC.ACQUISITION_AcceptAndConfigure)
                  && !acqMethod.equals(NIC.ACQUISITION_Advisory)
                  && !acqMethod.equals(NIC.ACQUISITION_AllocateAndConfigure)) {

                throw new MetadataException("NIC acquisition method " +
                    "is unknown");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.api.services.rm.MetadataException

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.