virtualinterfaces

package
v0.3.0-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(c *gophercloud.ServiceClient, instanceID string) pagination.Pager

List returns a Pager which allows you to iterate over a collection of networks. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.

Types

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents the result of a create operation.

func Create

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

Create creates a new virtual interface for a network and attaches the network to the server instance.

func (CreateResult) Extract

func (r CreateResult) Extract() (*VirtualInterface, error)

Extract is a function that accepts a result and extracts a network resource.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete

func Delete(c *gophercloud.ServiceClient, instanceID, interfaceID string) DeleteResult

Delete deletes the interface with interfaceID attached to the instance with instanceID.

type IPAddress

type IPAddress struct {
	Address      string `mapstructure:"address" json:"address"`
	NetworkID    string `mapstructure:"network_id" json:"network_id"`
	NetworkLabel string `mapstructure:"network_label" json:"network_label"`
}

IPAddress represents a vitual address attached to a VirtualInterface.

type VirtualInterface

type VirtualInterface struct {
	// UUID for the virtual interface
	ID string `mapstructure:"id" json:"id"`

	MACAddress string `mapstructure:"mac_address" json:"mac_address"`

	IPAddresses []IPAddress `mapstructure:"ip_addresses" json:"ip_addresses"`
}

VirtualInterface represents a virtual interface.

func ExtractVirtualInterfaces

func ExtractVirtualInterfaces(page pagination.Page) ([]VirtualInterface, error)

ExtractVirtualInterfaces accepts a Page struct, specifically a VirtualInterfacePage struct, and extracts the elements into a slice of VirtualInterface structs. In other words, a generic collection is mapped into a relevant slice.

type VirtualInterfacePage

type VirtualInterfacePage struct {
	pagination.SinglePageBase
}

VirtualInterfacePage is the page returned by a pager when traversing over a collection of virtual interfaces.

func (VirtualInterfacePage) IsEmpty

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

IsEmpty returns true if the NetworkPage contains no Networks.

Jump to

Keyboard shortcuts

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