floatingip

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2015 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

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

Types

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 Associate

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

Associate 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
}

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

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

type CreateResult struct {
	FloatingIPResult
}

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

func Create

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) DeleteResult

Delete requests the deletion of a previous allocated FloatingIP.

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 Disassociate

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

Disassociate decouples an allocated floating IP from an instance

type FloatingIP

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

func ExtractFloatingIPs

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

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

type FloatingIPResult

type FloatingIPResult struct {
	gophercloud.Result
}

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 FloatingIPsPage

type FloatingIPsPage struct {
	pagination.SinglePageBase
}

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

func (FloatingIPsPage) IsEmpty

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

IsEmpty determines whether or not a FloatingIPsPage is empty.

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) GetResult

Get returns data about a previously created FloatingIP.

Jump to

Keyboard shortcuts

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