Documentation ¶
Overview ¶
Package floatingips provides the ability to manage floating ips through nova-network
Index ¶
- func List(client *gophercloud.ServiceClient) pagination.Pager
- type AssociateOpts
- type AssociateOptsBuilder
- type AssociateResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type DisassociateOpts
- type DisassociateOptsBuilder
- type DisassociateResult
- type FloatingIP
- type FloatingIPPage
- type FloatingIPResult
- type GetResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient) pagination.Pager
List returns a Pager that allows you to iterate over a collection of FloatingIPs.
Types ¶
type AssociateOpts ¶
type AssociateOpts struct { // FloatingIP is the floating IP to associate with an instance FloatingIP string `json:"address" required:"true"` // FixedIP is an optional fixed IP address of the server FixedIP string `json:"fixed_address,omitempty"` }
AssociateOpts specifies the required information to associate a floating IP with an instance
func (AssociateOpts) ToFloatingIPAssociateMap ¶
func (opts AssociateOpts) ToFloatingIPAssociateMap() (map[string]interface{}, error)
ToFloatingIPAssociateMap constructs a request body from AssociateOpts.
type AssociateOptsBuilder ¶
AssociateOptsBuilder is the interface types must satfisfy to be used as Associate options
type AssociateResult ¶
type AssociateResult struct {
gophercloud.ErrResult
}
AssociateResult is the response from a Delete operation. Call its Extract method to determine if the call succeeded or failed.
func AssociateInstance ¶
func AssociateInstance(client *gophercloud.ServiceClient, serverID string, opts AssociateOptsBuilder) (r AssociateResult)
AssociateInstance pairs an allocated floating IP with an instance.
type CreateOpts ¶
type CreateOpts struct { // Pool is the pool of floating IPs to allocate one from Pool string `json:"pool" required:"true"` }
CreateOpts specifies a Floating IP allocation request
func (CreateOpts) ToFloatingIPCreateMap ¶
func (opts CreateOpts) ToFloatingIPCreateMap() (map[string]interface{}, error)
ToFloatingIPCreateMap constructs a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder describes struct types that can be accepted by the Create call. Notable, the CreateOpts struct in this package does.
type CreateResult ¶
type CreateResult struct {
FloatingIPResult
}
CreateResult is the response from a Create operation. Call its Extract method to interpret it as a FloatingIP.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create requests the creation of a new floating IP
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult is the response from a Delete operation. Call its Extract method to determine if the call succeeded or failed.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete requests the deletion of a previous allocated FloatingIP.
type DisassociateOpts ¶
type DisassociateOpts struct {
FloatingIP string `json:"address" required:"true"`
}
DisassociateOpts specifies the required information to disassociate a floating IP with an instance
func (DisassociateOpts) ToFloatingIPDisassociateMap ¶
func (opts DisassociateOpts) ToFloatingIPDisassociateMap() (map[string]interface{}, error)
ToFloatingIPDisassociateMap constructs a request body from AssociateOpts.
type DisassociateOptsBuilder ¶
type DisassociateOptsBuilder interface {
ToFloatingIPDisassociateMap() (map[string]interface{}, error)
}
DisassociateOptsBuilder is the interface types must satfisfy to be used as Disassociate options
type DisassociateResult ¶
type DisassociateResult struct {
gophercloud.ErrResult
}
DisassociateResult is the response from a Delete operation. Call its Extract method to determine if the call succeeded or failed.
func DisassociateInstance ¶
func DisassociateInstance(client *gophercloud.ServiceClient, serverID string, opts DisassociateOptsBuilder) (r DisassociateResult)
DisassociateInstance decouples an allocated floating IP from an instance
type FloatingIP ¶
type FloatingIP struct { // ID is a unique ID of the Floating IP ID string `json:"id"` // FixedIP is the IP of the instance related to the Floating IP FixedIP string `json:"fixed_ip,omitempty"` // InstanceID is the ID of the instance that is using the Floating IP InstanceID string `json:"instance_id"` // IP is the actual Floating IP IP string `json:"ip"` // Pool is the pool of floating IPs that this floating IP belongs to Pool string `json:"pool"` }
A FloatingIP is an IP that can be associated with an instance
func ExtractFloatingIPs ¶
func ExtractFloatingIPs(r pagination.Page) ([]FloatingIP, error)
ExtractFloatingIPs interprets a page of results as a slice of FloatingIPs.
type FloatingIPPage ¶
type FloatingIPPage struct {
pagination.SinglePageBase
}
FloatingIPPage stores a single, only page of FloatingIPs results from a List call.
func (FloatingIPPage) IsEmpty ¶
func (page FloatingIPPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a FloatingIPsPage is empty.
type FloatingIPResult ¶
type FloatingIPResult struct {
gophercloud.Result
}
FloatingIPResult is the raw result from a FloatingIP request.
func (FloatingIPResult) Extract ¶
func (r FloatingIPResult) Extract() (*FloatingIP, error)
Extract is a method that attempts to interpret any FloatingIP resource response as a FloatingIP struct.
type GetResult ¶
type GetResult struct {
FloatingIPResult
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a FloatingIP.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get returns data about a previously created FloatingIP.