Package com.cloud.bridge.service.exception

Examples of com.cloud.bridge.service.exception.InternalErrorException


    if (annonymous)
      return StringHelper.EMPTY_STRING;
   
    if (secretKey == null) {
      logger.error("Fatal - UserContext has not been correctly setup");
      throw new InternalErrorException("Uninitalized user context");
    }
   
    return secretKey;
  }
View Full Code Here


    if (annonymous)
      return StringHelper.EMPTY_STRING;
   
    if (canonicalUserId == null) {
      logger.error("Fatal - UserContext has not been correctly setup");
      throw new InternalErrorException("Uninitalized user context");
    }
   
    return canonicalUserId;
  }
View Full Code Here

        if (annonymous)
            return StringHelper.EMPTY_STRING;

        if (accessKey == null) {
            logger.error("Fatal - UserContext has not been correctly setup");
            throw new InternalErrorException("Uninitalized user context");
        }
        return accessKey;
    }
View Full Code Here

        if (annonymous)
            return StringHelper.EMPTY_STRING;

        if (secretKey == null) {
            logger.error("Fatal - UserContext has not been correctly setup");
            throw new InternalErrorException("Uninitalized user context");
        }

        return secretKey;
    }
View Full Code Here

        if (annonymous)
            return StringHelper.EMPTY_STRING;

        if (canonicalUserId == null) {
            logger.error("Fatal - UserContext has not been correctly setup");
            throw new InternalErrorException("Uninitalized user context");
        }

        return canonicalUserId;
    }
View Full Code Here

    // To make things simple, only allow one local mounted storage root TODO - Change in the future
    String localStorageRoot = ServiceProvider.getInstance().getStartupProperties().getProperty("storage.root");
    if(localStorageRoot != null) {
      SHostVO localSHost = shostDao.getLocalStorageHost(mhost.getId(), localStorageRoot);
      if(localSHost == null)
        throw new InternalErrorException("storage.root is configured but not initialized");
     
      S3BucketAdapter bucketAdapter =  getStorageHostBucketAdapter(localSHost);
      bucketAdapter.createContainer(localSHost.getExportRoot(),(null != overrideName ? overrideName : bucketName));
      return new OrderedPair<SHostVO, String>(localSHost, localStorageRoot);
    }
View Full Code Here

 
  public S3BucketAdapter getStorageHostBucketAdapter(SHostVO shost)
  {
    S3BucketAdapter adapter = bucketAdapters.get(shost.getHostType());
    if(adapter == null)
      throw new InternalErrorException("Bucket adapter is not installed for host type: " + shost.getHostType());
   
    return adapter;
  }
View Full Code Here

        try {
            md5 = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            s_logger.error("Unexpected exception " + e.getMessage(), e);
            throw new InternalErrorException("Unable to get MD5 MessageDigest", e);
        }

        File spoolFile = null;
        try {
            spoolFile = File.createTempFile("castor", null);
        } catch (IOException e) {
            s_logger.error("Unexpected exception creating temporary CAStor spool file: " + e.getMessage(), e);
            throw new InternalErrorException("Unable to create temporary CAStor spool file", e);
        }
        try {
            String retVal;
            int streamLen = 0;
            try {
View Full Code Here

        // To make things simple, only allow one local mounted storage root TODO - Change in the future
        String localStorageRoot = ServiceProvider.getInstance().getStartupProperties().getProperty("storage.root");
        if(localStorageRoot != null) {
            SHostVO localSHost = shostDao.getLocalStorageHost(mhost.getId(), localStorageRoot);
            if(localSHost == null)
                throw new InternalErrorException("storage.root is configured but not initialized");

            S3BucketAdapter bucketAdapter =  getStorageHostBucketAdapter(localSHost);
            bucketAdapter.createContainer(localSHost.getExportRoot(),(null != overrideName ? overrideName : bucketName));
            return new OrderedPair<SHostVO, String>(localSHost, localStorageRoot);
        }
View Full Code Here

    public S3BucketAdapter getStorageHostBucketAdapter(SHostVO shost)
    {
        S3BucketAdapter adapter = bucketAdapters.get(shost.getHostType());
        if(adapter == null)
            throw new InternalErrorException("Bucket adapter is not installed for host type: " + shost.getHostType());

        return adapter;
    }
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.exception.InternalErrorException

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.