ne

package module
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 10 Imported by: 1

README

Equinix Network Edge Go client

Equinix Network Edge (NE) client library written in Go.

Build Status Go Report Card GoDoc GitHub


Purpose

Equinix Network Edge client library was written in Go for purpose of managing NE resources from Terraform provider plugin.

Library gives possibility to manage virtual network devices and associated network services.

NOTE: Scope of this library is limited to needs of Terraform provider plugin and it is not providing full capabilities of Equinix Network Edge API

Usage

Code
  1. Add ne-go module to import statement. In below example, Equinix oauth2-go module is imported as well

    import (
    "github.com/equinix/oauth2-go"
    "github.com/equinix/ne-go"
    )
    
  2. Define baseURL that will be used in all REST API requests

    baseURL := "https://api.equinix.com"
    
  3. Create oAuth configuration and oAuth enabled http.Client

    authConfig := oauth2.Config{
      ClientID:     "someClientId",
      ClientSecret: "someSecret",
      BaseURL:      baseURL}
    ctx := context.Background()
    authClient := authConfig.New(ctx)
    
  4. Create NE REST client with a given baseURL and oauth's http.Client

    var neClient ne.Client = ne.NewClient(ctx, baseURL, authClient)
    
  5. Use NE client to perform some operation i.e. get device details

    device, err := neClient.GetDevice("existingDeviceUUID")
    if err != nil {
      log.Printf("Error while fetching device - %v", err)
    } else {
      log.Printf("Retrieved device - %+v", device)
    }
    

Documentation

Overview

Package ne implements Network Edge client

Index

Constants

