ovnnb

package
v1.9.15 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ACLTable = "ACL"
View Source
const AddressSetTable = "Address_Set"
View Source
const BFDTable = "BFD"
View Source
const ConnectionTable = "Connection"
View Source
const DHCPOptionsTable = "DHCP_Options"
View Source
const DNSTable = "DNS"
View Source
const ForwardingGroupTable = "Forwarding_Group"
View Source
const GatewayChassisTable = "Gateway_Chassis"
View Source
const HAChassisGroupTable = "HA_Chassis_Group"
View Source
const HAChassisTable = "HA_Chassis"
View Source
const LoadBalancerHealthCheckTable = "Load_Balancer_Health_Check"
View Source
const LoadBalancerTable = "Load_Balancer"
View Source
const LogicalRouterPolicyTable = "Logical_Router_Policy"
View Source
const LogicalRouterPortTable = "Logical_Router_Port"
View Source
const LogicalRouterStaticRouteTable = "Logical_Router_Static_Route"
View Source
const LogicalRouterTable = "Logical_Router"
View Source
const LogicalSwitchPortTable = "Logical_Switch_Port"
View Source
const LogicalSwitchTable = "Logical_Switch"
View Source
const MeterBandTable = "Meter_Band"
View Source
const MeterTable = "Meter"
View Source
const NATTable = "NAT"
View Source
const NBGlobalTable = "NB_Global"
View Source
const PortGroupTable = "Port_Group"
View Source
const QoSTable = "QoS"
View Source
const SSLTable = "SSL"

Variables

View Source
var (
	ACLActionAllow          ACLAction    = "allow"
	ACLActionAllowRelated   ACLAction    = "allow-related"
	ACLActionAllowStateless ACLAction    = "allow-stateless"
	ACLActionDrop           ACLAction    = "drop"
	ACLActionReject         ACLAction    = "reject"
	ACLDirectionFromLport   ACLDirection = "from-lport"
	ACLDirectionToLport     ACLDirection = "to-lport"
	ACLSeverityAlert        ACLSeverity  = "alert"
	ACLSeverityWarning      ACLSeverity  = "warning"
	ACLSeverityNotice       ACLSeverity  = "notice"
	ACLSeverityInfo         ACLSeverity  = "info"
	ACLSeverityDebug        ACLSeverity  = "debug"
)
View Source
var (
	LoadBalancerProtocolTCP           LoadBalancerProtocol        = "tcp"
	LoadBalancerProtocolUDP           LoadBalancerProtocol        = "udp"
	LoadBalancerProtocolSCTP          LoadBalancerProtocol        = "sctp"
	LoadBalancerSelectionFieldsEthSrc LoadBalancerSelectionFields = "eth_src"
	LoadBalancerSelectionFieldsEthDst LoadBalancerSelectionFields = "eth_dst"
	LoadBalancerSelectionFieldsIPSrc  LoadBalancerSelectionFields = "ip_src"
	LoadBalancerSelectionFieldsIPDst  LoadBalancerSelectionFields = "ip_dst"
	LoadBalancerSelectionFieldsTpSrc  LoadBalancerSelectionFields = "tp_src"
	LoadBalancerSelectionFieldsTpDst  LoadBalancerSelectionFields = "tp_dst"
)
View Source
var (
	QoSActionDSCP         QoSAction    = "dscp"
	QoSBandwidthRate      QoSBandwidth = "rate"
	QoSBandwidthBurst     QoSBandwidth = "burst"
	QoSDirectionFromLport QoSDirection = "from-lport"
	QoSDirectionToLport   QoSDirection = "to-lport"
)

Functions

func FullDatabaseModel

func FullDatabaseModel() (model.ClientDBModel, error)

FullDatabaseModel returns the DatabaseModel object to be used in libovsdb

func Schema

func Schema() ovsdb.DatabaseSchema

Types

type ACL

type ACL struct {
	UUID        string            `ovsdb:"_uuid"`
	Action      ACLAction         `ovsdb:"action"`
	Direction   ACLDirection      `ovsdb:"direction"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Log         bool              `ovsdb:"log"`
	Match       string            `ovsdb:"match"`
	Meter       *string           `ovsdb:"meter"`
	Name        *string           `ovsdb:"name"`
	Priority    int               `ovsdb:"priority"`
	Severity    *ACLSeverity      `ovsdb:"severity"`
}

ACL defines an object in ACL table

type ACLAction

type ACLAction = string

type ACLDirection

type ACLDirection = string

type ACLSeverity

type ACLSeverity = string

type AddressSet

type AddressSet struct {
	UUID        string            `ovsdb:"_uuid"`
	Addresses   []string          `ovsdb:"addresses"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Name        string            `ovsdb:"name"`
}

AddressSet defines an object in Address_Set table

type BFD

