network

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NETWORKS_LIST_TIMEOUT = 200
)

Variables

This section is empty.

Functions

func GetNames

func GetNames(cn base.Connection, dataCenter string) ([]string, error)

func IDByName

func IDByName(cn base.Connection, dataCenter string, name string) (string, error)

Types

type CreateReq

type CreateReq struct {
	DataCenter string `json:"-" valid:"required" URIParam:"yes"`
}

type Entity

type Entity struct {
	Id          string
	Cidr        string
	Description string
	Gateway     string
	Name        string
	Netmask     string
	Type        string
	Vlan        int64
	Links       []models.LinkEntity
}

func Load

func Load(cn base.Connection, dataCenter string) ([]Entity, error)

type GetReq

type GetReq struct {
	Network     `argument:"composed" URIParam:"NetworkId,DataCenter" json:"-"`
	IpAddresses string `URIParam:"yes" oneOf:"none,claimed,free,all"`
}

func (*GetReq) Validate

func (g *GetReq) Validate() error

type IpAddress

type IpAddress struct {
	Address string
	Claimed bool
	Server  string
	Type    string
}

type ListIpAddresses

type ListIpAddresses struct {
	Network `argument:"composed" URIParam:"NetworkId,DataCenter" json:"-"`
	Type    string `URIParam:"yes" oneOf:"claimed,free,all,optional"`
}

type ListReq

type ListReq struct {
	DataCenter string `valid:"required" URIParam:"yes"`
}

type Network

type Network struct {
	NetworkId   string
	NetworkName string
	DataCenter  string
}

func (*Network) GetNames

func (n *Network) GetNames(cn base.Connection, property string) ([]string, error)

func (*Network) InferID

func (n *Network) InferID(cn base.Connection) error

func (*Network) Validate

func (n *Network) Validate() error

type ReleaseReq

type ReleaseReq struct {
	Network `argument:"composed" URIParam:"NetworkId,DataCenter" json:"-"`
}

type UpdateReq

type UpdateReq struct {
	Network     `argument:"composed" URIParam:"NetworkId,DataCenter" json:"-"`
	Name        string `valid:"required"`
	Description string `valid:"required"`
}

Jump to

Keyboard shortcuts

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