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

package tenantnetworks

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

Package tenantnetworks provides the ability for tenants to see information about the networks they have access to

Index

Package Files

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

func ExtractNetworks Uses

func ExtractNetworks(page pagination.Page) ([]Network, error)

ExtractNetworks interprets a page of results as a slice of Networks

func List Uses

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

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

type GetResult Uses

type GetResult struct {
    NetworkResult
}

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

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

Get returns data about a previously created Network.

type Network Uses

type Network struct {
    // CIDR is the IPv4 subnet.
    CIDR string `mapstructure:"cidr"`

    // ID is the UUID of the network.
    ID  string `mapstructure:"id"`

    // Name is the common name that the network has.
    Name string `mapstructure:"label"`
}

A Network represents a nova-network that an instance communicates on

type NetworkPage Uses

type NetworkPage struct {
    pagination.SinglePageBase
}

NetworkPage stores a single, only page of Networks results from a List call.

func (NetworkPage) IsEmpty Uses

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

IsEmpty determines whether or not a NetworkPage is empty.

type NetworkResult Uses

type NetworkResult struct {
    gophercloud.Result
}

func (NetworkResult) Extract Uses

func (r NetworkResult) Extract() (*Network, error)

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

Package tenantnetworks imports 3 packages (graph) and is imported by 35 packages. Updated 2017-07-26. Refresh now. Tools for package owners.