Documentation ¶
Overview ¶
Package ovsdb enables programming of the Nuage VRS by directly interacting with Nuage OVSDB tables.
Index ¶
- Constants
- func UnMarshallOVSStringSet(data interface{}) ([]string, error)
- type NuagePortTableRow
- type NuageTable
- func (nuageTable *NuageTable) DeleteRow(ovs *libovsdb.OvsdbClient, condition []string) error
- func (nuageTable *NuageTable) InsertRow(ovs *libovsdb.OvsdbClient, row NuageTableRow) error
- func (nuageTable *NuageTable) ReadRow(ovs *libovsdb.OvsdbClient, readRowArgs ReadRowArgs) (map[string]interface{}, error)
- func (nuageTable *NuageTable) ReadRows(ovs *libovsdb.OvsdbClient, readRowArgs ReadRowArgs) ([]map[string]interface{}, error)
- func (nuageTable *NuageTable) UpdateRow(ovs *libovsdb.OvsdbClient, ovsdbRow map[string]interface{}, condition []string) error
- type NuageTableRow
- type NuageVMTableRow
- type ReadRowArgs
Constants ¶
const ( NuagePortTable = "Nuage_Port_Table" NuagePortTableColumnName = "name" // Attributes NuagePortTableColumnMAC = "mac" NuagePortTableColumnBridge = "bridge" NuagePortTableColumnVMDomain = "vm_domain" // State NuagePortTableColumnNuageDomain = "nuage_domain" NuagePortTableColumnNuageZone = "nuage_zone" NuagePortTableColumnNuageNetwork = "nuage_network" NuagePortTableColumnIPAddress = "ip_addr" NuagePortTableColumnSubnetMask = "subnet_mask" NuagePortTableColumnGateway = "gateway" NuagePortTableColumnVRFId = "vrf_id" NuagePortTableColumnEVPNID = "evpn_id" NuagePortTableColumnMetadata = "metadata" )
Constants needed to describe Nuage_Port_Table
const ( NuageVMTable = "Nuage_VM_Table" NuageVMTableColumnVMUUID = "vm_uuid" NuageVMTableColumnVMName = "vm_name" NuageVMTableColumnPorts = "ports" NuageVMTableColumnState = "state" NuageVMTableColumnReason = "reason" NuageVMTableColumnEventCategory = "event" NuageVMTableColumnEventType = "event_type" NuageVMTableColumnMetadata = "metadata" )
These constants describe the Nuage_VM_Table
const OvsDBName = "Open_vSwitch"
OvsDBName is the OVS database name
Variables ¶
This section is empty.
Functions ¶
func UnMarshallOVSStringSet ¶
UnMarshallOVSStringSet unmarshals a ovsdb column which is an array of strings
Types ¶
type NuagePortTableRow ¶
type NuagePortTableRow struct { Name string Mac string IPAddr string SubnetMask string Gateway string Bridge string Alias string NuageDomain string NuageNetwork string NuageZone string NuageNetworkType string EVPNId int VRFId int VMDomain entity.Domain Metadata map[string]string Dirty int }
NuagePortTableRow represents a row in Nuage_Port_Table
func (*NuagePortTableRow) CreateOVSDBRow ¶
func (row *NuagePortTableRow) CreateOVSDBRow(ovsdbRow map[string]interface{}) error
CreateOVSDBRow creates a new row in Nuage_Port_Table using the data provided by the user
func (*NuagePortTableRow) Equals ¶
func (row *NuagePortTableRow) Equals(otherRow interface{}) bool
Equals checks for equality of two Nuage_Port_Table rows
type NuageTable ¶
type NuageTable struct {
TableName string
}
NuageTable represent a Nuage OVSDB table
func (*NuageTable) DeleteRow ¶
func (nuageTable *NuageTable) DeleteRow(ovs *libovsdb.OvsdbClient, condition []string) error
DeleteRow is use to delete a row from the Nuage OVSDB table
func (*NuageTable) InsertRow ¶
func (nuageTable *NuageTable) InsertRow(ovs *libovsdb.OvsdbClient, row NuageTableRow) error
InsertRow enables insertion of a row into the Nuage OVSDB table
func (*NuageTable) ReadRow ¶
func (nuageTable *NuageTable) ReadRow(ovs *libovsdb.OvsdbClient, readRowArgs ReadRowArgs) (map[string]interface{}, error)
ReadRow enables reading of a single row from Nuage OVSDB table
func (*NuageTable) ReadRows ¶
func (nuageTable *NuageTable) ReadRows(ovs *libovsdb.OvsdbClient, readRowArgs ReadRowArgs) ([]map[string]interface{}, error)
ReadRows enables reading of multiple rows from a Nuage OVSDB table.
func (*NuageTable) UpdateRow ¶
func (nuageTable *NuageTable) UpdateRow(ovs *libovsdb.OvsdbClient, ovsdbRow map[string]interface{}, condition []string) error
UpdateRow updates the OVSDB table row
type NuageTableRow ¶
type NuageTableRow interface { Equals(otherRow interface{}) bool CreateOVSDBRow(row map[string]interface{}) error }
NuageTableRow is an interface that all of the Nuage OVSDB table rows implement
type NuageVMTableRow ¶
type NuageVMTableRow struct { Type int Event int EventType int State int Reason int VMUuid string VMName string Domain entity.Domain NuageUser string NuageEnterprise string Metadata map[string]string Ports []string Dirty int }
NuageVMTableRow represents a row in the Nuage_VM_Table
func (*NuageVMTableRow) CreateOVSDBRow ¶
func (row *NuageVMTableRow) CreateOVSDBRow(ovsdbRow map[string]interface{}) error
CreateOVSDBRow creates a OVSDB row for Nuage_VM_Table
func (*NuageVMTableRow) Equals ¶
func (row *NuageVMTableRow) Equals(otherRow interface{}) bool
Equals checks for equality of two rows in the Nuage_VM_Table
type ReadRowArgs ¶
ReadRowArgs enables a user to specific a condition and the columns of data to be read from a Nuage OVSDB table