Interface CloudProviderConnectionAdapter<T>

Type Parameters:
T - the type of the cloud provider SDK object being adapted
All Known Implementing Classes:
AwsDirectConnectAdapter, AzureExpressRouteAdapter, GoogleCloudInterconnectAdapter, OracleFastConnectAdapter

public interface CloudProviderConnectionAdapter<T>
Adapter interface for bridging cloud provider SDK objects with Equinix Fabric connection creation.

Cloud providers like AWS, Microsoft Azure, Google Cloud, and Oracle Cloud each have their own SDKs for managing direct connectivity (AWS Direct Connect, Azure ExpressRoute, Google Cloud Interconnect, Oracle FastConnect). This interface defines a contract that allows objects from those SDKs to supply the connection parameters needed by the Equinix Fabric API.

Design Pattern

This uses the Adapter Pattern to bridge the gap between cloud provider SDK objects and the Equinix Fabric ConnectionOperator.ConnectionBuilder. Implementors wrap a cloud provider object (e.g., an AWS Connection or Azure ExpressRouteCircuit) and extract the fields required by Equinix's API:

Quick Start

Using a built-in reference adapter with AWS Direct Connect:


 // Wrap an AWS Direct Connect connection object
 AwsDirectConnectAdapter adapter = new AwsDirectConnectAdapter(
     awsConnection,                           // AWS SDK Connection object
     "equinix-aws-service-profile-uuid"        // Equinix service profile for AWS
 );

 // Use it directly in the Equinix connection builder
 Connection connection = fabric.connections()
     .define(ConnectionType.EVPL_VC)
     .name("My-AWS-Connection")
     .bandwidth(100)
     .aSideAccessPointPort(myPortUuid, LinkProtocol.dot1q().vlanTag(1000).create())
     .zSideCloudProvider(adapter)
     .notification("ops@example.com")
     .create();
 

Custom Adapter

Implement this interface for any cloud provider or custom service profile:


 public class MyCloudAdapter implements CloudProviderConnectionAdapter<MyCloudObject> {

     private final MyCloudObject cloudObject;
     private final String equinixProfileUuid;

     public MyCloudAdapter(MyCloudObject cloudObject, String equinixProfileUuid) {
         this.cloudObject = cloudObject;
         this.equinixProfileUuid = equinixProfileUuid;
     }

     public String getServiceProfileUuid()  { return equinixProfileUuid; }
     public String getAuthenticationKey()   { return cloudObject.getApiKey(); }
     public String getSellerRegion()        { return cloudObject.getRegion(); }
     public MyCloudObject getSource()       { return cloudObject; }
 }
 
Author:
ianjones
See Also: