networks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package network provides the ability to manage nova-networks

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 {
	// The Bridge that VIFs on this network are connected to
	Bridge string `mapstructure:"bridge"`

	// BridgeInterface is what interface is connected to the Bridge
	BridgeInterface string `mapstructure:"bridge_interface"`

	// The Broadcast address of the network.
	Broadcast string `mapstructure:"broadcast"`

	// CIDR is the IPv4 subnet.
	CIDR string `mapstructure:"cidr"`

	// CIDRv6 is the IPv6 subnet.
	CIDRv6 string `mapstructure:"cidr_v6"`

	// CreatedAt is when the network was created..
	CreatedAt time.Time `mapstructure:"-"`

	// Deleted shows if the network has been deleted.
	Deleted bool `mapstructure:"deleted"`

	// DeletedAt is the time when the network was deleted.
	DeletedAt time.Time `mapstructure:"-"`

	// DHCPStart is the start of the DHCP address range.
	DHCPStart string `mapstructure:"dhcp_start"`

	// DNS1 is the first DNS server to use through DHCP.
	DNS1 string `mapstructure:"dns_1"`

	// DNS2 is the first DNS server to use through DHCP.
	DNS2 string `mapstructure:"dns_2"`

	// Gateway is the network gateway.
	Gateway string `mapstructure:"gateway"`

	// Gatewayv6 is the IPv6 network gateway.
	Gatewayv6 string `mapstructure:"gateway_v6"`

	// Host is the host that the network service is running on.
	Host string `mapstructure:"host"`

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

	// Injected determines if network information is injected into the host.
	Injected bool `mapstructure:"injected"`

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

	// MultiHost is if multi-host networking is enablec..
	MultiHost bool `mapstructure:"multi_host"`

	// Netmask is the network netmask.
	Netmask string `mapstructure:"netmask"`

	// Netmaskv6 is the IPv6 netmask.
	Netmaskv6 string `mapstructure:"netmask_v6"`

	// Priority is the network interface priority.
	Priority int `mapstructure:"priority"`

	// ProjectID is the project associated with this network.
	ProjectID string `mapstructure:"project_id"`

	// RXTXBase configures bandwidth entitlement.
	RXTXBase int `mapstructure:"rxtx_base"`

	// UpdatedAt is the time when the network was last updated.
	UpdatedAt time.Time `mapstructure:"-"`

	// VLAN is the vlan this network runs on.
	VLAN int `mapstructure:"vlan"`

	// VPNPrivateAddress is the private address of the CloudPipe VPN.
	VPNPrivateAddress string `mapstructure:"vpn_private_address"`

	// VPNPublicAddress is the public address of the CloudPipe VPN.
	VPNPublicAddress string `mapstructure:"vpn_public_address"`

	// VPNPublicPort is the port of the CloudPipe VPN.
	VPNPublicPort int `mapstructure:"vpn_public_port"`
}

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