View Source
const (
	//DeviceStateInitializing Equinix is allocating resources and creating new device
	DeviceStateInitializing = "INITIALIZING"
	//DeviceStateProvisioning Network Edge device is booting
	DeviceStateProvisioning = "PROVISIONING"
	//DeviceStateWaitingPrimary secondary Network Edge device is waiting for provisioning of its redundant (primary) device
	DeviceStateWaitingPrimary = "WAITING_FOR_PRIMARY"
	//DeviceStateWaitingSecondary primary Network Edge device is waiting for provisioning of its redundant (secondary) device
	DeviceStateWaitingSecondary = "WAITING_FOR_SECONDARY"
	//DeviceStateWaitingClusterNodes primary Network Edge device is waiting for provisioning of its cluster devices
	DeviceStateWaitingClusterNodes = "WAITING_FOR_REPLICA_CLUSTER_NODES"
	//DeviceStateClusterSetUpInProgress The cluster setup is in progress
	DeviceStateClusterSetUpInProgress = "CLUSTER_SETUP_IN_PROGRESS"
	//DeviceStateFailed Network Edge device creation and provisioning have failed
	DeviceStateFailed = "FAILED"
	//DeviceStateProvisioned Network Edge device was successfully provisioned and is fully operational
	DeviceStateProvisioned = "PROVISIONED"
	//DeviceStateDeprovisioning Network Edge device is in process of deprovisioning
	DeviceStateDeprovisioning = "DEPROVISIONING"
	//DeviceStateDeprovisioned Network Edge device was successfully deprovisioned
	DeviceStateDeprovisioned = "DEPROVISIONED"
	//DeviceStateResourceUpgradeInProgress Network Edge device is in process of resource upgrade
	DeviceStateResourceUpgradeInProgress = "RESOURCE_UPGRADE_IN_PROGRESS"
	//DeviceStateResourceUpgradeFailed Network Edge device resource upgrade has failed
	DeviceStateResourceUpgradeFailed = "RESOURCE_UPGRADE_FAILED"

	//DeviceLicenseStateApplying license is in registration process
	DeviceLicenseStateApplying = "APPLYING_LICENSE"
	//DeviceLicenseStateRegistered license was successfully registered
	DeviceLicenseStateRegistered = "REGISTERED"
	//DeviceLicenseStateApplied license was successfully applied
	DeviceLicenseStateApplied = "APPLIED"
	//DeviceLicenseStateNA license state not applicable
	DeviceLicenseStateNA = "N/A"
	//DeviceLicenseStateFailed license registration has failed
	DeviceLicenseStateFailed = "REGISTRATION_FAILED"
	//DeviceLicenseStateWaitingClusterSetUp license is waiting for cluster setup
	DeviceLicenseStateWaitingClusterSetUp = "WAITING_FOR_CLUSTER_SETUP"

	//BGPStateIdle BGP peer state is idle
	BGPStateIdle = "Idle"
	//BGPStateConnect BGP peer state is connect
	BGPStateConnect = "Connect"
	//BGPStateActive BGP peer state is active
	BGPStateActive = "Active"
	//BGPStateOpenSent BGP peer state is OpenSent
	BGPStateOpenSent = "OpenSent"
	//BGPStateOpenConnect BGP peer state is OpenConfirm
	BGPStateOpenConnect = "OpenConfirm"
	//BGPStateEstablished BGP peer state is Established
	BGPStateEstablished = "Established"
	//BGPProvisioningStatusProvisioning BGP peering is provisioning
	BGPProvisioningStatusProvisioning = "PROVISIONING"
	//BGPProvisioningStatusPendingUpdate BGP peering is being updated
	BGPProvisioningStatusPendingUpdate = "PENDING_UPDATE"
	//BGPProvisioningStatusProvisioned BGP peering is provisioned
	BGPProvisioningStatusProvisioned = "PROVISIONED"
	//BGPProvisioningStatusFailed BGP peering failed
	BGPProvisioningStatusFailed = "FAILED"

	//ACLDeviceStatusProvisioning indicates that ACL is being provisioned on a device
	ACLDeviceStatusProvisioning = "PROVISIONING"
	//ACLDeviceStatusProvisioned indicates that ACL was successfully provisioned on a device
	ACLDeviceStatusProvisioned = "PROVISIONED"

	//ErrorCodeDeviceRemoved is used on attempt to remove device that is deprovisioning or already deprovisioned
	ErrorCodeDeviceRemoved = "EQ-4006103"

	//ErrorCodeSSHPublicKeyInvalid is an error code returned when invalid
	//SSH public key identifier was used
	ErrorCodeSSHPublicKeyInvalid = "EQ-4010206"

	//DeviceAdditionalBandwidthStatusProvisioning additional bandwidth is provisioning
	DeviceAdditionalBandwidthStatusProvisioning = "PROVISIONING"
	//DeviceAdditionalBandwidthStatusProvisioned additional bandwidth is provisioned
	DeviceAdditionalBandwidthStatusProvisioned = "PROVISIONED"

	//DeviceLinkGroupStatusProvisioning indicates that device link is provisioning
	DeviceLinkGroupStatusProvisioning = "PROVISIONING"
	//DeviceLinkGroupStatusProvisioned indicates that device link was provisioned
	DeviceLinkGroupStatusProvisioned = "PROVISIONED"
	//DeviceLinkGroupStatusDeprovisioning indicates that device link is deprovisioning
	DeviceLinkGroupStatusDeprovisioning = "DEPROVISIONING"
	//DeviceLinkGroupStatusProvisioned indicates that device link was deprovisioned
	DeviceLinkGroupStatusDeprovisioned = "DEPROVISIONED"
)
View Source
const (
	//DeviceManagementTypeSelf indicates device management mode where customer
	//fully manages the device
	DeviceManagementTypeSelf = "SELF-CONFIGURED"
	//DeviceManagementTypeEquinix indicates device management mode where device
	//connectivity and services are managed by Equinix
	DeviceManagementTypeEquinix = "EQUINIX-CONFIGURED"
	//DeviceLicenseModeSubscription indicates device software license mode where
	//Equinix provides software license in a form of subscription
	DeviceLicenseModeSubscription = "Sub"
	//DeviceLicenseModeBYOL indicates device software license mode where
	//customer provides his own, externally procured device license
	DeviceLicenseModeBYOL = "BYOL"
)
View Source
const (
	//ProcessTypeLicense indicates file type where customer is uploading a license file
	ProcessTypeLicense = "LICENSE"

	//ProcessTypeCloudInit indicates file type where customer is uploading a cloud_init file
	ProcessTypeCloudInit = "CLOUD_INIT"
)

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool returns pointer to a given bool value

