Documentation
¶
Index ¶
- Constants
- func SetCallBack(callback OVNSignal)
- type ACL
- type AddressSet
- type Execution
- type LoadBalancer
- type LogcalPort
- type LogicalSwitch
- type OVNDB
- func (odb *OVNDB) ACLAdd(lsw, direct, match, action string, priority int, ...) *OvnCommand
- func (odb *OVNDB) ACLDel(lsw, direct, match string, priority int, external_ids map[string]string) *OvnCommand
- func (odb *OVNDB) ASAdd(name string, addrs []string, external_ids map[string]string) *OvnCommand
- func (odb *OVNDB) ASDel(name string) *OvnCommand
- func (odb *OVNDB) ASUpdate(name string, addrs []string, external_ids map[string]string) *OvnCommand
- func (odb *OVNDB) Execute(cmds ...*OvnCommand) error
- func (odb *OVNDB) GetACLsBySwitch(lsw string) []*ACL
- func (odb *OVNDB) GetASByName(name string) *AddressSet
- func (odb *OVNDB) GetAddressSets() []*AddressSet
- func (odb *OVNDB) GetLB(name string) []*LoadBalancer
- func (odb *OVNDB) GetLogicPortsBySwitch(lsw string) []*LogcalPort
- func (odb *OVNDB) GetLogicSwitches() []*LogicalSwitch
- func (odb *OVNDB) LBAdd(name string, vipPort string, protocol string, addrs []string) *OvnCommand
- func (odb *OVNDB) LBDel(name string) *OvnCommand
- func (odb *OVNDB) LBUpdate(name string, vipPort string, protocol string, addrs []string) *OvnCommand
- func (odb *OVNDB) LSPAdd(lsw string, lsp string) *OvnCommand
- func (odb *OVNDB) LSPDel(lsp string) *OvnCommand
- func (odb *OVNDB) LSPSetAddress(lsp string, addresses ...string) *OvnCommand
- func (odb *OVNDB) LSPSetPortSecurity(lsp string, security ...string) *OvnCommand
- func (odb *OVNDB) LSSetOpt(lsp string, options map[string]string) *OvnCommand
- func (odb *OVNDB) LSWAdd(lsw string) *OvnCommand
- func (odb *OVNDB) LSWDel(lsw string) *OvnCommand
- func (odb *OVNDB) LSWList() *OvnCommand
- func (odb *OVNDB) SetCallBack(callback OVNSignal)
- type OVNDBApi
- type OVNNotifier
- type OVNRow
- type OVNSignal
- type OvnCommand
Constants ¶
View Source
const ( LSWITCH string = "Logical_Switch" LPORT string = "Logical_Switch_Port" ACLS string = "ACL" LB string = "Load_Balancer" Address_Set string = "Address_Set" )
View Source
const ( UNIX string = "unix" TCP string = "tcp" )
View Source
const (
//random seed.
MAX_TRANSACTION = 1000
)
View Source
const (
NBDB string = "OVN_Northbound"
)
View Source
const (
OVNLOGLEVEL = 4
)
Variables ¶
This section is empty.
Functions ¶
func SetCallBack ¶
func SetCallBack(callback OVNSignal)
Types ¶
type AddressSet ¶
type Execution ¶
type Execution interface {
//Excute multi-commands
Execute(cmds ...*OvnCommand) error
}
type LoadBalancer ¶
type LogcalPort ¶
type LogicalSwitch ¶
type OVNDB ¶
type OVNDB struct {
// contains filtered or unexported fields
}
func (*OVNDB) ASDel ¶
func (odb *OVNDB) ASDel(name string) *OvnCommand
func (*OVNDB) Execute ¶
func (odb *OVNDB) Execute(cmds ...*OvnCommand) error
func (*OVNDB) GetACLsBySwitch ¶
func (*OVNDB) GetASByName ¶
func (odb *OVNDB) GetASByName(name string) *AddressSet
func (*OVNDB) GetAddressSets ¶
func (odb *OVNDB) GetAddressSets() []*AddressSet
func (*OVNDB) GetLB ¶
func (odb *OVNDB) GetLB(name string) []*LoadBalancer
func (*OVNDB) GetLogicPortsBySwitch ¶
func (odb *OVNDB) GetLogicPortsBySwitch(lsw string) []*LogcalPort
func (*OVNDB) GetLogicSwitches ¶
func (odb *OVNDB) GetLogicSwitches() []*LogicalSwitch
func (*OVNDB) LBDel ¶
func (odb *OVNDB) LBDel(name string) *OvnCommand
func (*OVNDB) LSPDel ¶
func (odb *OVNDB) LSPDel(lsp string) *OvnCommand
func (*OVNDB) LSPSetAddress ¶
func (odb *OVNDB) LSPSetAddress(lsp string, addresses ...string) *OvnCommand
func (*OVNDB) LSPSetPortSecurity ¶
func (odb *OVNDB) LSPSetPortSecurity(lsp string, security ...string) *OvnCommand
func (*OVNDB) LSSetOpt ¶
func (odb *OVNDB) LSSetOpt(lsp string, options map[string]string) *OvnCommand
func (*OVNDB) LSWAdd ¶
func (odb *OVNDB) LSWAdd(lsw string) *OvnCommand
func (*OVNDB) LSWDel ¶
func (odb *OVNDB) LSWDel(lsw string) *OvnCommand
func (*OVNDB) LSWList ¶
func (odb *OVNDB) LSWList() *OvnCommand
func (*OVNDB) SetCallBack ¶
type OVNDBApi ¶
type OVNDBApi interface {
// Create a logical switch named SWITCH
LSWAdd(lsw string) *OvnCommand
//delete SWITCH and all its ports
LSWDel(lsw string) *OvnCommand
// Print the names of all logical switches
LSWList() *OvnCommand
// Add logical port PORT on SWITCH
LSPAdd(lsw, lsp string) *OvnCommand
// Delete PORT from its attached switch
LSPDel(lsp string) *OvnCommand
// Set addressset per lport
LSPSetAddress(lsp string, addresses ...string) *OvnCommand
// Set port security per lport
LSPSetPortSecurity(lsp string, security ...string) *OvnCommand
// Add ACL
ACLAdd(lsw, direct, match, action string, priority int, external_ids map[string]string, logflag bool, meter string) *OvnCommand
// Delete acl
ACLDel(lsw, direct, match string, priority int, external_ids map[string]string) *OvnCommand
// Update address set
ASUpdate(name string, addrs []string, external_ids map[string]string) *OvnCommand
// Add addressset
ASAdd(name string, addrs []string, external_ids map[string]string) *OvnCommand
// Delete addressset
ASDel(name string) *OvnCommand
// Add LB
LBAdd(name string, vipPort string, protocol string, addrs []string) *OvnCommand
// Delete LB with given name
LBDel(name string) *OvnCommand
// Update existing LB
LBUpdate(name string, vipPort string, protocol string, addrs []string) *OvnCommand
// Set options in lswtich
LSSetOpt(lsp string, options map[string]string) *OvnCommand
// Exec command, support mul-commands in one transaction.
Execute(cmds ...*OvnCommand) error
// Get all logical switches
GetLogicSwitches() []*LogicalSwitch
// Get all lport by lswitch
GetLogicPortsBySwitch(lsw string) []*LogcalPort
// Get all acl by lswitch
GetACLsBySwitch(lsw string) []*ACL
GetAddressSets() []*AddressSet
GetASByName(name string) *AddressSet
// Get LB with given name
GetLB(name string) []*LoadBalancer
SetCallBack(callback OVNSignal)
}
North bound api set
type OVNNotifier ¶
type OVNNotifier interface {
Update(context interface{}, tableUpdates libovsdb.TableUpdates)
Locked([]interface{})
Stolen([]interface{})
Echo([]interface{})
Disconnected(client *libovsdb.OvsdbClient)
}
Notifier
type OVNSignal ¶
type OVNSignal interface {
OnLogicalSwitchCreate(ls *LogicalSwitch)
OnLogicalSwitchDelete(ls *LogicalSwitch)
OnLogicalPortCreate(lp *LogcalPort)
OnLogicalPortDelete(lp *LogcalPort)
OnACLCreate(acl *ACL)
OnACLDelete(acl *ACL)
}
type OvnCommand ¶
type OvnCommand struct {
Operations []libovsdb.Operation
Exe Execution
Results [][]map[string]interface{}
}
func (*OvnCommand) Execute ¶
func (ocmd *OvnCommand) Execute() error
Click to show internal directories.
Click to hide internal directories.