gophercloud: github.com/rackspace/gophercloud/rackspace/compute/v2/virtualinterfaces Index | Files

package virtualinterfaces

import "github.com/rackspace/gophercloud/rackspace/compute/v2/virtualinterfaces"

Index

Package Files

requests.go results.go urls.go

func ExtractVirtualInterfaces Uses

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.

func List Uses

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.

type CreateResult Uses

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

CreateResult represents the result of a create operation.

func Create Uses

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 Uses

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

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

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete Uses

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

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

type IPAddress Uses

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 Uses

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.

type VirtualInterfacePage Uses

type VirtualInterfacePage struct {
    pagination.SinglePageBase
}

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

func (VirtualInterfacePage) IsEmpty Uses

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

IsEmpty returns true if the NetworkPage contains no Networks.

Package virtualinterfaces imports 3 packages (graph). Updated 2016-07-17. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).