ovnmonitor

package
v0.0.0-...-6b04af2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2017 Politecnico di Torino

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanBounding

func CleanBounding(iface *OvsInterface)

func ParseLogicalRouter

func ParseLogicalRouter(r *LogicalRouter, row libovsdb.Row)

func ParseLogicalRouterPort

func ParseLogicalRouterPort(r *LogicalRouterPort, row libovsdb.Row)

func ParseLogicalSwitch

func ParseLogicalSwitch(s *LogicalSwitch, row libovsdb.Row)

func ParseLogicalSwitchPort

func ParseLogicalSwitchPort(s *LogicalSwitchPort, row libovsdb.Row)

func ParseOvsInterface

func ParseOvsInterface(ovs *OvsInterface, row libovsdb.Row)

func PrintLogicalRouterByName

func PrintLogicalRouterByName(name string, db *OvnDB)

func PrintLogicalRouters

func PrintLogicalRouters(verbose bool, db *OvnDB)

func PrintLogicalSwitchByName

func PrintLogicalSwitchByName(name string, db *OvnDB)

func PrintLogicalSwitches

func PrintLogicalSwitches(verbose bool, db *OvnDB)

func PrintOvnMonitor

func PrintOvnMonitor(verbose bool, db *OvnDB)

func PrintOvsInterfaces

func PrintOvsInterfaces(db *OvnDB)

func ProcessInterface

func ProcessInterface(db *OvnDB, uuid string, row libovsdb.RowUpdate)

func ProcessLogicalRouter

func ProcessLogicalRouter(db *OvnDB, uuid string, row libovsdb.RowUpdate)

func ProcessLogicalRouterPort

func ProcessLogicalRouterPort(db *OvnDB, uuid string, row libovsdb.RowUpdate)

func ProcessLogicalSwitch

func ProcessLogicalSwitch(db *OvnDB, uuid string, row libovsdb.RowUpdate)

func ProcessLogicalSwitchPort

func ProcessLogicalSwitchPort(db *OvnDB, uuid string, row libovsdb.RowUpdate)

func UpdateBounding

func UpdateBounding(ports *map[string]*LogicalSwitchPort, iface *OvsInterface)

func UpdateBoundingPort

func UpdateBoundingPort(ifaces *map[string]*OvsInterface, port *LogicalSwitchPort)

func UpdateDB

func UpdateDB(db *OvnDB, updates libovsdb.TableUpdates)

TODO: Add unregister function

func UpdateRouterPorts

func UpdateRouterPorts(db *OvnDB, r *LogicalRouter, ports interface{})

func UpdateSwitchPorts

func UpdateSwitchPorts(db *OvnDB, sw *LogicalSwitch, ports interface{})

Types

type LogicalRouter

type LogicalRouter struct {
	Name  string
	Ports map[string]*LogicalRouterPort
	// TODO: static routes
	Enabled  bool
	Modified bool // was it modified in the last update?
	// contains filtered or unexported fields
}

A logical router in the NB db

type LogicalRouterPort

type LogicalRouterPort struct {
	Name     string
	Mac      string
	Networks string // TODO: convert to array in the future
	Enabled  bool
	Modified bool // was it modified in the last update?
	// contains filtered or unexported fields
}

A port in a logical router

type LogicalSwitch

type LogicalSwitch struct {
	Name     string // Name of the LogicalSwitch
	Ports    map[string]*LogicalSwitchPort
	Modified bool // was it modified in the last update?
	// contains filtered or unexported fields
}

A logical Switch in the OVN northbound DB, contains only the data that is necessary for our implementation

type LogicalSwitchPort

type LogicalSwitchPort struct {
	Name      string
	IfaceName string // name of the virtual interface in the host. if empty

	Type       string // interface type: "" -> VIF, "router" connected to a router
	RouterPort string // name of the router interface that the switch is connected to

	Modified bool // modified in the last update?
	// contains filtered or unexported fields
}

A logical port in a switch in the OVNnorthbound DB

type MyNotifier

type MyNotifier struct {
	// contains filtered or unexported fields
}

func (MyNotifier) Disconnected

func (n MyNotifier) Disconnected(client *libovsdb.OvsdbClient)

func (MyNotifier) Echo

func (n MyNotifier) Echo([]interface{})

func (MyNotifier) Locked

func (n MyNotifier) Locked([]interface{})

func (MyNotifier) Stolen

func (n MyNotifier) Stolen([]interface{})

func (MyNotifier) Update

func (n MyNotifier) Update(context interface{}, tableUpdates libovsdb.TableUpdates)

type NotificationHandler

type NotificationHandler interface {
	Update(db *OvnDB)
}

type OVNMonitor

type OVNMonitor struct {
	DB OvnDB
	// contains filtered or unexported fields
}

func CreateMonitor

func CreateMonitor() *OVNMonitor

func (*OVNMonitor) Connect

func (o *OVNMonitor) Connect() (db *OvnDB, error bool)

func (*OVNMonitor) Register

func (o *OVNMonitor) Register(handler NotificationHandler)

type OvnDB

type OvnDB struct {
	Switches map[string]*LogicalSwitch // switches indexed by name
	Routers  map[string]*LogicalRouter // routers indexed by name
	// contains filtered or unexported fields
}

type OvsInterface

type OvsInterface struct {
	Name            string // ame of the port: e.g tap0123
	ExternalIdIface string // external id of that interface if set

	LogicalPort *LogicalSwitchPort // point to the port that owns this interface
	// contains filtered or unexported fields
}

An interface in an ovs bridge instance

Jump to

Keyboard shortcuts

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