gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/extensions/floatingip Index | Files

package floatingip

import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/floatingip"

Package floatingip provides the ability to manage floating ips through nova-network

Index

Package Files

doc.go requests.go results.go urls.go

func ExtractFloatingIPs Uses

func ExtractFloatingIPs(page pagination.Page) ([]FloatingIP, error)

ExtractFloatingIPs interprets a page of results as a slice of FloatingIPs.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List returns a Pager that allows you to iterate over a collection of FloatingIPs.

type AssociateOpts Uses

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 (AssociateOpts) ToAssociateMap Uses

func (opts AssociateOpts) ToAssociateMap() (map[string]interface{}, error)

ToAssociateMap constructs a request body from AssociateOpts.

type AssociateResult Uses

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 Uses

func Associate(client *gophercloud.ServiceClient, serverId, fip string) AssociateResult

Associate pairs an allocated floating IP with an instance Deprecated. Use AssociateInstance.

func AssociateInstance Uses

func AssociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) AssociateResult

AssociateInstance pairs an allocated floating IP with an instance.

type CreateOpts Uses

type CreateOpts struct {
    // Pool is the pool of floating IPs to allocate one from
    Pool string
}

CreateOpts specifies a Floating IP allocation request

func (CreateOpts) ToFloatingIPCreateMap Uses

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

ToFloatingIPCreateMap constructs a request body from CreateOpts.

type CreateOptsBuilder Uses

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

CreateOptsBuilder describes struct types that can be accepted by the Create call. Notable, the CreateOpts struct in this package does.

type CreateResult Uses

type CreateResult struct {
    FloatingIPResult
}

CreateResult is the response from a Create operation. Call its Extract method to interpret it as a FloatingIP.

func Create Uses

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult

Create requests the creation of a new floating IP

type DeleteResult Uses

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 Uses

func Delete(client *gophercloud.ServiceClient, id string) DeleteResult

Delete requests the deletion of a previous allocated FloatingIP.

type DisassociateResult Uses

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 Uses

func Disassociate(client *gophercloud.ServiceClient, serverId, fip string) DisassociateResult

Disassociate decouples an allocated floating IP from an instance Deprecated. Use DisassociateInstance.

func DisassociateInstance Uses

func DisassociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) DisassociateResult

DisassociateInstance decouples an allocated floating IP from an instance

type FloatingIP Uses

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 Uses

type FloatingIPResult struct {
    gophercloud.Result
}

func (FloatingIPResult) Extract Uses

func (r FloatingIPResult) Extract() (*FloatingIP, error)

Extract is a method that attempts to interpret any FloatingIP resource response as a FloatingIP struct.

type FloatingIPsPage Uses

type FloatingIPsPage struct {
    pagination.SinglePageBase
}

FloatingIPsPage stores a single, only page of FloatingIPs results from a List call.

func (FloatingIPsPage) IsEmpty Uses

func (page FloatingIPsPage) IsEmpty() (bool, error)

IsEmpty determines whether or not a FloatingIPsPage is empty.

type GetResult Uses

type GetResult struct {
    FloatingIPResult
}

GetResult is the response from a Get operation. Call its Extract method to interpret it as a FloatingIP.

func Get Uses

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 52 packages. Updated 2016-07-23. Refresh now. Tools for package owners.