import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/floatingip"
Package floatingip provides the ability to manage floating ips through nova-network
doc.go requests.go results.go urls.go
func ExtractFloatingIPs(page pagination.Page) ([]FloatingIP, error)
ExtractFloatingIPs interprets a page of results as a slice of FloatingIPs.
func List(client *gophercloud.ServiceClient) pagination.Pager
List returns a Pager that allows you to iterate over a collection of FloatingIPs.
type AssociateOpts struct { // ServerID is the UUID of the server ServerID string // FixedIP is an optional fixed IP address of the server FixedIP string // FloatingIP is the floating IP to associate with an instance FloatingIP string }
AssociateOpts specifies the required information to associate or disassociate a floating IP to an instance
func (opts AssociateOpts) ToAssociateMap() (map[string]interface{}, error)
ToAssociateMap constructs a request body from AssociateOpts.
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 Associate(client *gophercloud.ServiceClient, serverId, fip string) AssociateResult
Associate pairs an allocated floating IP with an instance Deprecated. Use AssociateInstance.
func AssociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) AssociateResult
AssociateInstance pairs an allocated floating IP with an instance.
CreateOpts specifies a Floating IP allocation request
func (opts CreateOpts) ToFloatingIPCreateMap() (map[string]interface{}, error)
ToFloatingIPCreateMap constructs a request body from CreateOpts.
CreateOptsBuilder describes struct types that can be accepted by the Create call. Notable, the CreateOpts struct in this package does.
type CreateResult struct { FloatingIPResult }
CreateResult is the response from a Create operation. Call its Extract method to interpret it as a FloatingIP.
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult
Create requests the creation of a new floating IP
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(client *gophercloud.ServiceClient, id string) DeleteResult
Delete requests the deletion of a previous allocated FloatingIP.
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 Disassociate(client *gophercloud.ServiceClient, serverId, fip string) DisassociateResult
Disassociate decouples an allocated floating IP from an instance Deprecated. Use DisassociateInstance.
func DisassociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) DisassociateResult
DisassociateInstance decouples an allocated floating IP from an instance
type FloatingIP struct { // ID is a unique ID of the Floating IP ID string `mapstructure:"id"` // FixedIP is the IP of the instance related to the Floating IP FixedIP string `mapstructure:"fixed_ip,omitempty"` // InstanceID is the ID of the instance that is using the Floating IP InstanceID string `mapstructure:"instance_id"` // IP is the actual Floating IP IP string `mapstructure:"ip"` // Pool is the pool of floating IPs that this floating IP belongs to Pool string `mapstructure:"pool"` }
A FloatingIP is an IP that can be associated with an instance
type FloatingIPResult struct { gophercloud.Result }
func (r FloatingIPResult) Extract() (*FloatingIP, error)
Extract is a method that attempts to interpret any FloatingIP resource response as a FloatingIP struct.
type FloatingIPsPage struct { pagination.SinglePageBase }
FloatingIPsPage stores a single, only page of FloatingIPs results from a List call.
func (page FloatingIPsPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a FloatingIPsPage is empty.
type GetResult struct { FloatingIPResult }
GetResult is the response from a Get operation. Call its Extract method to interpret it as a FloatingIP.
func Get(client *gophercloud.ServiceClient, id string) GetResult
Get returns data about a previously created FloatingIP.
Package floatingip imports 4 packages (graph) and is imported by 127 packages. Updated 2016-07-23. Refresh now. Tools for package owners.