publicips

package
v0.4.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List returns all public IPs.

func ListForServer

func ListForServer(c *gophercloud.ServiceClient, serverID string) pagination.Pager

ListForServer returns all public IPs for the server with the given serverID.

Types

type CreateResult

type CreateResult struct {
	PublicIPResult
}

CreateResult represents the result of a Create operation.

func Create

func Create(c *gophercloud.ServiceClient, serverID string) CreateResult

Create adds a public IP to the server with the given serverID.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult represents the result of a Delete operation.

func Delete

Delete removes the public IP with the given id.

type GetResult

type GetResult struct {
	PublicIPResult
}

GetResult represents the result of a Get operation.

func Get

Get retrieves the public IP with the given id.

type PublicIP

type PublicIP struct {
	// The unique ID of the public IP.
	ID string `mapstructure:"id"`
	// The IPv4 address of the public IP.
	PublicIPv4 string `mapstructure:"public_ip_v4"`
	// The cloud server (node) of the public IP.
	CloudServer struct {
		// The cloud server ID.
		ID string `mapstructure:"id"`
		// The name of the server.
		Name string `mapstructure:"name"`
		// The cloud network for the cloud server.
		CloudNetwork struct {
			// The network ID.
			ID string `mapstructure:"id"`
			// The network name.
			Name string `mapstructure:"name"`
			// The network's private IPv4 address.
			PrivateIPv4 string `mapstructure:"private_ip_v4"`
			// The IP range for the network.
			CIDR string `mapstructure:"cidr"`
			// The datetime the network was created.
			CreatedAt time.Time `mapstructure:"-"`
			// The last datetime the network was updated.
			UpdatedAt time.Time `mapstructure:"-"`
		} `mapstructure:"cloud_network"`
		// The datetime the server was created.
		CreatedAt time.Time `mapstructure:"-"`
		// The datetime the server was last updated.
		UpdatedAt time.Time `mapstructure:"-"`
	} `mapstructure:"cloud_server"`
	// The status of the public IP.
	Status string `mapstructure:"status"`
	// The details of the status of the public IP.
	StatusDetail string `mapstructure:"status_detail"`
	// The time the public IP was created.
	CreatedAt time.Time `mapstructure:"-"`
	// The time the public IP was last updated.
	UpdatedAt time.Time `mapstructure:"-"`
}

PublicIP represents a public IP address.

func ExtractPublicIPs

func ExtractPublicIPs(page pagination.Page) ([]PublicIP, error)

ExtractPublicIPs extracts and returns a slice of PublicIPs. It is used while iterating over a publicips.List call.

type PublicIPPage

type PublicIPPage struct {
	pagination.SinglePageBase
}

PublicIPPage is the page returned by a pager when traversing over a collection of PublicIPs.

func (PublicIPPage) IsEmpty

func (r PublicIPPage) IsEmpty() (bool, error)

IsEmpty returns true if a PublicIPPage contains no PublicIPs.

type PublicIPResult

type PublicIPResult struct {
	gophercloud.Result
}

PublicIPResult represents a result that can be extracted into a PublicIP.

func (PublicIPResult) Extract

func (r PublicIPResult) Extract() (*PublicIP, error)

Extract is a function that extracts a PublicIP from a PublicIPResult.

Jump to

Keyboard shortcuts

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