tenantnetworks

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: 3 Imported by: 0

Documentation

Overview

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

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 Network.

Types

type GetResult

type GetResult struct {
	NetworkResult
}

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

func Get

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

Get returns data about a previously created Network.

type Network

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

func ExtractNetworks

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

ExtractNetworks interprets a page of results as a slice of Networks

type NetworkPage

type NetworkPage struct {
	pagination.SinglePageBase
}

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

func (NetworkPage) IsEmpty

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

IsEmpty determines whether or not a NetworkPage is empty.

type NetworkResult

type NetworkResult struct {
	gophercloud.Result
}

func (NetworkResult) Extract

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

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

Jump to

Keyboard shortcuts

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