type BFD struct {
	UUID        string            `ovsdb:"_uuid"`
	DetectMult  *int              `ovsdb:"detect_mult"`
	DstIP       string            `ovsdb:"dst_ip"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	LogicalPort string            `ovsdb:"logical_port"`
	MinRx       *int              `ovsdb:"min_rx"`
	MinTx       *int              `ovsdb:"min_tx"`
	Options     map[string]string `ovsdb:"options"`
	Status      *BFDStatus        `ovsdb:"status"`
}

BFD defines an object in BFD table

type BFDStatus

type BFDStatus = string
var (
	BFDStatusDown      BFDStatus = "down"
	BFDStatusInit      BFDStatus = "init"
	BFDStatusUp        BFDStatus = "up"
	BFDStatusAdminDown BFDStatus = "admin_down"
)

type Connection

type Connection struct {
	UUID            string            `ovsdb:"_uuid"`
	ExternalIDs     map[string]string `ovsdb:"external_ids"`
	InactivityProbe *int              `ovsdb:"inactivity_probe"`
	IsConnected     bool              `ovsdb:"is_connected"`
	MaxBackoff      *int              `ovsdb:"max_backoff"`
	OtherConfig     map[string]string `ovsdb:"other_config"`
	Status          map[string]string `ovsdb:"status"`
	Target          string            `ovsdb:"target"`
}

Connection defines an object in Connection table

type DHCPOptions

type DHCPOptions struct {
	UUID        string            `ovsdb:"_uuid"`
	Cidr        string            `ovsdb:"cidr"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Options     map[string]string `ovsdb:"options"`
}

DHCPOptions defines an object in DHCP_Options table

type DNS

type DNS struct {
	UUID        string            `ovsdb:"_uuid"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Records     map[string]string `ovsdb:"records"`
}

DNS defines an object in DNS table

type ForwardingGroup

type ForwardingGroup struct {
	UUID        string            `ovsdb:"_uuid"`
	ChildPort   []string          `ovsdb:"child_port"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Liveness    bool              `ovsdb:"liveness"`
	Name        string            `ovsdb:"name"`
	Vip         string            `ovsdb:"vip"`
	Vmac        string            `ovsdb:"vmac"`
}

ForwardingGroup defines an object in Forwarding_Group table

type GatewayChassis

type GatewayChassis struct {
	UUID        string            `ovsdb:"_uuid"`
	ChassisName string            `ovsdb:"chassis_name"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Name        string            `ovsdb:"name"`
	Options     map[string]string `ovsdb:"options"`
	Priority    int               `ovsdb:"priority"`
}

GatewayChassis defines an object in Gateway_Chassis table

type HAChassis

type HAChassis struct {
	UUID        string            `ovsdb:"_uuid"`
	ChassisName string            `ovsdb:"chassis_name"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Priority    int               `ovsdb:"priority"`
}

HAChassis defines an object in HA_Chassis table

type HAChassisGroup

type HAChassisGroup struct {
	UUID        string            `ovsdb:"_uuid"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	HaChassis   []string          `ovsdb:"ha_chassis"`
	Name        string            `ovsdb:"name"`
}

HAChassisGroup defines an object in HA_Chassis_Group table

type LoadBalancer

type LoadBalancer struct {
	UUID            string                        `ovsdb:"_uuid"`
	ExternalIDs     map[string]string             `ovsdb:"external_ids"`
	HealthCheck     []string                      `ovsdb:"health_check"`
	IPPortMappings  map[string]string             `ovsdb:"ip_port_mappings"`
	Name            string                        `ovsdb:"name"`
	Options         map[string]string             `ovsdb:"options"`
	Protocol        *LoadBalancerProtocol         `ovsdb:"protocol"`
	SelectionFields []LoadBalancerSelectionFields `ovsdb:"selection_fields"`
	Vips            map[string]string             `ovsdb:"vips"`
}

LoadBalancer defines an object in Load_Balancer table

type LoadBalancerHealthCheck

type LoadBalancerHealthCheck struct {
	UUID        string            `ovsdb:"_uuid"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Options     map[string]string `ovsdb:"options"`
	Vip         string            `ovsdb:"vip"`
}

LoadBalancerHealthCheck defines an object in Load_Balancer_Health_Check table

type LoadBalancerProtocol

type LoadBalancerProtocol = string

type LoadBalancerSelectionFields

type LoadBalancerSelectionFields = string

type LogicalRouter

type LogicalRouter struct {
	UUID         string            `ovsdb:"_uuid"`
	Enabled      *bool             `ovsdb:"enabled"`
	ExternalIDs  map[string]string `ovsdb:"external_ids"`
	LoadBalancer []string          `ovsdb:"load_balancer"`
	Name         string            `ovsdb:"name"`
	Nat          []string          `ovsdb:"nat"`
	Options      map[string]string `ovsdb:"options"`
	Policies     []string          `ovsdb:"policies"`
	Ports        []string          `ovsdb:"ports"`
	StaticRoutes []string          `ovsdb:"static_routes"`
}