func BoolValue

func BoolValue(b *bool) bool

BoolValue returns the value of a given bool pointer or false if the pointer is nil

func Int

func Int(i int) *int

Int returns pointer to a given int value

func IntValue

func IntValue(i *int) int

IntValue returns the value of a given int pointer or 0 if the pointer is nil

func String

func String(s string) *string

String returns pointer to a given string value

func StringValue

func StringValue(s *string) string

StringValue returns the value of a given string pointer or empty string if the pointer is nil

Types

type ACLTemplate

type ACLTemplate struct {
	UUID            *string
	Name            *string
	Description     *string
	DeviceUUID      *string // Deprecated: Refer to DeviceDetails for more information
	MetroCode       *string // Deprecated: Metro code is not required as template can be used for multiple devices across metros.
	DeviceACLStatus *string
	InboundRules    []ACLTemplateInboundRule
	DeviceDetails   []ACLTemplateDeviceDetails
	ProjectID       *string
}

ACLTemplate describes Network Edge device ACL template

type ACLTemplateDeviceDetails added in v1.3.0

type ACLTemplateDeviceDetails struct {
	UUID      *string
	Name      *string
	ACLStatus *string
}

ACLTemplateDeviceDetails describes Device Details this template applied to

type ACLTemplateInboundRule

type ACLTemplateInboundRule struct {
	SeqNo       *int
	FQDN        *string  // Deprecated: FQDN is no longer supported
	SrcType     *string  // Deprecated: SrcType is not required.
	Subnets     []string // Deprecated: Use subnet instead.
	Subnet      *string
	Protocol    *string
	SrcPort     *string
	DstPort     *string
	Description *string
}

ACLTemplateInboundRule describes inbound ACL rule that is part of Network Edge device ACL template

type Account

type Account struct {
	Name      *string
	Number    *string
	Status    *string
	UCMID     *string
	ProjectID *string
}

Account describes Network Edge customer account details

type BGPConfiguration

type BGPConfiguration struct {
	UUID               *string
	ConnectionUUID     *string
	DeviceUUID         *string
	LocalIPAddress     *string
	LocalASN           *int
	RemoteIPAddress    *string
	RemoteASN          *int
	AuthenticationKey  *string
	State              *string
	ProvisioningStatus *string
}

BGPConfiguration describes Network Edge BGP configuration

type BGPUpdateRequest

type BGPUpdateRequest interface {
	WithLocalIPAddress(localIPAddress string) BGPUpdateRequest
	WithLocalASN(localASN int) BGPUpdateRequest
	WithRemoteASN(remoteASN int) BGPUpdateRequest
	WithRemoteIPAddress(remoteIPAddress string) BGPUpdateRequest
	WithAuthenticationKey(authenticationKey string) BGPUpdateRequest
	Execute() error
}

BGPUpdateRequest describes request to update given BGP configuration

type ChangeError

type ChangeError struct {
	Type   string
	Target string
	Value  interface{}
	Cause  error
}

ChangeError describes single error that occurred during update of selected target property

func (ChangeError) Error

func (e ChangeError) Error() string

type Client

