Documentation ¶
Overview ¶
Package ecx implements Equinix Fabric client
Index ¶
- Constants
- type Client
- type Error
- type L2Connection
- type L2ConnectionAction
- type L2ConnectionActionData
- type L2ConnectionAdditionalInfo
- type L2ConnectionConfirmation
- type L2ConnectionToConfirm
- type L2ConnectionUpdateRequest
- type L2SellerProfileAdditionalInfo
- type L2SellerProfileMetro
- type L2ServiceProfile
- type L2ServiceProfileFeatures
- type L2ServiceProfilePort
- type L2ServiceProfileSpeedBand
- type Port
- type RestClient
- func (c RestClient) ConfirmL2Connection(uuid string, connToConfirm L2ConnectionToConfirm) (*L2ConnectionConfirmation, error)
- func (c RestClient) CreateL2Connection(l2connection L2Connection) (*L2Connection, error)
- func (c RestClient) CreateL2RedundantConnection(primary L2Connection, secondary L2Connection) (*L2Connection, error)
- func (c RestClient) CreateL2ServiceProfile(l2profile L2ServiceProfile) (*L2ServiceProfile, error)
- func (c RestClient) DeleteL2Connection(uuid string) error
- func (c RestClient) DeleteL2ServiceProfile(uuid string) error
- func (c RestClient) GetL2Connection(uuid string) (*L2Connection, error)
- func (c RestClient) GetL2OutgoingConnections(statuses []string) ([]L2Connection, error)
- func (c RestClient) GetL2SellerProfiles() ([]L2ServiceProfile, error)
- func (c RestClient) GetL2ServiceProfile(uuid string) (*L2ServiceProfile, error)
- func (c RestClient) GetUserPorts() ([]Port, error)
- func (c RestClient) NewL2ConnectionUpdateRequest(uuid string) L2ConnectionUpdateRequest
- func (c RestClient) UpdateL2ServiceProfile(sp L2ServiceProfile) (*L2ServiceProfile, error)
Constants ¶
const ( //ConnectionStatusNotAvailable indicates that request to create connection was not sent //to the provider. Applicable for provider status only ConnectionStatusNotAvailable = "NOT_AVAILABLE" //ConnectionStatusPendingApproval indicates that connection awaits provider's approval. ConnectionStatusPendingApproval = "PENDING_APPROVAL" //ConnectionStatusPendingAutoApproval indicates that connection is in process of //automatic approval ConnectionStatusPendingAutoApproval = "PENDING_AUTO_APPROVAL" //ConnectionStatusProvisioning indicates that connection is in creation process ConnectionStatusProvisioning = "PROVISIONING" //ConnectionStatusRejected indicates that provider has rejected the connection ConnectionStatusRejected = "REJECTED" //ConnectionStatusPendingBGPPeering indicates that connection was approved by provider and //awaits for BGP peering configuration on provider side ConnectionStatusPendingBGPPeering = "PENDING_BGP_PEERING" //ConnectionStatusPendingProviderVlan indicates that connection awaits for provider approval //and vlan assignment ConnectionStatusPendingProviderVlan = "PENDING_PROVIDER_VLAN" //ConnectionStatusProvisioned indicates that connection is created successfully ConnectionStatusProvisioned = "PROVISIONED" //ConnectionStatusAvailable indicates that connection is established. //Applicable for provider status only ConnectionStatusAvailable = "AVAILABLE" //ConnectionStatusPendingDelete indicates that connection is in deletion process and awaits //for providers approval to be removed ConnectionStatusPendingDelete = "PENDING_DELETE" //ConnectionStatusDeprovisioning indicates that connection is being removed ConnectionStatusDeprovisioning = "DEPROVISIONING" //ConnectionStatusDeprovisioned indicates that connection is removed ConnectionStatusDeprovisioned = "DEPROVISIONED" //ConnectionStatusDeleted indicates that connection was administratively deleted ConnectionStatusDeleted = "DELETED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetUserPorts() ([]Port, error) GetL2OutgoingConnections(statuses []string) ([]L2Connection, error) GetL2Connection(uuid string) (*L2Connection, error) CreateL2Connection(conn L2Connection) (*L2Connection, error) CreateL2RedundantConnection(priConn L2Connection, secConn L2Connection) (*L2Connection, error) NewL2ConnectionUpdateRequest(uuid string) L2ConnectionUpdateRequest DeleteL2Connection(uuid string) error ConfirmL2Connection(uuid string, confirmConn L2ConnectionToConfirm) (*L2ConnectionConfirmation, error) GetL2SellerProfiles() ([]L2ServiceProfile, error) GetL2ServiceProfile(uuid string) (*L2ServiceProfile, error) CreateL2ServiceProfile(sp L2ServiceProfile) (*L2ServiceProfile, error) UpdateL2ServiceProfile(sp L2ServiceProfile) (*L2ServiceProfile, error) DeleteL2ServiceProfile(uuid string) error }
Client describes operations provided by Equinix Fabric client module
type Error ¶
type Error struct { //ErrorCode is short error identifier ErrorCode string //ErrorMessage is textual description of an error ErrorMessage string }
Error describes Equinix Fabric error that occurs during API call processing
type L2Connection ¶
type L2Connection struct { UUID string Name string ProfileUUID string Speed int SpeedUnit string Status string ProviderStatus string Notifications []string PurchaseOrderNumber string PortUUID string DeviceUUID string DeviceInterfaceID int VlanSTag int VlanCTag int NamedTag string AdditionalInfo []L2ConnectionAdditionalInfo ZSidePortUUID string ZSideVlanSTag int ZSideVlanCTag int SellerRegion string SellerMetroCode string AuthorizationKey string RedundantUUID string RedundancyType string Actions []L2ConnectionAction }
L2Connection describes layer 2 connection managed by Equinix Fabric
type L2ConnectionAction ¶ added in v1.2.0
type L2ConnectionAction struct { Type string Message string OperationID string RequiredData []L2ConnectionActionData }
L2ConnectionAction describes pending actions to complete connection provisioning
type L2ConnectionActionData ¶ added in v1.2.0
type L2ConnectionActionData struct { Key string Label string Value string IsEditable bool ValidationPattern string }
L2ConnectionActionData describes data required for a given to complete
type L2ConnectionAdditionalInfo ¶
L2ConnectionAdditionalInfo additional info object used in L2 connections
type L2ConnectionConfirmation ¶
L2ConnectionConfirmation describes a connection confirmed
type L2ConnectionToConfirm ¶
L2ConnectionToConfirm accepts the hosted connection in the seller side
type L2ConnectionUpdateRequest ¶
type L2ConnectionUpdateRequest interface { WithName(name string) L2ConnectionUpdateRequest WithBandwidth(speed int, speedUnit string) L2ConnectionUpdateRequest Execute() error }
L2ConnectionUpdateRequest describes composite request to update given Layer2 connection
type L2SellerProfileAdditionalInfo ¶ added in v1.1.0
type L2SellerProfileAdditionalInfo struct { Name string Description string DataType string IsMandatory bool IsCaptureInEmail bool }
L2SellerProfileAdditionalInfo describces additional information that might be provided by service buyer when using given seller profile
type L2SellerProfileMetro ¶ added in v1.1.0
type L2SellerProfileMetro struct { Code string Name string IBXes []string Regions map[string]string }
L2SellerProfileMetro describces details of a metro in which service provices is present
type L2ServiceProfile ¶
type L2ServiceProfile struct { UUID string State string AlertPercentage float64 AllowCustomSpeed bool AllowOverSubscription bool APIAvailable bool AuthKeyLabel string ConnectionNameLabel string CTagLabel string EnableAutoGenerateServiceKey bool EquinixManagedPortAndVlan bool Features L2ServiceProfileFeatures IntegrationID string Name string OnBandwidthThresholdNotification []string OnProfileApprovalRejectNotification []string OnVcApprovalRejectionNotification []string OverSubscription string Ports []L2ServiceProfilePort Private bool PrivateUserEmails []string RequiredRedundancy bool SpeedBands []L2ServiceProfileSpeedBand SpeedFromAPI bool TagType string VlanSameAsPrimary bool Description string Metros []L2SellerProfileMetro AdditionalInfos []L2SellerProfileAdditionalInfo Encapsulation string GlobalOrganization string OrganizationName string }
L2ServiceProfile describes layer 2 service profile managed by Equinix Fabric
type L2ServiceProfileFeatures ¶
L2ServiceProfileFeatures describes features used in L2 service profile
type L2ServiceProfilePort ¶
L2ServiceProfilePort describes port used in L2 service profile
type L2ServiceProfileSpeedBand ¶
L2ServiceProfileSpeedBand describes speed / bandwidth used in L2 service profile
type Port ¶
type Port struct { UUID string Name string Region string IBX string MetroCode string Priority string Encapsulation string Buyout bool Bandwidth string Status string }
Port describes Equinix Fabric's user port
type RestClient ¶
type RestClient struct {
*rest.Client
}
RestClient describes Equinix Fabric client that uses REST API
func NewClient ¶
NewClient creates new Equinix Fabric REST API client with a given baseURL and http.Client
func (RestClient) ConfirmL2Connection ¶
func (c RestClient) ConfirmL2Connection(uuid string, connToConfirm L2ConnectionToConfirm) (*L2ConnectionConfirmation, error)
ConfirmL2Connection operation accepts a hosted connection
func (RestClient) CreateL2Connection ¶
func (c RestClient) CreateL2Connection(l2connection L2Connection) (*L2Connection, error)
CreateL2Connection operation creates non-redundant layer 2 connection with a given connection structure. Upon successful creation, connection structure, enriched with assigned UUID, will be returned
func (RestClient) CreateL2RedundantConnection ¶
func (c RestClient) CreateL2RedundantConnection(primary L2Connection, secondary L2Connection) (*L2Connection, error)
CreateL2RedundantConnection operation creates redundant layer2 connection with given connection structures. Primary connection structure is used as a baseline for underlaying API call, whereas secondary connection structure provices supplementary information only. Upon successful creation, primary connection structure, enriched with assigned UUID and redundant connection UUID, will be returned
func (RestClient) CreateL2ServiceProfile ¶
func (c RestClient) CreateL2ServiceProfile(l2profile L2ServiceProfile) (*L2ServiceProfile, error)
CreateL2ServiceProfile operation creates layer 2 service profile with a given profile structure. Upon successful creation, connection structure with assigned UUID will be returned
func (RestClient) DeleteL2Connection ¶
func (c RestClient) DeleteL2Connection(uuid string) error
DeleteL2Connection deletes layer 2 connection with a given UUID
func (RestClient) DeleteL2ServiceProfile ¶
func (c RestClient) DeleteL2ServiceProfile(uuid string) error
DeleteL2ServiceProfile deletes layer 2 service profile with a given UUID
func (RestClient) GetL2Connection ¶
func (c RestClient) GetL2Connection(uuid string) (*L2Connection, error)
GetL2Connection operation retrieves layer 2 connection with a given UUID
func (RestClient) GetL2OutgoingConnections ¶ added in v1.2.0
func (c RestClient) GetL2OutgoingConnections(statuses []string) ([]L2Connection, error)
GetL2OutgoingConnections retrieves list of all originating (a-side) layer 2 connections for a customer account associated with authenticated application
func (RestClient) GetL2SellerProfiles ¶
func (c RestClient) GetL2SellerProfiles() ([]L2ServiceProfile, error)
GetL2SellerProfiles operations retrieves available layer2 seller service profiles
func (RestClient) GetL2ServiceProfile ¶
func (c RestClient) GetL2ServiceProfile(uuid string) (*L2ServiceProfile, error)
GetL2ServiceProfile operation retrieves layer 2 servie profile with a given UUID
func (RestClient) GetUserPorts ¶
func (c RestClient) GetUserPorts() ([]Port, error)
GetUserPorts operation retrieves Equinix Fabric user ports
func (RestClient) NewL2ConnectionUpdateRequest ¶
func (c RestClient) NewL2ConnectionUpdateRequest(uuid string) L2ConnectionUpdateRequest
NewL2ConnectionUpdateRequest creates new composite update request for a connection with a given UUID
func (RestClient) UpdateL2ServiceProfile ¶
func (c RestClient) UpdateL2ServiceProfile(sp L2ServiceProfile) (*L2ServiceProfile, error)
UpdateL2ServiceProfile operation updates layer 2 service profile by replacing existing profile with a given profile structure. Target profile structure needs to have UUID defined