types

package
v0.0.0-...-e3213c9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	Name                 string  `json:"name"`
	TenantID             string  `json:"tenantId"`
	ID                   *UUID   `json:"id,omitempty"`
	MacPortTemplate      string  `json:"macPortTemplate,omitempty"`
	VlanMacPortTemplate  string  `json:"vlanMacPortTemplate,omitempty"`
	VlanMacTableTemplate string  `json:"vlanMacTableTemplate,omitempty"`
	AdminStateUp         bool    `json:"adminStateUp,omitempty"`
	InboundFilterID      *UUID   `json:"inboundFilterId,omitempty"`
	InboundMirrorIDs     []*UUID `json:"inboundMirrorIds,omitempty"`
	OutboundFilterID     *UUID   `json:"outboundFilterId,omitempty"`
	OutboundMirrorIDs    []*UUID `json:"outboundMirrorIds,omitempty"`
	VxlanPortIds         []*UUID `json:"vxlanPortIds,omitempty"`
}

Bridge 网桥

type BridgePort

type BridgePort struct {
	Port
	VlanID *UUID `json:"vlanId"`
}

BridgePort 网桥端口

type Chain

type Chain struct {
	ID       *UUID  `json:"id,omitempty"`
	Name     string `json:"name"`
	TenantID string `json:"tenantId"`
}

Chain 链路

type HostInterfacePort

type HostInterfacePort struct {
	HostID        *UUID  `json:"hostId"`
	InterfaceName string `json:"interfaceName"`
	PortID        *UUID  `json:"portId"`
}

HostInterfacePort binding allows mapping a virtual network port to an interface (virtual or physical) of a physical host where Midolman is running.

type KeystoneConf

type KeystoneConf struct {
	URL   string `json:"url"`
	Token string `json:"token"`
}

KeystoneConf keystone_conf

type MidoNetAPIConf

type MidoNetAPIConf struct {
	URL              string       `json:"url"`
	UserName         string       `json:"user_name"`
	PassWord         string       `json:"password"`
	ProjectID        string       `json:"project_id"`
	ProviderRouterID string       `json:"provider_router_id"`
	Version          int          `json:"version"`
	KeystoneConf     KeystoneConf `json:"keystone_conf"`
}

MidoNetAPIConf 配置

type MinMax

type MinMax struct {
	Start int `json:"start,omitempty"`
	End   int `json:"end,omitempty"`
}

MinMax 范围

type NatTarget

type NatTarget struct {
	AddressTo   string `json:"addressTo"`
	AddressFrom string `json:"addressFrom"`
	PortTo      int    `json:"portTo"`
	PortFrom    int    `json:"portFrom"`
}

NatTarget 配置

type Port

type Port struct {
	ID                *UUID   `json:"id,omitempty"`
	Type              string  `json:"type"`
	AdminStateUp      bool    `json:"adminStateUp,omitempty"`
	InboundFilterID   *UUID   `json:"inboundFilterId,omitempty"`
	InboundMirrorIDs  []*UUID `json:"inboundMirrorIds,omitempty"`
	OutboundFilterID  *UUID   `json:"outboundFilterId,omitempty"`
	OutboundMirrorIDs []*UUID `json:"outboundMirrorIds,omitempty"`
	InsertionIDs      []*UUID `json:"insertionIds,omitempty"`
	DeviceID          *UUID   `json:"deviceId,omitempty"`
	InterfaceName     string  `json:"interfaceName,omitempty"`
	HostID            *UUID   `json:"hostId,omitempty"`
	PeerID            *UUID   `json:"peerId,omitempty"`
	TunnelKey         int     `json:"tunnelKey,omitempty"`
	VifID             *UUID   `json:"vifId,omitempty"`
}

Port 通信端口

type PortLink struct {
	PortID *UUID `json:"portId,omitempty"`
	PeerID *UUID `json:"peerId"`
}

PortLink 端口连接

type Route

type Route struct {
	ID               *UUID  `json:"id,omitempty"`
	DstNetworkAddr   string `json:"dstNetworkAddr"`
	DstNetworkLength int    `json:"dstNetworkLength"`
	NextHopGateway   string `json:"nextHopGateway,omitempty"`
	NextHopPort      *UUID  `json:"nextHopPort"`
	SrcNetworkAddr   string `json:"srcNetworkAddr"`
	SrcNetworkLength int    `json:"srcNetworkLength"`
	Type             string `json:"type"`
	Weight           int    `json:"weight"`
	Learned          bool   `json:"learned,omitempty"`
	RouterID         *UUID  `json:"routerId"`
}

Route 路由

type Router

type Router struct {
	ID                *UUID   `json:"id,omitempty"`
	AdminStateUp      bool    `json:"adminStateUp,omitempty"`
	InboundFilterID   *UUID   `json:"inboundFilterId,omitempty"`
	InboundMirrorIDs  []*UUID `json:"inboundMirrorIds,omitempty"`
	OutboundFilterID  *UUID   `json:"outboundFilterId,omitempty"`
	OutboundMirrorIDs []*UUID `json:"outboundMirrorIds,omitempty"`
	AsNumber          int     `json:"asNumber,omitempty"`
	LoadBalancerID    *UUID   `json:"loadBalancerId,omitempty"`
	Name              string  `json:"name"`
	TenantID          string  `json:"tenantId"`
}

