Documentation ¶
Index ¶
- Constants
- func OverwriteObjectCacheWithJSON(cache *ObjectCache, jsonConfig map[string]interface{})
- type Client
- func (o *Client) MonitorAll()
- func (o *Client) RestartSystem() error
- func (o *Client) SetInterface(interf *Interface) error
- func (o *Client) SetOpenFlowController(controller *OpenFlowController) error
- func (o *Client) SetSystem(system *System) error
- func (o *Client) StartClient(privateKeyPath, publicKeyPath, caPath string)
- func (o *Client) StartSystem() error
- func (o *Client) StopClient()
- func (o *Client) StopMonitoring()
- func (o *Client) StopSystem() error
- func (o *Client) String() string
- func (o *Client) SyncChangesToRemote(prev, new *ObjectCache) error
- type Config
- func (c *Config) DeleteObjectCacheEntry(tableName, uuid string) error
- func (c *Config) DumpObjectCache()
- func (c *Config) DumpRawCache()
- func (c *Config) InitializeCache(updates *libovsdb.TableUpdates)
- func (c *Config) OverwriteCallback(callback ConfigCallback)
- func (c *Config) OverwriteObjectCache(cache *ObjectCache)
- func (c *Config) SyncCache(updates *libovsdb.TableUpdates)
- func (c *Config) UpdateObjectCacheEntry(tableName, uuid string, row libovsdb.Row) error
- type ConfigCallback
- type Interface
- type InterfaceStatistics
- type Notifier
- type ObjectCache
- type OpenFlowController
- type OpenFlowControllerTarget
- type System
- type SystemBroker
- func (s *SystemBroker) GNMIConfigChangeCallback(new ygot.ValidatedGoStruct) error
- func (s *SystemBroker) GNMIConfigSetupCallback(new ygot.ValidatedGoStruct) error
- func (s *SystemBroker) GNOIRebootCallback() error
- func (s *SystemBroker) GNOIRotateCertificatesCallback(certID string) error
- func (s *SystemBroker) GenerateConfig(config *Config) ([]byte, error)
- func (s *SystemBroker) OVSConfigChangeCallback(ovsConfig *Config) error
- func (s *SystemBroker) RegisterWatchdogChannels(startOVSClientChan, startGNXIServiceChan, stopOVSClientChan, ... chan bool)
Constants ¶
View Source
const ( DefaultDatabase = "Open_vSwitch" SystemTable = "Open_vSwitch" ControllerTable = "Controller" InterfaceTable = "Interface" StartOVS = "start_ovs.sh" StopOVS = "stop_ovs.sh" RestartOVS = "restart_ovs.sh" )
Variables ¶
This section is empty.
Functions ¶
func OverwriteObjectCacheWithJSON ¶
func OverwriteObjectCacheWithJSON(cache *ObjectCache, jsonConfig map[string]interface{})
Types ¶
type Client ¶
type Client struct { Address string Protocol string Port string Connection *libovsdb.OvsdbClient Database string Notifier *Notifier Config *Config ErrorChan chan error QuitChan chan bool }
func (*Client) MonitorAll ¶
func (o *Client) MonitorAll()
func (*Client) RestartSystem ¶
func (*Client) SetInterface ¶
func (*Client) SetOpenFlowController ¶
func (o *Client) SetOpenFlowController(controller *OpenFlowController) error
func (*Client) StartClient ¶
func (*Client) StartSystem ¶
func (*Client) StopClient ¶
func (o *Client) StopClient()
func (*Client) StopMonitoring ¶
func (o *Client) StopMonitoring()
func (*Client) StopSystem ¶
func (*Client) SyncChangesToRemote ¶
func (o *Client) SyncChangesToRemote(prev, new *ObjectCache) error
type Config ¶
type Config struct { ObjCache *ObjectCache Initialized chan struct{} // contains filtered or unexported fields }
func (*Config) DeleteObjectCacheEntry ¶
func (*Config) DumpObjectCache ¶
func (c *Config) DumpObjectCache()
func (*Config) DumpRawCache ¶
func (c *Config) DumpRawCache()
func (*Config) InitializeCache ¶
func (c *Config) InitializeCache(updates *libovsdb.TableUpdates)
func (*Config) OverwriteCallback ¶
func (c *Config) OverwriteCallback(callback ConfigCallback)
func (*Config) OverwriteObjectCache ¶
func (c *Config) OverwriteObjectCache(cache *ObjectCache)
func (*Config) SyncCache ¶
func (c *Config) SyncCache(updates *libovsdb.TableUpdates)
type ConfigCallback ¶
type Interface ¶
type Interface struct { Name string MTU uint16 AdminStatus string LinkStatus string Statistics *InterfaceStatistics // contains filtered or unexported fields }
type InterfaceStatistics ¶
type InterfaceStatistics struct { ReceivedPackets uint64 ReceivedErrors uint64 ReceivedDropped uint64 TransmittedPackets uint64 TransmittedErrors uint64 TransmittedDropped uint64 }
func (*InterfaceStatistics) String ¶
func (s *InterfaceStatistics) String() string
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func (Notifier) Disconnected ¶
func (n Notifier) Disconnected(client *libovsdb.OvsdbClient)
func (Notifier) Update ¶
func (n Notifier) Update(context interface{}, tableUpdates libovsdb.TableUpdates)
type ObjectCache ¶
type ObjectCache struct { System *System Controllers map[string]*OpenFlowController Interfaces map[string]*Interface }
func CopyConfigObjectCache ¶
func CopyConfigObjectCache(c *ObjectCache) *ObjectCache
type OpenFlowController ¶
type OpenFlowController struct { Name string Connected bool Target *OpenFlowControllerTarget // contains filtered or unexported fields }
func (*OpenFlowController) Equal ¶
func (c *OpenFlowController) Equal(comp *OpenFlowController) bool
func (*OpenFlowController) String ¶
func (c *OpenFlowController) String() string
type OpenFlowControllerTarget ¶
func ParseOpenFlowControllerTarget ¶
func ParseOpenFlowControllerTarget(target string) (*OpenFlowControllerTarget, error)
func (*OpenFlowControllerTarget) String ¶
func (t *OpenFlowControllerTarget) String() string
type SystemBroker ¶
type SystemBroker struct { GNXIService *gnxi.Service OVSClient *Client // contains filtered or unexported fields }
func NewSystemBroker ¶
func NewSystemBroker(gnxiService *gnxi.Service, certManager *cert.Manager) *SystemBroker
func (*SystemBroker) GNMIConfigChangeCallback ¶
func (s *SystemBroker) GNMIConfigChangeCallback(new ygot.ValidatedGoStruct) error
func (*SystemBroker) GNMIConfigSetupCallback ¶
func (s *SystemBroker) GNMIConfigSetupCallback(new ygot.ValidatedGoStruct) error
func (*SystemBroker) GNOIRebootCallback ¶
func (s *SystemBroker) GNOIRebootCallback() error
func (*SystemBroker) GNOIRotateCertificatesCallback ¶
func (s *SystemBroker) GNOIRotateCertificatesCallback(certID string) error
func (*SystemBroker) GenerateConfig ¶
func (s *SystemBroker) GenerateConfig(config *Config) ([]byte, error)
func (*SystemBroker) OVSConfigChangeCallback ¶
func (s *SystemBroker) OVSConfigChangeCallback(ovsConfig *Config) error
func (*SystemBroker) RegisterWatchdogChannels ¶
func (s *SystemBroker) RegisterWatchdogChannels(startOVSClientChan, startGNXIServiceChan, stopOVSClientChan, stopGNXIServiceChan chan bool)
Click to show internal directories.
Click to hide internal directories.