type Client interface {
	GetAccounts(metroCode string) ([]Account, error)
	GetDeviceTypes() ([]DeviceType, error)
	GetDevicePlatforms(deviceTypeCode string) ([]DevicePlatform, error)
	GetDeviceSoftwareVersions(deviceTypeCode string) ([]DeviceSoftwareVersion, error)

	CreateDevice(device Device) (*string, error)
	CreateRedundantDevice(primary Device, secondary Device) (*string, *string, error)
	AddSecondary(primaryUuid string, secondary Device) (*string, error)
	GetDevice(uuid string) (*Device, error)
	GetDevices(statuses []string) ([]Device, error)
	GetDeviceAdditionalBandwidthDetails(uuid string) (*DeviceAdditionalBandwidthDetails, error)
	GetDeviceACLDetails(uuid string) (*DeviceACLDetails, error)
	NewDeviceUpdateRequest(uuid string) DeviceUpdateRequest
	DeleteDevice(uuid string) error
	DeleteSecondaryDevice(uuid string) error

	CreateSSHUser(username string, password string, device string) (*string, error)
	GetSSHUsers() ([]SSHUser, error)
	GetSSHUser(uuid string) (*SSHUser, error)
	NewSSHUserUpdateRequest(uuid string) SSHUserUpdateRequest
	DeleteSSHUser(uuid string) error

	CreateBGPConfiguration(config BGPConfiguration) (*string, error)
	GetBGPConfiguration(uuid string) (*BGPConfiguration, error)
	NewBGPConfigurationUpdateRequest(uuid string) BGPUpdateRequest
	GetBGPConfigurationForConnection(uuid string) (*BGPConfiguration, error)

	GetSSHPublicKeys() ([]SSHPublicKey, error)
	GetSSHPublicKey(uuid string) (*SSHPublicKey, error)
	CreateSSHPublicKey(key SSHPublicKey) (*string, error)
	DeleteSSHPublicKey(uuid string) error

	CreateACLTemplate(template ACLTemplate) (*string, error)
	GetACLTemplates() ([]ACLTemplate, error)
	GetACLTemplate(uuid string) (*ACLTemplate, error)
	ReplaceACLTemplate(uuid string, template ACLTemplate) error
	DeleteACLTemplate(uuid string) error

	UploadLicenseFile(metroCode, deviceTypeCode, deviceManagementMode, licenseMode, fileName string, reader io.Reader) (*string, error)
	UploadFile(metroCode, deviceTypeCode, processType, deviceManagementMode, licenseMode, fileName string, reader io.Reader) (*string, error)
	GetFile(uuid string) (*File, error)

	GetDeviceLinkGroups() ([]DeviceLinkGroup, error)
	GetDeviceLinkGroup(uuid string) (*DeviceLinkGroup, error)
	CreateDeviceLinkGroup(linkGroup DeviceLinkGroup) (*string, error)
	NewDeviceLinkGroupUpdateRequest(uuid string) DeviceLinkUpdateRequest
	DeleteDeviceLinkGroup(uuid string) error
}

Client interface describes operations provided by Network Edge client library

type ClusterDetails added in v1.4.0

type ClusterDetails struct {
	ClusterName        *string
	NumOfNodes         *int
	ClusterNodeDetails map[string]*ClusterNodeDetail // Deprecated: Use Node0 and Node1 instead
	ClusterId          *string
	Nodes              []ClusterNode // Deprecated: Use Node0 and Node1 instead
	Node0              *ClusterNodeDetail
	Node1              *ClusterNodeDetail
}

ClusterDetails describes Network Edge cluster device details

type ClusterNode added in v1.4.0

type ClusterNode struct {
	UUID                *string
	Name                *string
	Node                *int
	AdminPassword       *string
	VendorConfiguration map[string]string
}

type ClusterNodeDetail added in v1.4.0

type ClusterNodeDetail struct {
	UUID                *string
	Name                *string
	VendorConfiguration map[string]string
	LicenseFileId       *string
	LicenseToken        *string
}

ClusterNodeDetail describes Network Edge cluster node details

type Device

