speakers

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 ExtractAdvertisedRoutesInto

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

ExtractAdvertisedRoutesInto extract the advertised routes from the first param into the 2nd

func ExtractBGPSpeakersInto

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

ExtractBGPSpeakersInto accepts a Page struct and an interface{}. The former contains a list of BGPSpeaker and the later should be used to store the result that would be extracted from the former.

func GetAdvertisedRoutes

func GetAdvertisedRoutes(c *gophercloud.ServiceClient, bgpSpeakerID string) pagination.Pager

GetAdvertisedRoutes a.k.a. GET /v2.0/bgp-speakers/{bgp-speaker-id}/get_advertised_routes

func List

List the bgp speakers

Types

type AddBGPPeerOpts

type AddBGPPeerOpts struct {
	BGPPeerID string `json:"bgp_peer_id"`
}

AddBGPPeerOpts represents options used to add a BGP Peer to a BGP Speaker

func (AddBGPPeerOpts) ToBGPSpeakerAddBGPPeerMap

func (opts AddBGPPeerOpts) ToBGPSpeakerAddBGPPeerMap() (map[string]interface{}, error)

ToBGPSpeakerAddBGPPeerMap build a request body from AddBGPPeerOpts

type AddBGPPeerOptsBuilder

type AddBGPPeerOptsBuilder interface {
	ToBGPSpeakerAddBGPPeerMap() (map[string]interface{}, error)
}

AddBGPPeerOptsBuilder declare a funtion that encode AddBGPPeerOpts into a request body

type AddBGPPeerResult

type AddBGPPeerResult struct {
	gophercloud.Result
}

AddBGPPeerResult represent the response of the PUT /v2.0/bgp-speakers/{bgp-speaker-id}/add-bgp-peer

func AddBGPPeer

func AddBGPPeer(c *gophercloud.ServiceClient, bgpSpeakerID string, opts AddBGPPeerOptsBuilder) (r AddBGPPeerResult)

AddBGPPeer add the BGP peer to the speaker a.k.a. PUT /v2.0/bgp-speakers/{bgp-speaker-id}/add_bgp_peer

func (AddBGPPeerResult) Extract

func (r AddBGPPeerResult) Extract() (*AddBGPPeerOpts, error)

Extract is a function that accepts a result and extracts a AddBGPPeerResult resource

func (AddBGPPeerResult) ExtractInto

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

type AddGatewayNetworkOpts

type AddGatewayNetworkOpts struct {
	// The uuid of the network
	NetworkID string `json:"network_id"`
}

AddGatewayNetworkOpts represents the data that would be PUT to the endpoint

func (AddGatewayNetworkOpts) ToBGPSpeakerAddGatewayNetworkMap

func (opts AddGatewayNetworkOpts) ToBGPSpeakerAddGatewayNetworkMap() (map[string]interface{}, error)

ToBGPSpeakerAddGatewayNetworkMap implements the function

type AddGatewayNetworkOptsBuilder

type AddGatewayNetworkOptsBuilder interface {
	ToBGPSpeakerAddGatewayNetworkMap() (map[string]interface{}, error)
}

AddGatewayNetworkOptsBuilder declare a function that build AddGatewayNetworkOpts into a request body.

type AddGatewayNetworkResult

type AddGatewayNetworkResult struct {
	gophercloud.Result
}

AddGatewayNetworkResult represents the data that would be PUT to /v2.0/bgp-speakers/{bgp-speaker-id}/add_gateway_network

func AddGatewayNetwork

func AddGatewayNetwork(c *gophercloud.ServiceClient, bgpSpeakerID string, opts AddGatewayNetworkOptsBuilder) (r AddGatewayNetworkResult)

AddGatewayNetwork a.k.a. PUT /v2.0/bgp-speakers/{bgp-speaker-id}/add_gateway_network

func (AddGatewayNetworkResult) Extract

type AdvertisedRoute

type AdvertisedRoute struct {
	// NextHop IP address
	NextHop string `json:"next_hop"`

	// Destination Network
	Destination string `json:"destination"`
}

AdvertisedRoute represents an advertised route

func ExtractAdvertisedRoutes

func ExtractAdvertisedRoutes(r pagination.Page) ([]AdvertisedRoute, error)

ExtractAdvertisedRoutes accepts a Page struct, a.k.a. AdvertisedRoutePage struct, and extracts the elements into a slice of AdvertisedRoute structs.

type AdvertisedRoutePage

type AdvertisedRoutePage struct {
	pagination.SinglePageBase
}

AdvertisedRoutePage is the page returned by a pager when you call

func (AdvertisedRoutePage) IsEmpty

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

IsEmpty checks whether a AdvertisedRoutePage struct is empty.

type BGPSpeaker

type BGPSpeaker struct {
	// UUID for the bgp speaker
	ID string `json:"id"`

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

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

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

	// If the speaker would advertise floating ip host routes
	AdvertiseFloatingIPHostRoutes bool `json:"advertise_floating_ip_host_routes"`

	// If the speaker would advertise tenant networks
	AdvertiseTenantNetworks bool `json:"advertise_tenant_networks"`

	// IP version
	IPVersion int `json:"ip_version"`

	// Local Autonomous System
	LocalAS int `json:"local_as"`

	// The uuid of the Networks configured with this speaker
	Networks []string `json:"networks"`

	// The uuid of the BGP Peer Configured with this speaker
	Peers []string `json:"peers"`
}

BGPSpeaker BGP Speaker

func ExtractBGPSpeakers

func ExtractBGPSpeakers(r pagination.Page) ([]BGPSpeaker, error)