Router 路由器

type RouterPort

type RouterPort struct {
	Port
	NetworkAddress string `json:"networkAddress"`
	NetworkLength  int    `json:"networkLength"`
	PortAddress    string `json:"portAddress"`
	PortMac        string `json:"portMac,omitempty"`
	BgpStatus      string `json:"bgpStatus,omitempty"`
}

RouterPort 路由器端口

type Rule

type Rule struct {
	ID                 *UUID       `json:"id,omitempty"`
	Type               string      `json:"type"`
	CondInvert         bool        `json:"condInvert,omitempty"`
	DlDst              string      `json:"dlDst,omitempty"`
	DlSrc              string      `json:"dlSrc,omitempty"`
	DlDstMask          string      `json:"dlDstMask,omitempty"`
	DlSrcMask          string      `json:"dlSrcMask,omitempty"`
	DlType             int         `json:"dlType,omitempty"`
	FlowAction         string      `json:"flowAction,omitempty"`
	FragmentPolicy     string      `json:"fragmentPolicy,omitempty"`
	InPorts            []*UUID     `json:"inPorts,omitempty"`
	IPAddrGroupDst     *UUID       `json:"ipAddrGroupDst,omitempty"`
	IPAddrGroupSrc     *UUID       `json:"ipAddrGroupSrc,omitempty"`
	InvDlDst           bool        `json:"invDlDst,omitempty"`
	InvDlSrc           bool        `json:"invDlSrc,omitempty"`
	InvDlType          bool        `json:"invDlType,omitempty"`
	InvInPorts         bool        `json:"invInPorts,omitempty"`
	InvIPAddrGroupDst  bool        `json:"invIpAddrGroupDst,omitempty"`
	InvIPAddrGroupSrc  bool        `json:"invIpAddrGroupSrc,omitempty"`
	InvNwDst           bool        `json:"invNwDst,omitempty"`
	InvNwProto         bool        `json:"invNwProto,omitempty"`
	InvNwSrc           bool        `json:"invNwSrc,omitempty"`
	InvNwTos           bool        `json:"invNwTos,omitempty"`
	InvOutPorts        bool        `json:"invOutPorts,omitempty"`
	InvPortGroup       bool        `json:"invPortGroup,omitempty"`
	InvTpDst           bool        `json:"invTpDst,omitempty"`
	InvTpSrc           bool        `json:"invTpSrc,omitempty"`
	InvTraversedDevice bool        `json:"invTraversedDevice,omitempty"`
	MatchForwardFlow   bool        `json:"matchForwardFlow,omitempty"`
	MatchReturnFlow    bool        `json:"matchReturnFlow,omitempty"`
	NoVlan             bool        `json:"noVlan,omitempty"`
	NwDstAddress       string      `json:"nwDstAddress,omitempty"`
	NwDstLength        int         `json:"nwDstLength,omitempty"`
	NwProto            int         `json:"nwProto,omitempty"`
	NwSrcAddress       string      `json:"nwSrcAddress,omitempty"`
	NwSrcLength        int         `json:"nwSrcLength,omitempty"`
	NwTos              int         `json:"nwTos,omitempty"`
	OutPorts           []*UUID     `json:"outPorts,omitempty"`
	Position           int         `json:"position,omitempty"`
	PortGroup          *UUID       `json:"portGroup,omitempty"`
	TpDst              *MinMax     `json:"tpDst,omitempty"`
	TpSrc              *MinMax     `json:"tpSrc,omitempty"`
	TraversedDevice    *UUID       `json:"traversedDevice,omitempty"`
	Vlan               bool        `json:"vlan,omitempty"`
	Action             string      `json:"action,omitempty"`
	ChainID            *UUID       `json:"chainId,omitempty"`
	NatTargets         []NatTarget `json:"natTargets"`
}

Rule 规则

type Tenant

type Tenant struct {
	Name        string `json:"name"`
	Enabled     bool   `json:"enabled"`
	ID          string `json:"id"`
	Description string `json:"description"`
}

Tenant 租户

type Token

type Token struct {
	Key     string `json:"key,omitempty"`
	Expires string `json:"expires,omitempty"`
}

Token 身份令牌

type UUID

type UUID struct {
	UuID uuid.Uuid
}

UUID midonet id

func CreateUUID

func CreateUUID() *UUID

CreateUUID 创建uuid

func String2UUID

func String2UUID(data string) (*UUID, error)

String2UUID string 转 uuid

func (*UUID) MarshalJSON

func (u *UUID) MarshalJSON() (data []byte, err error)

MarshalJSON 解析成json串

func (*UUID) String

func (u *UUID) String() string

func (*UUID) UnmarshalJSON

func (u *UUID) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON 解析json

type VxlanPort

type VxlanPort struct {
	Port
	VtepID *UUID `json:"vtepId"`
}

VxlanPort 扩展端口

Jump to

Keyboard shortcuts

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