gophercloud: Index | Files

package external

import ""

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


Package Files

doc.go requests.go results.go

func ExtractList Uses

func ExtractList(page 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.

type AdminState Uses

type AdminState *bool

AdminState gives users a solid type to work with for create and update operations. It is recommended that users use the `Up` and `Down` enums.

var (
    Up   AdminState = &iTrue
    Down AdminState = &iFalse

Convenience vars for AdminStateUp values.

type CreateOpts Uses

type CreateOpts struct {
    Parent   networks.CreateOpts
    External bool

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 Uses

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

ToNetworkCreateMap casts a CreateOpts struct to a map.

type NetworkExternal Uses

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

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

    // The administrative state of network. If false (down), the network does not forward packets.
    AdminStateUp bool `mapstructure:"admin_state_up" 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 `mapstructure:"status" json:"status"`

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

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

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

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

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

func ExtractCreate Uses

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

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

func ExtractGet Uses

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

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

func ExtractUpdate Uses

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

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

type UpdateOpts Uses

type UpdateOpts struct {
    Parent   networks.UpdateOpts
    External bool

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 Uses

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

ToNetworkUpdateMap casts an UpdateOpts struct to a map.

Package external imports 4 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).