LogicalRouter defines an object in Logical_Router table

type LogicalRouterPolicy

type LogicalRouterPolicy struct {
	UUID        string                    `ovsdb:"_uuid"`
	Action      LogicalRouterPolicyAction `ovsdb:"action"`
	ExternalIDs map[string]string         `ovsdb:"external_ids"`
	Match       string                    `ovsdb:"match"`
	Nexthop     *string                   `ovsdb:"nexthop"`
	Nexthops    []string                  `ovsdb:"nexthops"`
	Options     map[string]string         `ovsdb:"options"`
	Priority    int                       `ovsdb:"priority"`
}

LogicalRouterPolicy defines an object in Logical_Router_Policy table

type LogicalRouterPolicyAction

type LogicalRouterPolicyAction = string
var (
	LogicalRouterPolicyActionAllow   LogicalRouterPolicyAction = "allow"
	LogicalRouterPolicyActionDrop    LogicalRouterPolicyAction = "drop"
	LogicalRouterPolicyActionReroute LogicalRouterPolicyAction = "reroute"
)

type LogicalRouterPort

type LogicalRouterPort struct {
	UUID           string            `ovsdb:"_uuid"`
	Enabled        *bool             `ovsdb:"enabled"`
	ExternalIDs    map[string]string `ovsdb:"external_ids"`
	GatewayChassis []string          `ovsdb:"gateway_chassis"`
	HaChassisGroup *string           `ovsdb:"ha_chassis_group"`
	Ipv6Prefix     []string          `ovsdb:"ipv6_prefix"`
	Ipv6RaConfigs  map[string]string `ovsdb:"ipv6_ra_configs"`
	MAC            string            `ovsdb:"mac"`
	Name           string            `ovsdb:"name"`
	Networks       []string          `ovsdb:"networks"`
	Options        map[string]string `ovsdb:"options"`
	Peer           *string           `ovsdb:"peer"`
}

LogicalRouterPort defines an object in Logical_Router_Port table

type LogicalRouterStaticRoute

type LogicalRouterStaticRoute struct {
	UUID        string                          `ovsdb:"_uuid"`
	BFD         *string                         `ovsdb:"bfd"`
	ExternalIDs map[string]string               `ovsdb:"external_ids"`
	IPPrefix    string                          `ovsdb:"ip_prefix"`
	Nexthop     string                          `ovsdb:"nexthop"`
	Options     map[string]string               `ovsdb:"options"`
	OutputPort  *string                         `ovsdb:"output_port"`
	Policy      *LogicalRouterStaticRoutePolicy `ovsdb:"policy"`
}

LogicalRouterStaticRoute defines an object in Logical_Router_Static_Route table

type LogicalRouterStaticRoutePolicy

type LogicalRouterStaticRoutePolicy = string
var (
	LogicalRouterStaticRoutePolicySrcIP LogicalRouterStaticRoutePolicy = "src-ip"
	LogicalRouterStaticRoutePolicyDstIP LogicalRouterStaticRoutePolicy = "dst-ip"
)

type LogicalSwitch

type LogicalSwitch struct {
	UUID             string            `ovsdb:"_uuid"`
	ACLs             []string          `ovsdb:"acls"`
	DNSRecords       []string          `ovsdb:"dns_records"`
	ExternalIDs      map[string]string `ovsdb:"external_ids"`
	ForwardingGroups []string          `ovsdb:"forwarding_groups"`
	LoadBalancer     []string          `ovsdb:"load_balancer"`
	Name             string            `ovsdb:"name"`
	OtherConfig      map[string]string `ovsdb:"other_config"`
	Ports            []string          `ovsdb:"ports"`
	QOSRules         []string          `ovsdb:"qos_rules"`
}

LogicalSwitch defines an object in Logical_Switch table

type LogicalSwitchPort

type LogicalSwitchPort struct {
	UUID             string            `ovsdb:"_uuid"`
	Addresses        []string          `ovsdb:"addresses"`
	Dhcpv4Options    *string           `ovsdb:"dhcpv4_options"`
	Dhcpv6Options    *string           `ovsdb:"dhcpv6_options"`
	DynamicAddresses *string           `ovsdb:"dynamic_addresses"`
	Enabled          *bool             `ovsdb:"enabled"`
	ExternalIDs      map[string]string `ovsdb:"external_ids"`
	HaChassisGroup   *string           `ovsdb:"ha_chassis_group"`
	Name             string            `ovsdb:"name"`
	Options          map[string]string `ovsdb:"options"`
	ParentName       *string           `ovsdb:"parent_name"`
	PortSecurity     []string          `ovsdb:"port_security"`
	Tag              *int              `ovsdb:"tag"`
	TagRequest       *int              `ovsdb:"tag_request"`
	Type             string            `ovsdb:"type"`
	Up               *bool             `ovsdb:"up"`
}

