Documentation
¶
Overview ¶
Package ecx implements ECX fabric client
Index ¶
- type Client
- type Error
- type L2Connection
- type L2ConnectionAdditionalInfo
- type L2ConnectionConfirmation
- type L2ConnectionToConfirm
- type L2ConnectionUpdateRequest
- 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) 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)
- type RestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetUserPorts() ([]Port, 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 ECX 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 ECX 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
Notifications []string
PurchaseOrderNumber string
PortUUID string
VlanSTag int
VlanCTag int
NamedTag string
AdditionalInfo []L2ConnectionAdditionalInfo
ZSidePortUUID string
ZSideVlanSTag int
ZSideVlanCTag int
SellerRegion string
SellerMetroCode string
AuthorizationKey string
RedundantUUID string
}
L2Connection describes layer 2 connection managed by ECX Fabric
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 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
}
L2ServiceProfile describes layer 2 service profile managed by ECX 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 ECX Fabric's user port
type RestClient ¶
RestClient describes ECX Fabric client that uses REST API
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 strucutre 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) GetL2SellerProfiles ¶
func (c RestClient) GetL2SellerProfiles() ([]L2ServiceProfile, error)
GetL2SellerProfiles operations retrievies 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 ECXF 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 exisitng profile with a given profile structure. Target profile structure needs to have UUID defined