type Device struct {
	UUID                      *string
	Name                      *string
	TypeCode                  *string
	Status                    *string
	LicenseStatus             *string
	MetroCode                 *string
	IBX                       *string
	Region                    *string
	Throughput                *int
	ThroughputUnit            *string
	HostName                  *string
	PackageCode               *string
	Version                   *string
	IsBYOL                    *bool
	LicenseToken              *string
	LicenseFile               *string
	CloudInitFile             *string
	LicenseFileID             *string
	CloudInitFileID           *string
	ACLTemplateUUID           *string
	MgmtAclTemplateUuid       *string
	SSHIPAddress              *string
	SSHIPFqdn                 *string
	AccountNumber             *string
	Notifications             []string
	PurchaseOrderNumber       *string
	RedundancyType            *string
	RedundantUUID             *string
	TermLength                *int
	AdditionalBandwidth       *int
	OrderReference            *string
	InterfaceCount            *int
	CoreCount                 *int
	IsSelfManaged             *bool
	Connectivity              *string
	WanInterfaceId            *string
	Interfaces                []DeviceInterface
	VendorConfiguration       map[string]string
	UserPublicKey             *DeviceUserPublicKey
	ASN                       *int
	ZoneCode                  *string
	ClusterDetails            *ClusterDetails
	ProjectID                 *string
	DiverseFromDeviceUUID     *string
	DiverseFromDeviceName     *string
	Tier                      *int
	IsGenerateDefaultPassword *bool
}

Device describes Network Edge device

type DeviceACLDetails added in v1.3.0

type DeviceACLDetails struct {
	Status *string
}

DeviceACLDetails describes details of a device additional badwidth

type DeviceAdditionalBandwidthDetails

type DeviceAdditionalBandwidthDetails struct {
	AdditionalBandwidth *int
	Status              *string
}

DeviceAdditionalBandwidthDetails describes details of a device additional badwidth

type DeviceInterface

type DeviceInterface struct {
	ID                *int
	Name              *string
	Status            *string
	OperationalStatus *string
	MACAddress        *string
	IPAddress         *string
	AssignedType      *string
	Type              *string
}

DeviceInterface describes Network Edge device interface

type DeviceLinkGroup added in v1.1.0

type DeviceLinkGroup struct {
	UUID           *string
	Name           *string
	Subnet         *string
	ProjectID      *string
	Status         *string
	Devices        []DeviceLinkGroupDevice
	Links          []DeviceLinkGroupLink // Deprecated: Use MetroLinks instead
	MetroLinks     []DeviceLinkGroupMetroLink
	RedundancyType *string
}

DeviceLinkGroup describes details of a device link group

type DeviceLinkGroupDevice added in v1.1.0

type DeviceLinkGroupDevice struct {
	DeviceID    *string
	ASN         *int
	InterfaceID *int
	Status      *string
	IPAddress   *string
}

DeviceLinkGroupDevice describes details of a device within device link group

type DeviceLinkGroupLink struct {
	AccountNumber        *string
	Throughput           *string
	ThroughputUnit       *string
	SourceMetroCode      *string
	DestinationMetroCode *string
	SourceZoneCode       *string
	DestinationZoneCode  *string
}

DeviceLinkGroupLink describes details if a link (connection) within device link group

type DeviceLinkGroupMetroLink struct {
	AccountNumber  *string
	MetroCode      *string
	Throughput     *string
	ThroughputUnit *string
}

DeviceLinkGroupMetroLink describes metro details and throughput

type DeviceLinkUpdateRequest added in v1.1.0

type DeviceLinkUpdateRequest interface {
	WithGroupName(name string) DeviceLinkUpdateRequest
	WithSubnet(subnet string) DeviceLinkUpdateRequest
	WithDevices(devices []DeviceLinkGroupDevice) DeviceLinkUpdateRequest
	WithLinks(links []DeviceLinkGroupLink) DeviceLinkUpdateRequest
	WithMetroLinks(metroLinks []DeviceLinkGroupMetroLink) DeviceLinkUpdateRequest
	WithRedundancyType(redundancyType string) DeviceLinkUpdateRequest
	Execute() error
}

DeviceLinkUpdateRequest descrobes request to update given Device Link Group

type DevicePlatform

type DevicePlatform struct {
	Flavor          *string
	CoreCount       *int
	Memory          *int
	MemoryUnit      *string
	PackageCodes    []string
	ManagementTypes []string
	LicenseOptions  []string
}

DevicePlatform describes Network Edge platform configurations available for a given device type

type DeviceSoftwareVersion