LogicalSwitchPort defines an object in Logical_Switch_Port table

type Meter

type Meter struct {
	UUID        string            `ovsdb:"_uuid"`
	Bands       []string          `ovsdb:"bands"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Fair        *bool             `ovsdb:"fair"`
	Name        string            `ovsdb:"name"`
	Unit        MeterUnit         `ovsdb:"unit"`
}

Meter defines an object in Meter table

type MeterBand

type MeterBand struct {
	UUID        string            `ovsdb:"_uuid"`
	Action      MeterBandAction   `ovsdb:"action"`
	BurstSize   int               `ovsdb:"burst_size"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Rate        int               `ovsdb:"rate"`
}

MeterBand defines an object in Meter_Band table

type MeterBandAction

type MeterBandAction = string
var (
	MeterBandActionDrop MeterBandAction = "drop"
)

type MeterUnit

type MeterUnit = string
var (
	MeterUnitKbps  MeterUnit = "kbps"
	MeterUnitPktps MeterUnit = "pktps"
)

type NAT

type NAT struct {
	UUID              string            `ovsdb:"_uuid"`
	AllowedExtIPs     *string           `ovsdb:"allowed_ext_ips"`
	ExemptedExtIPs    *string           `ovsdb:"exempted_ext_ips"`
	ExternalIDs       map[string]string `ovsdb:"external_ids"`
	ExternalIP        string            `ovsdb:"external_ip"`
	ExternalMAC       *string           `ovsdb:"external_mac"`
	ExternalPortRange string            `ovsdb:"external_port_range"`
	LogicalIP         string            `ovsdb:"logical_ip"`
	LogicalPort       *string           `ovsdb:"logical_port"`
	Options           map[string]string `ovsdb:"options"`
	Type              NATType           `ovsdb:"type"`
}

NAT defines an object in NAT table

type NATType

type NATType = string
var (
	NATTypeDNAT        NATType = "dnat"
	NATTypeSNAT        NATType = "snat"
	NATTypeDNATAndSNAT NATType = "dnat_and_snat"
)

type NBGlobal

type NBGlobal struct {
	UUID           string            `ovsdb:"_uuid"`
	Connections    []string          `ovsdb:"connections"`
	ExternalIDs    map[string]string `ovsdb:"external_ids"`
	HvCfg          int               `ovsdb:"hv_cfg"`
	HvCfgTimestamp int               `ovsdb:"hv_cfg_timestamp"`
	Ipsec          bool              `ovsdb:"ipsec"`
	Name           string            `ovsdb:"name"`
	NbCfg          int               `ovsdb:"nb_cfg"`
	NbCfgTimestamp int               `ovsdb:"nb_cfg_timestamp"`
	Options        map[string]string `ovsdb:"options"`
	SbCfg          int               `ovsdb:"sb_cfg"`
	SbCfgTimestamp int               `ovsdb:"sb_cfg_timestamp"`
	SSL            *string           `ovsdb:"ssl"`
}

NBGlobal defines an object in NB_Global table

type PortGroup

type PortGroup struct {
	UUID        string            `ovsdb:"_uuid"`
	ACLs        []string          `ovsdb:"acls"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Name        string            `ovsdb:"name"`
	Ports       []string          `ovsdb:"ports"`
}

PortGroup defines an object in Port_Group table

type QoS

type QoS struct {
	UUID        string            `ovsdb:"_uuid"`
	Action      map[string]int    `ovsdb:"action"`
	Bandwidth   map[string]int    `ovsdb:"bandwidth"`
	Direction   QoSDirection      `ovsdb:"direction"`
	ExternalIDs map[string]string `ovsdb:"external_ids"`
	Match       string            `ovsdb:"match"`
	Priority    int               `ovsdb:"priority"`
}

QoS defines an object in QoS table

type QoSAction

type QoSAction = string

type QoSBandwidth

type QoSBandwidth = string

type QoSDirection

type QoSDirection = string

type SSL

type SSL struct {
	UUID            string            `ovsdb:"_uuid"`
	BootstrapCaCert bool              `ovsdb:"bootstrap_ca_cert"`
	CaCert          string            `ovsdb:"ca_cert"`
	Certificate     string            `ovsdb:"certificate"`
	ExternalIDs     map[string]string `ovsdb:"external_ids"`
	PrivateKey      string            `ovsdb:"private_key"`
	SSLCiphers      string            `ovsdb:"ssl_ciphers"`
	SSLProtocols    string            `ovsdb:"ssl_protocols"`
}

SSL defines an object in SSL table

Jump to

Keyboard shortcuts

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