peers

package
v1.1.43 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBGPPeersInto

func ExtractBGPPeersInto(r pagination.Page, v interface{}) error

func List

List the bgp peers

Types

type BGPPeer

type BGPPeer struct {
	// AuthType of the BGP Speaker
	AuthType string `json:"auth_type"`

	// UUID for the bgp peer
	ID string `json:"id"`

	// Human-readable name for the bgp peer. Might not be unique.
	Name string `json:"name"`

	// TenantID is the project owner of the bgp peer.
	TenantID string `json:"tenant_id"`

	// The IP addr of the BGP Peer
	PeerIP string `json:"peer_ip"`

	// ProjectID is the project owner of the bgp peer.
	ProjectID string `json:"project_id"`

	// Remote Autonomous System
	RemoteAS int `json:"remote_as"`
}

BGP peer

func ExtractBGPPeers

func ExtractBGPPeers(r pagination.Page) ([]BGPPeer, error)

ExtractBGPPeers accepts a Page struct, specifically a BGPPeerPage struct, and extracts the elements into a slice of BGPPeer structs. In other words, a generic collection is mapped into a relevant slice.

type BGPPeerPage

type BGPPeerPage struct {
	pagination.SinglePageBase
}

BGPPeerPage is the page returned by a pager when traversing over a collection of bgp peers.

func (BGPPeerPage) IsEmpty

func (r BGPPeerPage) IsEmpty() (bool, error)

IsEmpty checks whether a BGPPage struct is empty.

type CreateOpts

type CreateOpts struct {
	AuthType string `json:"auth_type"`
	RemoteAS int    `json:"remote_as"`
	Name     string `json:"name"`
	Password string `json:"password,omitempty"`
	PeerIP   string `json:"peer_ip"`
}

CreateOpts represents options used to create a BGP Peer.

func (CreateOpts) ToPeerCreateMap

func (opts CreateOpts) ToPeerCreateMap() (map[string]interface{}, error)

ToPeerCreateMap builds a request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToPeerCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents the result of a create operation. Call its Extract method to intepret it as a BGPPeer.

func Create

func Create(c *gophercloud.ServiceClient, opts CreateOpts) (r CreateResult)

Create a BGP Peer

func (CreateResult) Extract

func (r CreateResult) Extract() (*BGPPeer, error)

Extract is a function that accepts a result and extracts a bgp peer resource.

func (CreateResult) ExtractInto

func (r CreateResult) ExtractInto(v interface{}) error

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(c *gophercloud.ServiceClient, bgpPeerID string) (r DeleteResult)

Delete accepts a unique ID and deletes the bgp Peer associated with it.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult represents the result of a get operation. Call its Extract method to interpret it as a BGPPeer.

func Get

func Get(c *gophercloud.ServiceClient, id string) (r GetResult)

Get retrieve the specific bgp peer by its uuid

func (GetResult) Extract

func (r GetResult) Extract() (*BGPPeer, error)

Extract is a function that accepts a result and extracts a bgp peer resource.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v interface{}) error

type UpdateOpts

type UpdateOpts struct {
	Name     string `json:"name,omitempty"`
	Password string `json:"password,omitempty"`
}

UpdateOpts represents options used to update a BGP Peer.

func (UpdateOpts) ToPeerUpdateMap

func (opts UpdateOpts) ToPeerUpdateMap() (map[string]interface{}, error)

ToPeerUpdateMap builds a request body from UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToPeerUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a BGPPeer.

func Update

func Update(c *gophercloud.ServiceClient, bgpPeerID string, opts UpdateOpts) (r UpdateResult)

Update accept a BGP Peer ID and an UpdateOpts and update the BGP Peer

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*BGPPeer, error)

Extract is a function that accepts a result and extracts a bgp peer resource.

func (UpdateResult) ExtractInto

func (r UpdateResult) ExtractInto(v interface{}) error

Directories

Path Synopsis
Package testing fro bgp peers
Package testing fro bgp peers

Jump to

Keyboard shortcuts

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