 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type BridgeOfProbe
- type Event
- type Execute
- type Group
- type OvsOfProbe
- type Probe
- func (o *Probe) OnConnected(monitor *ovsdb.OvsMonitor)
- func (o *Probe) OnDisconnected(monitor *ovsdb.OvsMonitor)
- func (o *Probe) OnOvsBridgeAdd(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsBridgeDel(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsBridgeUpdate(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsInterfaceAdd(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsInterfaceDel(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsInterfaceUpdate(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsPortAdd(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsPortDel(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) OnOvsPortUpdate(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (o *Probe) Start()
- func (o *Probe) Stop()
 
- type RealExecute
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeOfProbe ¶
type BridgeOfProbe struct {
	Host       string               // The global host
	Bridge     string               // The bridge monitored
	UUID       string               // The UUID of the bridge node
	Address    string               // The address of the bridge if different from name
	BridgeNode *graph.Node          // the bridge node on which the rule nodes are attached.
	OvsOfProbe *OvsOfProbe          // Back pointer to the probe
	Rules      map[string][]*Rule   // The set of rules found so far grouped by rawUUID
	Groups     map[uint]*graph.Node // The set of groups found so far
	// contains filtered or unexported fields
}
    BridgeOfProbe is the type of the probe retrieving Openflow rules on a Bridge.
An important notion is the rawUUID of a rule or the UUID obtained by ignoring the priority from the rule filter. Several rules may differ only by their priority (and associated actions). In practice the highest priority hides the other rules. It is important to handle rules with the same rawUUID as a group because ovs-ofctl monitor does not report priorities.
type Event ¶
type Event struct {
	RawRule *Rule   // The rule from the event
	Rules   []*Rule // Rules found by ovs-ofctl matching the event rule filter.
	Date    int64   // the date of the event
	Action  string  // the action taken
	Bridge  string  // The bridge whtere it ocured
}
    Event is an event as monitored by ovs-ofctl monitor <br> watch:
type Execute ¶
type Execute interface {
	ExecCommand(string, ...string) ([]byte, error)
	ExecCommandPipe(context.Context, string, ...string) (io.Reader, error)
}
    Execute exposes an interface to command launch on the OS
type Group ¶ added in v0.21.0
type Group struct {
	ID        uint   // Group id
	GroupType string // Group type
	Contents  string // Anything else (buckets + selection)
	UUID      string // Unique id
}
    Group is an OpenFlow group in a switch
type OvsOfProbe ¶
type OvsOfProbe struct {
	sync.Mutex
	Host         string                    // The host
	Graph        *graph.Graph              // The graph that will receive the rules found
	Root         *graph.Node               // The root node of the host in the graph
	BridgeProbes map[string]*BridgeOfProbe // The table of probes associated to each bridge
	Translation  map[string]string         // A translation table to find the url for a given bridge knowing its name
	Certificate  string                    // Path to the certificate used for authenticated communication with bridges
	PrivateKey   string                    // Path of the private key authenticating the probe.
	CA           string                    // Path of the certicate of the Certificate authority used for authenticated communication with bridges
	// contains filtered or unexported fields
}
    OvsOfProbe is the type of the probe retrieving Openflow rules on an Open Vswitch
func NewOvsOfProbe ¶
NewOvsOfProbe creates a new probe associated to a given graph, root node and host.
func (*OvsOfProbe) NewBridgeProbe ¶
func (o *OvsOfProbe) NewBridgeProbe(host string, bridge string, uuid string, bridgeNode *graph.Node) (*BridgeOfProbe, error)
NewBridgeProbe creates a probe and launch the active process
func (*OvsOfProbe) OnOvsBridgeAdd ¶
func (o *OvsOfProbe) OnOvsBridgeAdd(bridgeNode *graph.Node)
OnOvsBridgeAdd is called when a bridge is added
func (*OvsOfProbe) OnOvsBridgeDel ¶
func (o *OvsOfProbe) OnOvsBridgeDel(uuid string)
OnOvsBridgeDel is called when a bridge is deleted
type Probe ¶ added in v0.21.0
type Probe struct {
	sync.Mutex
	Graph      *graph.Graph
	Root       *graph.Node
	OvsMon     *ovsdb.OvsMonitor
	OvsOfProbe *OvsOfProbe
	// contains filtered or unexported fields
}
    Probe describes a probe that reads OVS database and updates the graph
func NewProbe ¶ added in v0.21.0
NewProbe creates a new graph OVS database probe
func NewProbeFromConfig ¶ added in v0.21.0
NewProbeFromConfig creates a new probe based on configuration
func (*Probe) OnConnected ¶ added in v0.21.0
func (o *Probe) OnConnected(monitor *ovsdb.OvsMonitor)
OnConnected event
func (*Probe) OnDisconnected ¶ added in v0.21.0
func (o *Probe) OnDisconnected(monitor *ovsdb.OvsMonitor)
OnDisconnected event
func (*Probe) OnOvsBridgeAdd ¶ added in v0.21.0
OnOvsBridgeAdd event
func (*Probe) OnOvsBridgeDel ¶ added in v0.21.0
OnOvsBridgeDel event
func (*Probe) OnOvsBridgeUpdate ¶ added in v0.21.0
OnOvsBridgeUpdate event
func (*Probe) OnOvsInterfaceAdd ¶ added in v0.21.0
OnOvsInterfaceAdd event
func (*Probe) OnOvsInterfaceDel ¶ added in v0.21.0
OnOvsInterfaceDel event
func (*Probe) OnOvsInterfaceUpdate ¶ added in v0.21.0
func (o *Probe) OnOvsInterfaceUpdate(monitor *ovsdb.OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsInterfaceUpdate event
func (*Probe) OnOvsPortAdd ¶ added in v0.21.0
OnOvsPortAdd event
func (*Probe) OnOvsPortDel ¶ added in v0.21.0
OnOvsPortDel event
func (*Probe) OnOvsPortUpdate ¶ added in v0.21.0
OnOvsPortUpdate event
type RealExecute ¶
type RealExecute struct{}
    RealExecute is the actual implementation given below. It can be overridden for tests.
type Rule ¶
type Rule struct {
	Cookie   uint64 // cookie value of the rule
	Table    int    // table containing the rule
	Priority int    // priority of rule
	Filter   string // all the filters as a comma separated string
	Actions  string // all the actions (comma separated)
	InPort   int    // -1 is any
	UUID     string // Unique id
}
    Rule is an OpenFlow rule in a switch
       Source Files
      ¶
      Source Files
      ¶
    
- ovs_of.go
- ovsdb.go