external

package
v0.0.0-...-2804b72 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package external provides information and interaction with the external extension for the OpenStack Networking service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	networks.CreateOpts
	External *bool `json:"router:external,omitempty"`
}

CreateOpts is the structure used when creating new external network resources. It embeds networks.CreateOpts and so inherits all of its required and optional fields, with the addition of the External field.

func (CreateOpts) ToNetworkCreateMap

func (opts CreateOpts) ToNetworkCreateMap() (map[string]interface{}, error)

ToNetworkCreateMap casts a CreateOpts struct to a map.

type NetworkExternal

type NetworkExternal struct {
	// UUID for the network
	ID string `json:"id"`

	// Human-readable name for the network. Might not be unique.
	Name string `json:"name"`

	// The administrative state of network. If false (down), the network does not forward packets.
	AdminStateUp bool `json:"admin_state_up"`

	// Indicates whether network is currently operational. Possible values include
	// `ACTIVE', `DOWN', `BUILD', or `ERROR'. Plug-ins might define additional values.
	Status string `json:"status"`

	// Subnets associated with this network.
	Subnets []string `json:"subnets"`

	// Owner of network. Only admin users can specify a tenant_id other than its own.
	TenantID string `json:"tenant_id"`

	// Specifies whether the network resource can be accessed by any tenant or not.
	Shared bool `json:"shared"`

	// Specifies whether the network is an external network or not.
	External bool `json:"router:external"`
}

NetworkExternal represents a decorated form of a Network with based on the "external-net" extension.

func ExtractCreate

func ExtractCreate(r networks.CreateResult) (*NetworkExternal, error)

ExtractCreate decorates a CreateResult struct returned from a networks.Create() function with extended attributes.

func ExtractGet

func ExtractGet(r networks.GetResult) (*NetworkExternal, error)

ExtractGet decorates a GetResult struct returned from a networks.Get() function with extended attributes.

func ExtractList

func ExtractList(r pagination.Page) ([]NetworkExternal, error)

ExtractList accepts a Page struct, specifically a NetworkPage struct, and extracts the elements into a slice of NetworkExternal structs. In other words, a generic collection is mapped into a relevant slice.

func ExtractUpdate

func ExtractUpdate(r networks.UpdateResult) (*NetworkExternal, error)

ExtractUpdate decorates a UpdateResult struct returned from a networks.Update() function with extended attributes.

type UpdateOpts

type UpdateOpts struct {
	networks.UpdateOpts
	External *bool `json:"router:external,omitempty"`
}

UpdateOpts is the structure used when updating existing external network resources. It embeds networks.UpdateOpts and so inherits all of its required and optional fields, with the addition of the External field.

func (UpdateOpts) ToNetworkUpdateMap

func (opts UpdateOpts) ToNetworkUpdateMap() (map[string]interface{}, error)

ToNetworkUpdateMap casts an UpdateOpts struct to a map.

Directories

Path Synopsis
networking_extensions_external_v2
networking_extensions_external_v2

Jump to

Keyboard shortcuts

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