org.dasein.cloud.services.dc
Interface DataCenterServices


public interface DataCenterServices

Describe the physical configuration of the underlying cloud provider so applications may determine how to create redundancies and protect jurisdictional concerns.

The logical structure of this API divides a cloud into multiple regions. A region is simply a boundary within a cloud across which no common infrastructure is shared. A region has a jurisdiction that describe what laws govern the data in that region as well as one or more data centers providing resources in that region.

Data centers share some resources yet provide some level of physical independence. The following rules should hold for any data center:

Author:
George Reese @ enStratus (http://www.enstratus.com)

Method Summary
 DataCenter getDataCenter(String providerDataCenterId)
          Provides access to the full data center information for the specified data center.
 String getProviderTermForDataCenter(Locale locale)
          Provides the cloud-specific term for a data center (e.g.
 String getProviderTermForRegion(Locale locale)
          Provides the cloud-specific term for a region.
 Region getRegion(String providerRegionId)
          Provides the region matching the specified region ID.
 Collection<DataCenter> listDataCenters(String providerRegionId)
          Lists all data centers, active and inactive, available and unavailable, for the specified region.
 Collection<Region> listRegions()
          Lists all regions, active and inactive, available and unavailable.
 String matchDataCenter(CloudProvider withAccount, String withProviderDataCenterId)
          Matches the data center ID for a data center in an account with another account and returns the matching data center.
 

Method Detail

getDataCenter

DataCenter getDataCenter(String providerDataCenterId)
                         throws InternalException,
                                CloudException
Provides access to the full data center information for the specified data center.

Parameters:
providerDataCenterId - the provider-specific identifier that the provider uses to identify the data center
Returns:
the current state of the desired data center
Throws:
InternalException - an error occurred locally in processing the request
CloudException - an error occurred within the cloud provider or the cloud provider did not approve of the request

getProviderTermForDataCenter

String getProviderTermForDataCenter(Locale locale)
Provides the cloud-specific term for a data center (e.g. "availability zone").

Parameters:
locale - the locale into which the term should be translated
Returns:
the term for a data center

getProviderTermForRegion

String getProviderTermForRegion(Locale locale)
Provides the cloud-specific term for a region.

Parameters:
locale - the locale into which the term should be translated
Returns:
the term for a region

getRegion

Region getRegion(String providerRegionId)
                 throws InternalException,
                        CloudException
Provides the region matching the specified region ID.

Parameters:
providerRegionId - the provider-specified unique ID that identifies a region for the provider
Returns:
the current state of the desired region
Throws:
InternalException - an error occurred locally in processing the request
CloudException - an error occurred within the cloud provider or the cloud provider did not approve of the request

listDataCenters

Collection<DataCenter> listDataCenters(String providerRegionId)
                                       throws InternalException,
                                              CloudException
Lists all data centers, active and inactive, available and unavailable, for the specified region.

Parameters:
providerRegionId - the region in which you are searching for data centers
Returns:
the complete list of data centers for the region
Throws:
InternalException - an error occurred locally in processing the request
CloudException - an error occurred within the cloud provider or the cloud provider did not approve of the request

listRegions

Collection<Region> listRegions()
                               throws InternalException,
                                      CloudException
Lists all regions, active and inactive, available and unavailable.

Returns:
all regions supported for this cloud in any context
Throws:
InternalException - an error occurred locally in processing the request
CloudException - an error occurred within the cloud provider or the cloud provider did not approve of the request

matchDataCenter

String matchDataCenter(CloudProvider withAccount,
                       String withProviderDataCenterId)
                       throws InternalException,
                              CloudException
Matches the data center ID for a data center in an account with another account and returns the matching data center.

Parameters:
withAccount - the provider containing context information for the account whose data center is being matched
withProviderDataCenterId - the ID of the data center to be matched
Returns:
the ID of the data center in this account that matches specified data center ID in the other account
Throws:
InternalException - an error occurred locally in processing the request
CloudException - an error occurred within the cloud provider or the cloud provider did not approve of the request