type DeviceSoftwareVersion struct {
	Version          *string
	ImageName        *string
	Date             *string
	Status           *string
	IsStable         *bool
	ReleaseNotesLink *string
	PackageCodes     []string
}

DeviceSoftwareVersion describes available software packages and versions for a Network Edge device

type DeviceType

type DeviceType struct {
	Name        *string
	Code        *string
	Description *string
	Vendor      *string
	Category    *string
	MetroCodes  []string
}

DeviceType describes Network Edge device type

type DeviceUpdateRequest

type DeviceUpdateRequest interface {
	WithDeviceName(deviceName string) DeviceUpdateRequest
	WithTermLength(termLength int) DeviceUpdateRequest
	WithNotifications(notifications []string) DeviceUpdateRequest
	WithCore(core int) DeviceUpdateRequest
	WithAdditionalBandwidth(additionalBandwidth int) DeviceUpdateRequest
	WithACLTemplate(templateID string) DeviceUpdateRequest
	WithMgmtAclTemplate(mgmtAclTemplateUuid string) DeviceUpdateRequest
	WithClusterName(clusterName string) DeviceUpdateRequest
	Execute() error
}

DeviceUpdateRequest describes composite request to update given Network Edge device

type DeviceUserPublicKey

type DeviceUserPublicKey struct {
	Username *string
	KeyName  *string
}

DeviceUserPublicKey describes public SSH key along with username that is provisioned on a network device.

type Error

type Error struct {
	//ErrorCode is short error identifier
	ErrorCode string
	//ErrorMessage is textual description of an error
	ErrorMessage string
}

Error describes Network Edge error that occurs during API call processing

type File added in v1.9.0

type File struct {
	UUID           *string
	FileName       *string
	MetroCode      *string
	DeviceTypeCode *string
	ProcessType    *string
	Status         *string
}

File describes Network Edge uploaded file

type RestClient

type RestClient struct {
	*rest.Client
}

RestClient describes REST implementation of Network Edge Client

func NewClient

func NewClient(ctx context.Context, baseURL string, httpClient *http.Client) *RestClient

NewClient creates new REST Network Edge client with a given baseURL, context and httpClient

func (RestClient) AddSecondary added in v1.20.0

func (c RestClient) AddSecondary(primaryUuid string, secondary Device) (*string, error)

func (RestClient) CreateACLTemplate

func (c RestClient) CreateACLTemplate(template ACLTemplate) (*string, error)

CreateACLTemplate creates new ACL template with a given model On successful creation, template's UUID is returned

func (RestClient) CreateBGPConfiguration

func (c RestClient) CreateBGPConfiguration(config BGPConfiguration) (*string, error)

CreateBGPConfiguration creates new Network Edge BGP configuration with a given model. Configuration's UUID is returned on successful creation

func (RestClient) CreateDevice

func (c RestClient) CreateDevice(device Device) (*string, error)

CreateDevice creates given Network Edge device and returns its UUID upon successful creation

func (RestClient) CreateDeviceLinkGroup added in v1.1.0

func (c RestClient) CreateDeviceLinkGroup(linkGroup DeviceLinkGroup) (*string, error)

CreateDeviceLinkGroup creates given device link group and returns its identifier upon successful creation

func (RestClient) CreateRedundantDevice

func (c RestClient) CreateRedundantDevice(primary Device, secondary Device) (*string, *string, error)

CreateRedundantDevice creates HA device setup from given primary and secondary devices and returns their UUIDS upon successful creation

func (RestClient) CreateSSHPublicKey

func (c RestClient) CreateSSHPublicKey(key SSHPublicKey) (*string, error)

CreateSSHPublicKey creates new SSH public key with a given details

func (RestClient) CreateSSHUser

func (c RestClient) CreateSSHUser(username string, password string, device string) (*string, error)

CreateSSHUser creates new Network Edge SSH user with a given parameters and returns its UUID upon successful creation

func (RestClient) DeleteACLTemplate

func (c RestClient) DeleteACLTemplate(uuid string) error

DeleteACLTemplate removes ACL template with a given UUID

