Documentation ¶
Index ¶
- func ExtractAdvertisedRoutesInto(r pagination.Page, v interface{}) error
- func ExtractBGPSpeakersInto(r pagination.Page, v interface{}) error
- func GetAdvertisedRoutes(c *gophercloud.ServiceClient, bgpSpeakerID string) pagination.Pager
- func List(c *gophercloud.ServiceClient) pagination.Pager
- type AddBGPPeerOpts
- type AddBGPPeerOptsBuilder
- type AddBGPPeerResult
- type AddGatewayNetworkOpts
- type AddGatewayNetworkOptsBuilder
- type AddGatewayNetworkResult
- type AdvertisedRoute
- type AdvertisedRoutePage
- type BGPSpeaker
- type BGPSpeakerPage
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type RemoveBGPPeerOpts
- type RemoveBGPPeerOptsBuilder
- type RemoveBGPPeerResult
- type RemoveGatewayNetworkOpts
- type RemoveGatewayNetworkOptsBuilder
- type RemoveGatewayNetworkResult
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAdvertisedRoutesInto ¶ added in v0.25.0
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 ¶ added in v0.25.0
func GetAdvertisedRoutes(c *gophercloud.ServiceClient, bgpSpeakerID string) pagination.Pager
GetAdvertisedRoutes a.k.a. GET /v2.0/bgp-speakers/{bgp-speaker-id}/get_advertised_routes
Types ¶
type AddBGPPeerOpts ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (opts AddBGPPeerOpts) ToBGPSpeakerAddBGPPeerMap() (map[string]interface{}, error)
ToBGPSpeakerAddBGPPeerMap build a request body from AddBGPPeerOpts
type AddBGPPeerOptsBuilder ¶ added in v0.25.0
type AddBGPPeerOptsBuilder interface {
ToBGPSpeakerAddBGPPeerMap() (map[string]interface{}, error)
}
AddBGPPeerOptsBuilder declare a funtion that encode AddBGPPeerOpts into a request body
type AddBGPPeerResult ¶ added in v0.25.0
type AddBGPPeerResult struct {
gophercloud.Result
}
AddBGPPeerResult represent the response of the PUT /v2.0/bgp-speakers/{bgp-speaker-id}/add-bgp-peer
func AddBGPPeer ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (r AddBGPPeerResult) Extract() (*AddBGPPeerOpts, error)
Extract is a function that accepts a result and extracts a AddBGPPeerResult resource
func (AddBGPPeerResult) ExtractInto ¶ added in v0.25.0
func (r AddBGPPeerResult) ExtractInto(v interface{}) error
type AddGatewayNetworkOpts ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (opts AddGatewayNetworkOpts) ToBGPSpeakerAddGatewayNetworkMap() (map[string]interface{}, error)
ToBGPSpeakerAddGatewayNetworkMap implements the function
type AddGatewayNetworkOptsBuilder ¶ added in v0.25.0
type AddGatewayNetworkOptsBuilder interface {
ToBGPSpeakerAddGatewayNetworkMap() (map[string]interface{}, error)
}
AddGatewayNetworkOptsBuilder declare a function that build AddGatewayNetworkOpts into a request body.
type AddGatewayNetworkResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (r AddGatewayNetworkResult) Extract() (*AddGatewayNetworkOpts, error)
type AdvertisedRoute ¶ added in v0.25.0
type AdvertisedRoute struct { // NextHop IP address NextHop string `json:"next_hop"` // Destination Network Destination string `json:"destination"` }
AdvertisedRoute represents an advertised route
func ExtractAdvertisedRoutes ¶ added in v0.25.0
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 ¶ added in v0.25.0
type AdvertisedRoutePage struct {
pagination.SinglePageBase
}
AdvertisedRoutePage is the page returned by a pager when you call
func (AdvertisedRoutePage) IsEmpty ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (opts CreateOpts) ToSpeakerCreateMap() (map[string]interface{}, error)
ToSpeakerCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶ added in v0.25.0
CreateOptsBuilder declare a function that build CreateOpts into a Create request body.
type CreateResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
func Create(c *gophercloud.ServiceClient, opts CreateOpts) (r CreateResult)
Create accepts a CreateOpts and create a BGP Speaker.
func (CreateResult) Extract ¶ added in v0.25.0
func (r CreateResult) Extract() (*BGPSpeaker, error)
Extract is a function that accepts a result and extracts a bgp speaker resource.
func (CreateResult) ExtractInto ¶ added in v0.25.0
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
type RemoveBGPPeerOpts AddBGPPeerOpts
RemoveBGPPeerOpts represents options used to remove a BGP Peer to a BGP Speaker
func (RemoveBGPPeerOpts) ToBGPSpeakerRemoveBGPPeerMap ¶ added in v0.25.0
func (opts RemoveBGPPeerOpts) ToBGPSpeakerRemoveBGPPeerMap() (map[string]interface{}, error)
ToBGPSpeakerRemoveBGPPeerMap build a request body from RemoveBGPPeerOpts
type RemoveBGPPeerOptsBuilder ¶ added in v0.25.0
type RemoveBGPPeerOptsBuilder interface {
ToBGPSpeakerRemoveBGPPeerMap() (map[string]interface{}, error)
}
RemoveBGPPeerOptsBuilder declare a funtion that encode RemoveBGPPeerOpts into a request body
type RemoveBGPPeerResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
type RemoveGatewayNetworkOpts AddGatewayNetworkOpts
RemoveGatewayNetworkOpts represent the data that would be PUT to the endpoint
func (RemoveGatewayNetworkOpts) ToBGPSpeakerRemoveGatewayNetworkMap ¶ added in v0.25.0
func (opts RemoveGatewayNetworkOpts) ToBGPSpeakerRemoveGatewayNetworkMap() (map[string]interface{}, error)
ToBGPSpeakerRemoveGatewayNetworkMap implement the function
type RemoveGatewayNetworkOptsBuilder ¶ added in v0.25.0
type RemoveGatewayNetworkOptsBuilder interface {
ToBGPSpeakerRemoveGatewayNetworkMap() (map[string]interface{}, error)
}
RemoveGatewayNetworkOptsBuilder declare a function that build RemoveGatewayNetworkOpts into a request body.
type RemoveGatewayNetworkResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
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 ¶ added in v0.25.0
func (opts UpdateOpts) ToSpeakerUpdateMap() (map[string]interface{}, error)
ToSpeakerUpdateMap build a request body from UpdateOpts
type UpdateOptsBuilder ¶ added in v0.25.0
UpdateOptsBuilder allow the extensions to add additional parameters to the Update request.
type UpdateResult ¶ added in v0.25.0
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 ¶ added in v0.25.0
func Update(c *gophercloud.ServiceClient, speakerID string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts and update the BGP Speaker.
func (UpdateResult) Extract ¶ added in v0.25.0
func (r UpdateResult) Extract() (*BGPSpeaker, error)
Extract is a function that accepts a result and extracts a bgp speaker resource.
func (UpdateResult) ExtractInto ¶ added in v0.25.0
func (r UpdateResult) ExtractInto(v interface{}) error