ExtractBGPSpeakers accepts a Page struct, specifically a BGPSpeakerPage struct, and extracts the elements into a slice of BGPSpeaker structs. In other words, a generic collection is mapped into a relevant slice.

type BGPSpeakerPage

type BGPSpeakerPage struct {
	pagination.SinglePageBase
}

BGPSpeakerPage is the page returned by a pager when traversing over a collection of bgp speakers.

func (BGPSpeakerPage) IsEmpty

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

IsEmpty checks whether a BGPSpeakerPage struct is empty.

type CreateOpts

type CreateOpts struct {
	Name                          string   `json:"name"`
	IPVersion                     int      `json:"ip_version"`
	AdvertiseFloatingIPHostRoutes bool     `json:"advertise_floating_ip_host_routes"`
	AdvertiseTenantNetworks       bool     `json:"advertise_tenant_networks"`
	LocalAS                       string   `json:"local_as"`
	Networks                      []string `json:"networks,omitempty"`
}

CreateOpts represents options used to create a BGP Speaker.

func (CreateOpts) ToSpeakerCreateMap

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

ToSpeakerCreateMap builds a request body from CreateOpts.

type CreateOptsBuilder

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

CreateOptsBuilder declare a function that build CreateOpts into a Create request body.

type CreateResult

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

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

func Create

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

Create accepts a CreateOpts and create a BGP Speaker.

func (CreateResult) Extract

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

Extract is a function that accepts a result and extracts a bgp speaker 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, speakerID string) (r DeleteResult)

Delete accepts a unique ID and deletes the bgp speaker 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 BGPSpeaker.

func Get

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

Get retrieve the specific bgp speaker by its uuid

func (GetResult) Extract

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

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

func (GetResult) ExtractInto

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

type RemoveBGPPeerOpts

type RemoveBGPPeerOpts AddBGPPeerOpts

RemoveBGPPeerOpts represents options used to remove a BGP Peer to a BGP Speaker

func (RemoveBGPPeerOpts) ToBGPSpeakerRemoveBGPPeerMap

func (opts RemoveBGPPeerOpts) ToBGPSpeakerRemoveBGPPeerMap() (map[string]interface{}, error)

ToBGPSpeakerRemoveBGPPeerMap build a request body from RemoveBGPPeerOpts

type RemoveBGPPeerOptsBuilder

type RemoveBGPPeerOptsBuilder interface {
	ToBGPSpeakerRemoveBGPPeerMap() (map[string]interface{}, error)
}

RemoveBGPPeerOptsBuilder declare a funtion that encode RemoveBGPPeerOpts into a request body

type RemoveBGPPeerResult

type RemoveBGPPeerResult struct {
	gophercloud.ErrResult
}

RemoveBGPPeerResult represent the response of the PUT /v2.0/bgp-speakers/{bgp-speaker-id}/remove-bgp-peer There is no body content for the response of a successful DELETE request.

func RemoveBGPPeer

func RemoveBGPPeer(c *gophercloud.ServiceClient, bgpSpeakerID string, opts RemoveBGPPeerOptsBuilder) (r RemoveBGPPeerResult)

RemoveBGPPeer remove the BGP peer from the speaker, a.k.a. PUT /v2.0/bgp-speakers/{bgp-speaker-id}/add_bgp_peer

type RemoveGatewayNetworkOpts

type RemoveGatewayNetworkOpts AddGatewayNetworkOpts

RemoveGatewayNetworkOpts represent the data that would be PUT to the endpoint

func (RemoveGatewayNetworkOpts) ToBGPSpeakerRemoveGatewayNetworkMap

func (opts RemoveGatewayNetworkOpts) ToBGPSpeakerRemoveGatewayNetworkMap() (map[string]interface{}, error)

ToBGPSpeakerRemoveGatewayNetworkMap implement the function

type RemoveGatewayNetworkOptsBuilder

type RemoveGatewayNetworkOptsBuilder interface {
	ToBGPSpeakerRemoveGatewayNetworkMap() (map[string]interface{}, error)
}

RemoveGatewayNetworkOptsBuilder declare a function that build RemoveGatewayNetworkOpts into a request body.

type RemoveGatewayNetworkResult

type RemoveGatewayNetworkResult struct {
	gophercloud.ErrResult
}

RemoveGatewayNetworkResult represents the data that would be PUT to /v2.0/bgp-speakers/{bgp-speaker-id}/remove_gateway_network

func RemoveGatewayNetwork

func RemoveGatewayNetwork(c *gophercloud.ServiceClient, bgpSpeakerID string, opts RemoveGatewayNetworkOptsBuilder) (r RemoveGatewayNetworkResult)

RemoveGatewayNetwork a.k.a. PUT /v2.0/bgp-speakers/{bgp-speaker-id}/remove_gateway_network

type UpdateOpts

type UpdateOpts struct {
	Name                          string `json:"name,omitempty"`
	AdvertiseFloatingIPHostRoutes bool   `json:"advertise_floating_ip_host_routes"`
	AdvertiseTenantNetworks       bool   `json:"advertise_tenant_networks"`
}

UpdateOpts represents options used to update a BGP Speaker.

func (UpdateOpts) ToSpeakerUpdateMap

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

ToSpeakerUpdateMap build a request body from UpdateOpts

type UpdateOptsBuilder

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

UpdateOptsBuilder allow the 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 BGPSpeaker.

func Update

func Update(c *gophercloud.ServiceClient, speakerID string, opts UpdateOptsBuilder) (r UpdateResult)

Update accepts a UpdateOpts and update the BGP Speaker.

func (UpdateResult) Extract

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

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

func (UpdateResult) ExtractInto

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

Directories

Path Synopsis
Package testing for bgp speakers
Package testing for bgp speakers

Jump to

Keyboard shortcuts

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