func (RestClient) DeleteDevice

func (c RestClient) DeleteDevice(uuid string) error

DeleteDevice deletes device with a given UUID

func (RestClient) DeleteDeviceLinkGroup added in v1.1.0

func (c RestClient) DeleteDeviceLinkGroup(uuid string) error

DeleteDeviceLinkGroup removes device link group with a given identifier

func (RestClient) DeleteSSHPublicKey

func (c RestClient) DeleteSSHPublicKey(uuid string) error

DeleteSSHPublicKey removes SSH Public key with given identifier

func (RestClient) DeleteSSHUser

func (c RestClient) DeleteSSHUser(uuid string) error

DeleteSSHUser deletes ssh user with a given UUID

func (RestClient) DeleteSecondaryDevice added in v1.20.0

func (c RestClient) DeleteSecondaryDevice(uuid string) error

func (RestClient) GetACLTemplate

func (c RestClient) GetACLTemplate(uuid string) (*ACLTemplate, error)

GetACLTemplate retrieves ACL template with a given UUID

func (RestClient) GetACLTemplates

func (c RestClient) GetACLTemplates() ([]ACLTemplate, error)

GetACLTemplates retrieves list of all ACL templates along with their details

func (RestClient) GetAccounts

func (c RestClient) GetAccounts(metroCode string) ([]Account, error)

GetAccounts retrieves accounts and their details for a given metro code using Network Edge API

func (RestClient) GetBGPConfiguration

func (c RestClient) GetBGPConfiguration(uuid string) (*BGPConfiguration, error)

GetBGPConfiguration retrieves BGP configuration with a given UUID

func (RestClient) GetBGPConfigurationForConnection

func (c RestClient) GetBGPConfigurationForConnection(uuid string) (*BGPConfiguration, error)

GetBGPConfigurationForConnection retreive BGP configuration for a connection with a given connection UUID

func (RestClient) GetDevice

func (c RestClient) GetDevice(uuid string) (*Device, error)

GetDevice fetches details of a device with a given UUID

func (RestClient) GetDeviceACLDetails added in v1.3.0

func (c RestClient) GetDeviceACLDetails(uuid string) (*DeviceACLDetails, error)

GetDeviceACLDetails retrives device acl template provisioning status

func (RestClient) GetDeviceAdditionalBandwidthDetails

func (c RestClient) GetDeviceAdditionalBandwidthDetails(uuid string) (*DeviceAdditionalBandwidthDetails, error)

GetDeviceAdditionalBandwidthDetails retrives details of given device's additional bandwidth

func (RestClient) GetDeviceLinkGroup added in v1.1.0

func (c RestClient) GetDeviceLinkGroup(uuid string) (*DeviceLinkGroup, error)

GetDeviceLinkGroups retrieves details of a device link group with a given identifier

func (RestClient) GetDeviceLinkGroups added in v1.1.0

func (c RestClient) GetDeviceLinkGroups() ([]DeviceLinkGroup, error)

GetDeviceLinkGroups retrieves list of existing device link groups (along with their details)

func (RestClient) GetDevicePlatforms

func (c RestClient) GetDevicePlatforms(deviceTypeCode string) ([]DevicePlatform, error)

GetDevicePlatforms retrieves list of available platform configurations for a given device type

func (RestClient) GetDeviceSoftwareVersions

func (c RestClient) GetDeviceSoftwareVersions(deviceTypeCode string) ([]DeviceSoftwareVersion, error)

GetDeviceSoftwareVersions retrieves list of available software versions for a given device type

func (RestClient) GetDeviceTypes

func (c RestClient) GetDeviceTypes() ([]DeviceType, error)

GetDeviceTypes retrieves list of devices types along with their details

func (RestClient) GetDevices

func (c RestClient) GetDevices(statuses []string) ([]Device, error)

GetDevices retrieves list of devices (along with their details) with given list of statuses

func (RestClient) GetFile added in v1.9.0

func (c RestClient) GetFile(uuid string) (*File, error)

GetFile retrieves file metadata with a given UUID

func (RestClient) GetSSHPublicKey

func (c RestClient) GetSSHPublicKey(uuid string) (*SSHPublicKey, error)

GetSSHPublicKey retrieves SSH public key with a given identifier

func (RestClient) GetSSHPublicKeys

func (c RestClient) GetSSHPublicKeys() ([]SSHPublicKey, error)

GetSSHPublicKeys retrieves list of available SSH public keys

func (RestClient) GetSSHUser

func (c RestClient) GetSSHUser(uuid string) (*SSHUser, error)

GetSSHUser fetches details of a SSH user with a given UUID

func (RestClient) GetSSHUsers

func (c RestClient) GetSSHUsers() ([]SSHUser, error)

GetSSHUsers retrieves list of all SSH users (with details)

func (RestClient) NewBGPConfigurationUpdateRequest

func (c RestClient) NewBGPConfigurationUpdateRequest(uuid string) BGPUpdateRequest

NewBGPConfigurationUpdateRequest creates new BGP configuration update request for a configuration with given UUID

func (RestClient) NewDeviceLinkGroupUpdateRequest added in v1.1.0

func (c RestClient) NewDeviceLinkGroupUpdateRequest(uuid string) DeviceLinkUpdateRequest

NewDeviceLinkGroupUpdateRequest creates new update request for a device link group with a given identifier

func (RestClient) NewDeviceUpdateRequest

func (c RestClient) NewDeviceUpdateRequest(uuid string) DeviceUpdateRequest

NewDeviceUpdateRequest creates new composite update request for a device with a given UUID

func (RestClient) NewSSHUserUpdateRequest

func (c RestClient) NewSSHUserUpdateRequest(uuid string) SSHUserUpdateRequest

NewSSHUserUpdateRequest creates new composite update request for a user with a given UUID

func (RestClient) ReplaceACLTemplate

func (c RestClient) ReplaceACLTemplate(uuid string, template ACLTemplate) error

ReplaceACLTemplate replaces ACL template under given UUID with a new one with a given model

func (RestClient) UploadFile added in v1.8.0

func (c RestClient) UploadFile(metroCode, deviceTypeCode, processType, deviceManagementMode, licenseMode, fileName string, reader io.Reader) (*string, error)

UploadFile performs multipart upload of a cloud_init/license file from a given reader interface along with provided data. Uploaded file identifier is returned on success.

func (RestClient) UploadLicenseFile

func (c RestClient) UploadLicenseFile(metroCode, deviceTypeCode, deviceManagementMode, licenseMode, fileName string, reader io.Reader) (*string, error)

UploadLicenseFile performs multipart upload of a license file from a given reader interface along with provided data. Uploaded file identifier is returned on success.

type SSHPublicKey

type SSHPublicKey struct {
	UUID      *string
	Name      *string
	Value     *string
	Type      *string
	ProjectID *string
}

SSHPublicKey describes Network Edge SSH user public key

type SSHUser

type SSHUser struct {
	UUID        *string
	Username    *string
	Password    *string
	DeviceUUIDs []string
}

SSHUser describes Network Edge SSH user

type SSHUserUpdateRequest

type SSHUserUpdateRequest interface {
	WithNewPassword(password string) SSHUserUpdateRequest
	WithDeviceChange(old []string, new []string) SSHUserUpdateRequest
	Execute() error
}

SSHUserUpdateRequest describes composite request to update given Network Edge SSH user

type UpdateError

type UpdateError struct {
	Failed []ChangeError
}

UpdateError describes error that occurred during composite update request and consists of multiple atomic change errors

func (*UpdateError) AddChangeError

func (e *UpdateError) AddChangeError(changeType string, target string, value interface{}, cause error)

AddChangeError functions add new atomic change error to update error structure

func (UpdateError) ChangeErrorsCount

func (e UpdateError) ChangeErrorsCount() int

ChangeErrorsCount returns number of atomic change errors in a given composite update error

func (UpdateError) Error

func (e UpdateError) Error() string

Directories

Path Synopsis
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL