Documentation
¶
Overview ¶
Package ovnflow provides a fluent Go SDK for OVN and Open vSwitch.
The SDK uses github.com/ovn-kubernetes/libovsdb for all production OVSDB connections, schema discovery, and transactions. The stable API covers distributed-virtualization control-plane paths that are painful to express with shell commands: OVN Northbound topology, policy, service, DHCP/DNS, QoS, meter, group, HA, gateway, and BFD builders; OVN Southbound typed reads and watches for the main runtime tables; and local Open_vSwitch bridge, port, interface, controller, manager, mirror, QoS, queue, sampling, SSL, and AutoAttach configuration.
Dynamic TableRef helpers remain available for version-specific schema columns.
Normal tests are local and do not require OVN, OVS, WSL, or Docker. Integration tests are enabled explicitly with the integration build tag and read TCP endpoints from environment variables.
Example (LocalOVSAddInternalPort) ¶
package main
import (
"context"
"github.com/firstmeet/ovnflow/v2"
)
func main() {
ctx := context.Background()
client, err := ovnflow.Connect(ctx, ovnflow.ConfigFromEnv())
if err != nil {
return
}
defer client.Close()
_ = client.LocalOVS().
Bridge("br-ovnflow-it").
AddPort("vnet0").
WithInterfaceType("internal").
WithExternalID("vm-id", "uuid-1234").
Execute(ctx)
}
Output:
Example (LogicalSwitchCreate) ¶
package main
import (
"context"
"github.com/firstmeet/ovnflow/v2"
)
func main() {
ctx := context.Background()
client, err := ovnflow.Connect(ctx, ovnflow.Config{
OVSAddr: "tcp:127.0.0.1:6640",
OVNNBAddr: "tcp:127.0.0.1:6641",
OVNSBAddr: "tcp:127.0.0.1:6642",
})
if err != nil {
return
}
defer client.Close()
_ = client.OVN().NB().
LogicalSwitch("ls-web").
Create().
WithSubnet("192.168.1.0/24").
AddPort("port-vm1").
WithMac("00:11:22:33:44:55").
WithIP("192.168.1.10").
Execute(ctx)
}
Output:
Example (OvnSBWatchPortBindings) ¶
package main
import (
"context"
"github.com/firstmeet/ovnflow/v2"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
client, err := ovnflow.Connect(ctx, ovnflow.ConfigFromEnv())
if err != nil {
return
}
defer client.Close()
events, errs := client.OVN().SB().WatchPortBindings(ctx)
select {
case <-events:
case <-errs:
}
}
Output:
Example (V2IntentLifecycle) ¶
package main
import (
"context"
"github.com/firstmeet/ovnflow/v2"
)
func main() {
ctx := context.Background()
client, err := ovnflow.Connect(ctx, ovnflow.ConfigFromEnv())
if err != nil {
return
}
defer client.Close()
nb := client.OVN().NB()
_ = nb.VirtualNetwork("net-web").
Ensure().
WithCIDR("10.20.0.0/24").
WithGateway("10.20.0.1").
WithOwner("project", "alpha").
WithLabel("env", "prod").
WithDNS("net-web-dns", func(d *ovnflow.LogicalSwitchDNSBuilder) {
d.AddRecord("api.service", "10.20.0.10", "10.20.0.11")
}).
Execute(ctx)
_ = nb.WorkloadAttachment("vm-1001-eth0").
Ensure().
OnNetwork("net-web").
WithWorkload("vm-1001").
WithInterface("eth0").
WithMAC("00:16:3e:11:22:33").
WithIP("10.20.0.10").
WithOwner("project", "alpha").
Execute(ctx)
_ = nb.SecurityPolicy("pg-web").
Ensure().
ForSubject("pg-web").
WithOwner("project", "alpha").
AddRule(ovnflow.SecurityRule{
Name: "allow-http",
Action: "allow",
Protocol: "tcp",
CIDRs: []string{"10.20.0.0/24"},
Ports: []int{80},
}).
Execute(ctx)
_, _ = nb.VirtualNetwork("net-web").Get(ctx)
_ = nb.WorkloadAttachment("vm-1001-eth0").Delete(ctx)
_ = nb.LogicalSwitchDNS("net-web-dns").Delete(ctx)
_ = nb.SecurityPolicy("pg-web").Delete(ctx)
_ = nb.VirtualNetwork("net-web").Delete(ctx)
}
Output:
Index ¶
- Constants
- Variables
- func DecodeExternalIDLabelKey(externalIDKey string) (string, bool)
- func EnvGateEnabled(value string) bool
- func ExternalIDLabelKey(labelKey string) string
- func FormatBridgeMappings(mappings map[string]string) string
- func IsKind(err error, kind ErrorKind) bool
- func IsReservedExternalIDKey(key string) bool
- func MarshalOpenFlowMessage(msg OpenFlowMessage) ([]byte, error)
- func OwnershipMatches(externalIDs map[string]string, owner OwnerRef) bool
- func ParseBridgeMappings(raw string) (map[string]string, error)
- func ParseOpenFlowMultipartReply(msg OpenFlowMessage) (uint16, uint16, []byte, error)
- func ValidNATBackend(value string) bool
- func WriteOpenFlowMessage(w io.Writer, msg OpenFlowMessage) error
- type ACL
- type ACLBuilder
- func (b *ACLBuilder) Execute(ctx context.Context) error
- func (b *ACLBuilder) WithAction(action string) *ACLBuilder
- func (b *ACLBuilder) WithDirection(direction string) *ACLBuilder
- func (b *ACLBuilder) WithExternalID(key, value string) *ACLBuilder
- func (b *ACLBuilder) WithLabel(label int) *ACLBuilder
- func (b *ACLBuilder) WithLog(log bool) *ACLBuilder
- func (b *ACLBuilder) WithMatch(match string) *ACLBuilder
- func (b *ACLBuilder) WithMeter(meter string) *ACLBuilder
- func (b *ACLBuilder) WithOption(key, value string) *ACLBuilder
- func (b *ACLBuilder) WithPriority(priority int) *ACLBuilder
- func (b *ACLBuilder) WithSeverity(severity string) *ACLBuilder
- func (b *ACLBuilder) WithTier(tier int) *ACLBuilder
- type ACLRef
- type AddressSet
- type AddressSetBuilder
- func (b *AddressSetBuilder) Execute(ctx context.Context) error
- func (b *AddressSetBuilder) WithAddress(address string) *AddressSetBuilder
- func (b *AddressSetBuilder) WithAddresses(addresses ...string) *AddressSetBuilder
- func (b *AddressSetBuilder) WithExternalID(key, value string) *AddressSetBuilder
- type AddressSetRef
- type AdoptCandidate
- type AdoptPlan
- type AdoptPlanOptions
- type BFD
- type BFDBuilder
- func (b *BFDBuilder) Execute(ctx context.Context) error
- func (b *BFDBuilder) WithDetectMult(value int) *BFDBuilder
- func (b *BFDBuilder) WithExternalID(key, value string) *BFDBuilder
- func (b *BFDBuilder) WithMinRx(value int) *BFDBuilder
- func (b *BFDBuilder) WithMinTx(value int) *BFDBuilder
- func (b *BFDBuilder) WithOption(key, value string) *BFDBuilder
- func (b *BFDBuilder) WithStatus(status string) *BFDBuilder
- type BFDEvent
- type BFDRef
- type BridgeBuilder
- func (b *BridgeBuilder) AddPort(name string) *OVSPortBuilder
- func (b *BridgeBuilder) Execute(ctx context.Context) error
- func (b *BridgeBuilder) WithAutoAttach(systemName string, configure func(*TableBuilder)) *BridgeBuilder
- func (b *BridgeBuilder) WithControllerTarget(target string) *BridgeBuilder
- func (b *BridgeBuilder) WithDatapathType(kind string) *BridgeBuilder
- func (b *BridgeBuilder) WithExternalID(key, value string) *BridgeBuilder
- func (b *BridgeBuilder) WithFailMode(mode string) *BridgeBuilder
- func (b *BridgeBuilder) WithFlowTable(tableID int, name string, configure func(*TableBuilder)) *BridgeBuilder
- func (b *BridgeBuilder) WithIPFIX(name string, configure func(*TableBuilder)) *BridgeBuilder
- func (b *BridgeBuilder) WithMirror(name string, configure func(*TableBuilder)) *BridgeBuilder
- func (b *BridgeBuilder) WithNetFlow(name string, configure func(*TableBuilder)) *BridgeBuilder
- func (b *BridgeBuilder) WithSFlow(name string, configure func(*TableBuilder)) *BridgeBuilder
- type BridgeRef
- type ChassisEvent
- type CleanupAction
- type CleanupCandidate
- type CleanupPlan
- type CleanupPlanOptions
- type CleanupRisk
- type Client
- func (c *Client) AdoptPlan(ctx context.Context, opts AdoptPlanOptions) (*AdoptPlan, error)
- func (c *Client) CleanupPlan(ctx context.Context, opts CleanupPlanOptions) (*CleanupPlan, error)
- func (c *Client) Close()
- func (c *Client) Diagnostics() *Diagnostics
- func (c *Client) Doctor() *Doctor
- func (c *Client) LocalOVS() *OVSClient
- func (c *Client) NetworkStatus(ctx context.Context, name string) (*NetworkStatus, error)
- func (c *Client) OVN() OVN
- func (c *Client) OpenFlow() *OpenFlowClient
- func (c *Client) ProviderNetwork(name string) *ProviderNetworkRef
- func (c *Client) ProviderNetworkStatus(ctx context.Context, name string) (*ProviderNetworkStatus, error)
- func (c *Client) RawNB() ovsclient.Client
- func (c *Client) RawOVS() ovsclient.Client
- func (c *Client) RawSB() ovsclient.Client
- func (c *Client) SDWAN() *SDWANClient
- func (c *Client) UseSDWANBackend(backend SDWANBackend) *Client
- func (c *Client) WorkloadAttachment(name string) *WorkloadAttachmentRef
- func (c *Client) WorkloadPath(ctx context.Context, name string) (*WorkloadPathStatus, error)
- type Config
- type DHCPOptions
- type DHCPOptionsBuilder
- type DHCPOptionsRef
- type DNS
- type DNSBuilder
- type DNSEvent
- type DNSRecord
- type DNSRef
- type DatapathEvent
- type DiagnosticCheck
- type DiagnosticCheckResult
- type DiagnosticStatus
- type Diagnostics
- type Diff
- type DiffChange
- type Doctor
- type DoctorDatabaseReport
- type DoctorFinding
- type DoctorNorthboundReport
- type DoctorOVSReport
- type DoctorOptions
- type DoctorReport
- type DoctorSeverity
- type DoctorSouthboundReport
- type DryRunResult
- type Error
- type ErrorKind
- type EventType
- type FDBEvent
- type GatewayChassis
- type GatewayChassisBuilder
- func (b *GatewayChassisBuilder) Execute(ctx context.Context) error
- func (b *GatewayChassisBuilder) WithChassisName(name string) *GatewayChassisBuilder
- func (b *GatewayChassisBuilder) WithExternalID(key, value string) *GatewayChassisBuilder
- func (b *GatewayChassisBuilder) WithOption(key, value string) *GatewayChassisBuilder
- func (b *GatewayChassisBuilder) WithPriority(priority int) *GatewayChassisBuilder
- type GatewayChassisRef
- type HAChassis
- type HAChassisBuilder
- type HAChassisGroup
- type HAChassisGroupBuilder
- type HAChassisGroupRef
- type HAChassisRef
- type IPAMPool
- type IPAllocationPlan
- type InMemorySDWANBackend
- func (b *InMemorySDWANBackend) ApplySDWAN(_ context.Context, network SDWANNetwork, plan SDWANApplyPlan) error
- func (b *InMemorySDWANBackend) DeleteSDWAN(_ context.Context, name string) error
- func (b *InMemorySDWANBackend) GetSDWAN(_ context.Context, name string) (*SDWANNetwork, error)
- func (b *InMemorySDWANBackend) LastPlan(name string) (SDWANApplyPlan, bool)
- type InMemorySDWANControlPlane
- func (c *InMemorySDWANControlPlane) AckAssignment(_ context.Context, id string, status SDWANAssignmentStatus) (*SDWANAssignment, error)
- func (c *InMemorySDWANControlPlane) AssignSDWAN(_ context.Context, agentID string, network SDWANNetwork, plan SDWANApplyPlan) (*SDWANAssignment, error)
- func (c *InMemorySDWANControlPlane) GetAgent(_ context.Context, id string) (*SDWANAgent, error)
- func (c *InMemorySDWANControlPlane) GetAssignment(_ context.Context, id string) (*SDWANAssignment, error)
- func (c *InMemorySDWANControlPlane) Heartbeat(_ context.Context, hb SDWANAgentHeartbeat) (*SDWANAgent, error)
- func (c *InMemorySDWANControlPlane) ListAgents(context.Context) ([]SDWANAgent, error)
- func (c *InMemorySDWANControlPlane) ListAssignments(_ context.Context, agentID string) ([]SDWANAssignment, error)
- func (c *InMemorySDWANControlPlane) RegisterAgent(_ context.Context, agent SDWANAgent) (*SDWANAgent, error)
- type InspectResult
- type IntegrationConfig
- type IntentAction
- type IntentPlanner
- type Labels
- type LoadBalancer
- type LoadBalancerBuilder
- func (b *LoadBalancerBuilder) AttachToRouter(name string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) Execute(ctx context.Context) error
- func (b *LoadBalancerBuilder) WithExternalID(key, value string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithHealthCheckUUID(uuid string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithIPPortMapping(endpoint, mapping string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithOption(key, value string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithProtocol(protocol string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithSelectionField(field string) *LoadBalancerBuilder
- func (b *LoadBalancerBuilder) WithVIP(vip, backends string) *LoadBalancerBuilder
- type LoadBalancerRef
- type LogicalFlowEvent
- type LogicalRouter
- type LogicalRouterBuilder
- func (b *LogicalRouterBuilder) Execute(ctx context.Context) error
- func (b *LogicalRouterBuilder) WithExternalID(key, value string) *LogicalRouterBuilder
- func (b *LogicalRouterBuilder) WithLoadBalancerUUID(uuid string) *LogicalRouterBuilder
- func (b *LogicalRouterBuilder) WithNATUUID(uuid string) *LogicalRouterBuilder
- func (b *LogicalRouterBuilder) WithOption(key, value string) *LogicalRouterBuilder
- func (b *LogicalRouterBuilder) WithPortUUID(uuid string) *LogicalRouterBuilder
- type LogicalRouterPort
- type LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) AttachToRouter(name string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) Execute(ctx context.Context) error
- func (b *LogicalRouterPortBuilder) WithEnabled(enabled bool) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithExternalID(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithGatewayChassis(name, chassisName string, priority int) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithGatewayChassisExternalID(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithGatewayChassisOption(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithGatewayChassisUUID(uuid string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithHAChassis(chassisName string, priority int) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithHAChassisExternalID(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithHAChassisGroup(name string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithHAChassisGroupExternalID(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithHAChassisGroupUUID(uuid string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithIPv6Prefix(prefix string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithIPv6RAConfig(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithMAC(mac string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithNetwork(network string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithNetworks(networks ...string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithOption(key, value string) *LogicalRouterPortBuilder
- func (b *LogicalRouterPortBuilder) WithPeer(peer string) *LogicalRouterPortBuilder
- type LogicalRouterPortRef
- type LogicalRouterRef
- type LogicalSwitch
- type LogicalSwitchBuilder
- func (b *LogicalSwitchBuilder) AddLocalnetPort(name, networkName string) *LogicalSwitchPortBuilder
- func (b *LogicalSwitchBuilder) AddPort(name string) *LogicalSwitchPortBuilder
- func (b *LogicalSwitchBuilder) Execute(ctx context.Context) error
- func (b *LogicalSwitchBuilder) WithExternalID(key, value string) *LogicalSwitchBuilder
- func (b *LogicalSwitchBuilder) WithSubnet(cidr string) *LogicalSwitchBuilder
- type LogicalSwitchDNS
- type LogicalSwitchDNSBuilder
- func (b *LogicalSwitchDNSBuilder) AddRecord(domain string, ips ...string) *LogicalSwitchDNSBuilder
- func (b *LogicalSwitchDNSBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *LogicalSwitchDNSBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *LogicalSwitchDNSBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *LogicalSwitchDNSBuilder) Validate() error
- func (b *LogicalSwitchDNSBuilder) WithLabel(key, value string) *LogicalSwitchDNSBuilder
- func (b *LogicalSwitchDNSBuilder) WithOwner(kind, name string) *LogicalSwitchDNSBuilder
- type LogicalSwitchDNSPatch
- type LogicalSwitchDNSRef
- func (r *LogicalSwitchDNSRef) Apply(ctx context.Context, dns LogicalSwitchDNS) error
- func (r *LogicalSwitchDNSRef) Delete(ctx context.Context) error
- func (r *LogicalSwitchDNSRef) Ensure() *LogicalSwitchDNSBuilder
- func (r *LogicalSwitchDNSRef) Get(ctx context.Context) (*LogicalSwitchDNS, error)
- func (r *LogicalSwitchDNSRef) Inspect(ctx context.Context) (InspectResult, error)
- func (r *LogicalSwitchDNSRef) Patch(ctx context.Context, patch LogicalSwitchDNSPatch) (*LogicalSwitchDNS, error)
- type LogicalSwitchPort
- type LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) AsLocalnet(networkName string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) Execute(ctx context.Context) error
- func (p *LogicalSwitchPortBuilder) WithAddress(mac, ip string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithAddresses(addresses ...string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithExternalID(key, value string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithIP(ip string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithMac(mac string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithOption(key, value string) *LogicalSwitchPortBuilder
- func (p *LogicalSwitchPortBuilder) WithType(kind string) *LogicalSwitchPortBuilder
- type LogicalSwitchRef
- type MACBindingEvent
- type Meter
- type MeterBand
- type MeterBandBuilder
- func (b *MeterBandBuilder) Execute(ctx context.Context) error
- func (b *MeterBandBuilder) WithAction(action string) *MeterBandBuilder
- func (b *MeterBandBuilder) WithBurstSize(size int) *MeterBandBuilder
- func (b *MeterBandBuilder) WithExternalID(key, value string) *MeterBandBuilder
- func (b *MeterBandBuilder) WithRate(rate int) *MeterBandBuilder
- type MeterBandEvent
- type MeterBandRef
- type MeterBuilder
- func (b *MeterBuilder) Execute(ctx context.Context) error
- func (b *MeterBuilder) WithBand(action string, rate int) *MeterBuilder
- func (b *MeterBuilder) WithBandExternalID(key, value string) *MeterBuilder
- func (b *MeterBuilder) WithBandUUID(uuid string) *MeterBuilder
- func (b *MeterBuilder) WithExternalID(key, value string) *MeterBuilder
- func (b *MeterBuilder) WithFair(fair bool) *MeterBuilder
- func (b *MeterBuilder) WithNamedBand(name, action string, rate int) *MeterBuilder
- func (b *MeterBuilder) WithUnit(unit string) *MeterBuilder
- type MeterEvent
- type MeterRef
- type MulticastGroupEvent
- type NAT
- type NATBuilder
- func (b *NATBuilder) AttachToRouter(name string) *NATBuilder
- func (b *NATBuilder) Execute(ctx context.Context) error
- func (b *NATBuilder) WithAllowedExternalIPsUUID(uuid string) *NATBuilder
- func (b *NATBuilder) WithExemptedExternalIPsUUID(uuid string) *NATBuilder
- func (b *NATBuilder) WithExternalID(key, value string) *NATBuilder
- func (b *NATBuilder) WithExternalIP(ip string) *NATBuilder
- func (b *NATBuilder) WithExternalMAC(mac string) *NATBuilder
- func (b *NATBuilder) WithExternalPortRange(portRange string) *NATBuilder
- func (b *NATBuilder) WithGatewayPortUUID(uuid string) *NATBuilder
- func (b *NATBuilder) WithLogicalIP(ip string) *NATBuilder
- func (b *NATBuilder) WithLogicalPort(port string) *NATBuilder
- func (b *NATBuilder) WithMatch(match string) *NATBuilder
- func (b *NATBuilder) WithOption(key, value string) *NATBuilder
- func (b *NATBuilder) WithPriority(priority int) *NATBuilder
- func (b *NATBuilder) WithType(kind string) *NATBuilder
- type NATRef
- type NBClient
- func (n *NBClient) ACL(name string) *ACLRef
- func (n *NBClient) ACLByMatch(direction string, priority int, match string) *ACLRef
- func (n *NBClient) AddressSet(name string) *AddressSetRef
- func (n *NBClient) BFD(logicalPort, dstIP string) *BFDRef
- func (n *NBClient) Connection(target string) *TableRef
- func (n *NBClient) DHCPOptions(cidr string) *DHCPOptionsRef
- func (n *NBClient) DNS(name string) *DNSRef
- func (n *NBClient) ForwardingGroup(name string) *TableRef
- func (n *NBClient) GatewayChassis(name string) *GatewayChassisRef
- func (n *NBClient) GetACL(ctx context.Context, direction string, priority int, match string) (*ACL, error)
- func (n *NBClient) GetAddressSet(ctx context.Context, name string) (*AddressSet, error)
- func (n *NBClient) GetBFD(ctx context.Context, logicalPort, dstIP string) (*BFD, error)
- func (n *NBClient) GetDHCPOptions(ctx context.Context, cidr string) (*DHCPOptions, error)
- func (n *NBClient) GetDNS(ctx context.Context, name string) (*DNS, error)
- func (n *NBClient) GetGatewayChassis(ctx context.Context, name string) (*GatewayChassis, error)
- func (n *NBClient) GetHAChassis(ctx context.Context, chassisName string) (*HAChassis, error)
- func (n *NBClient) GetHAChassisGroup(ctx context.Context, name string) (*HAChassisGroup, error)
- func (n *NBClient) GetLoadBalancer(ctx context.Context, name string) (*LoadBalancer, error)
- func (n *NBClient) GetLogicalRouter(ctx context.Context, name string) (*LogicalRouter, error)
- func (n *NBClient) GetLogicalRouterPort(ctx context.Context, name string) (*LogicalRouterPort, error)
- func (n *NBClient) GetLogicalSwitch(ctx context.Context, name string) (*LogicalSwitch, error)
- func (n *NBClient) GetLogicalSwitchPort(ctx context.Context, name string) (*LogicalSwitchPort, error)
- func (n *NBClient) GetMeter(ctx context.Context, name string) (*Meter, error)
- func (n *NBClient) GetMeterBand(ctx context.Context, name string) (*MeterBand, error)
- func (n *NBClient) GetNAT(ctx context.Context, kind, logicalIP string) (*NAT, error)
- func (n *NBClient) GetPortGroup(ctx context.Context, name string) (*PortGroup, error)
- func (n *NBClient) GetQoS(ctx context.Context, direction string, priority int, match string) (*QoS, error)
- func (n *NBClient) HAChassis(chassisName string) *HAChassisRef
- func (n *NBClient) HAChassisGroup(name string) *HAChassisGroupRef
- func (n *NBClient) ListLogicalSwitchPorts(ctx context.Context) ([]LogicalSwitchPort, error)
- func (n *NBClient) ListLogicalSwitches(ctx context.Context) ([]LogicalSwitch, error)
- func (n *NBClient) LoadBalancer(name string) *LoadBalancerRef
- func (n *NBClient) LogicalRouter(name string) *LogicalRouterRef
- func (n *NBClient) LogicalRouterPort(name string) *LogicalRouterPortRef
- func (n *NBClient) LogicalSwitch(name string) *LogicalSwitchRef
- func (n *NBClient) LogicalSwitchDNS(name string) *LogicalSwitchDNSRef
- func (n *NBClient) Meter(name string) *MeterRef
- func (n *NBClient) MeterBand(name string) *MeterBandRef
- func (n *NBClient) NAT(name string) *NATRef
- func (n *NBClient) NATByLogicalIP(kind, logicalIP string) *NATRef
- func (n *NBClient) NBGlobal() *TableRef
- func (n *NBClient) NetworkService(name string) *NetworkServiceRef
- func (n *NBClient) PortGroup(name string) *PortGroupRef
- func (n *NBClient) QoS(name string) *QoSRef
- func (n *NBClient) QoSByMatch(direction string, priority int, match string) *QoSRef
- func (n *NBClient) QoSPolicy(name string) *QoSPolicyRef
- func (n *NBClient) SSL() *TableRef
- func (n *NBClient) SecurityPolicy(name string) *SecurityPolicyRef
- func (n *NBClient) Table(table string) *TableRef
- func (n *NBClient) TableBy(table, column, value string) *TableRef
- func (n *NBClient) TableLogicalSwitchPort(name string) *TableRef
- func (n *NBClient) VirtualNetwork(name string) *VirtualNetworkRef
- func (n *NBClient) WorkloadAttachment(name string) *WorkloadAttachmentRef
- type NetworkService
- type NetworkServiceBuilder
- func (b *NetworkServiceBuilder) AttachToRouter(name string) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *NetworkServiceBuilder) Execute(ctx context.Context) error
- func (b *NetworkServiceBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *NetworkServiceBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *NetworkServiceBuilder) Validate() error
- func (b *NetworkServiceBuilder) WithLabel(key, value string) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) WithOwner(kind, name string) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) WithOwnerID(kind, id string) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) WithProtocol(protocol string) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) WithVIP(address string, port int, backends ...ServiceBackend) *NetworkServiceBuilder
- func (b *NetworkServiceBuilder) WithVIPString(vip string, backends ...string) *NetworkServiceBuilder
- type NetworkServiceDeleteBuilder
- type NetworkServiceRef
- func (r *NetworkServiceRef) Apply(ctx context.Context, service NetworkService) error
- func (r *NetworkServiceRef) Delete() *NetworkServiceDeleteBuilder
- func (r *NetworkServiceRef) Ensure() *NetworkServiceBuilder
- func (r *NetworkServiceRef) Get(ctx context.Context) (*NetworkService, error)
- func (r *NetworkServiceRef) Patch(ctx context.Context, patch ServicePatch) (*NetworkService, error)
- type NetworkStatus
- type OVN
- type OVSAutoAttach
- type OVSBridge
- type OVSClient
- func (o *OVSClient) AutoAttach(systemName string) *TableRef
- func (o *OVSClient) Bridge(name string) *BridgeRef
- func (o *OVSClient) Controller(target string) *TableRef
- func (o *OVSClient) DeleteBridgeMapping(ctx context.Context, physicalNetwork, bridge string) error
- func (o *OVSClient) EnsureBridgeMapping(ctx context.Context, physicalNetwork, bridge string) error
- func (o *OVSClient) FlowTable(name string) *TableRef
- func (o *OVSClient) GetBridge(ctx context.Context, name string) (*OVSBridge, error)
- func (o *OVSClient) GetBridgeMappings(ctx context.Context) (map[string]string, error)
- func (o *OVSClient) GetInterface(ctx context.Context, name string) (*OVSInterface, error)
- func (o *OVSClient) GetInterfaceByUUID(ctx context.Context, uuid string) (*OVSInterface, error)
- func (o *OVSClient) GetOpenVSwitch(ctx context.Context) (*OpenVSwitch, error)
- func (o *OVSClient) GetPort(ctx context.Context, name string) (*OVSPort, error)
- func (o *OVSClient) IPFIX(name string) *TableRef
- func (o *OVSClient) Interface(name string) *TableRef
- func (o *OVSClient) ListBridges(ctx context.Context) ([]OVSBridge, error)
- func (o *OVSClient) ListInterfaces(ctx context.Context) ([]OVSInterface, error)
- func (o *OVSClient) ListPorts(ctx context.Context) ([]OVSPort, error)
- func (o *OVSClient) Manager(target string) *TableRef
- func (o *OVSClient) Mirror(name string) *TableRef
- func (o *OVSClient) NetFlow(name string) *TableRef
- func (o *OVSClient) OpenVSwitch() *TableRef
- func (o *OVSClient) Port(name string) *TableRef
- func (o *OVSClient) QoS(name string) *TableRef
- func (o *OVSClient) Queue(name string) *TableRef
- func (o *OVSClient) SFlow(name string) *TableRef
- func (o *OVSClient) SSL() *TableRef
- func (o *OVSClient) Table(table string) *TableRef
- func (o *OVSClient) TableBy(table, column, value string) *TableRef
- func (o *OVSClient) WatchBridges(ctx context.Context) (<-chan RowEvent, <-chan error)
- func (o *OVSClient) WatchInterfaces(ctx context.Context) (<-chan RowEvent, <-chan error)
- func (o *OVSClient) WatchPorts(ctx context.Context) (<-chan RowEvent, <-chan error)
- func (o *OVSClient) WatchTable(ctx context.Context, table string) (<-chan RowEvent, <-chan error)
- type OVSController
- type OVSFlowTable
- type OVSIPFIX
- type OVSInterface
- type OVSManager
- type OVSMirror
- type OVSNetFlow
- type OVSPort
- type OVSPortBuilder
- func (p *OVSPortBuilder) Execute(ctx context.Context) error
- func (p *OVSPortBuilder) WithExternalID(key, value string) *OVSPortBuilder
- func (p *OVSPortBuilder) WithInterfaceExternalID(key, value string) *OVSPortBuilder
- func (p *OVSPortBuilder) WithInterfaceName(name string) *OVSPortBuilder
- func (p *OVSPortBuilder) WithInterfaceOption(key, value string) *OVSPortBuilder
- func (p *OVSPortBuilder) WithInterfaceType(kind string) *OVSPortBuilder
- func (p *OVSPortBuilder) WithOption(key, value string) *OVSPortBuilder
- type OVSQoS
- type OVSQueue
- type OVSSFlow
- type OVSSSL
- type OpenFlowAction
- type OpenFlowActionType
- type OpenFlowActionsBuilder
- type OpenFlowBridgeRef
- type OpenFlowClient
- func (c *OpenFlowClient) AutoConfigureBridgeController(target string) *OpenFlowClient
- func (c *OpenFlowClient) Bridge(name string) *OpenFlowBridgeRef
- func (c *OpenFlowClient) ConfigureBridgeController(ctx context.Context, bridge string) error
- func (c *OpenFlowClient) Dial(ctx context.Context) (*OpenFlowSession, error)
- func (c *OpenFlowClient) WithDialer(dialer OpenFlowDialer) *OpenFlowClient
- func (c *OpenFlowClient) WithEndpoint(endpoint string) *OpenFlowClient
- func (c *OpenFlowClient) WithVersions(versions ...OpenFlowVersion) *OpenFlowClient
- type OpenFlowConfig
- type OpenFlowDialer
- type OpenFlowFeatures
- type OpenFlowFlow
- type OpenFlowFlowStatsRequest
- type OpenFlowInstruction
- type OpenFlowMatch
- type OpenFlowMessage
- func MarshalOpenFlowFlowMod(version OpenFlowVersion, xid uint32, command uint8, flow OpenFlowFlow) (OpenFlowMessage, error)
- func MarshalOpenFlowFlowStatsRequest(version OpenFlowVersion, xid uint32, request OpenFlowFlowStatsRequest) (OpenFlowMessage, error)
- func OpenFlowFeaturesRequest(version OpenFlowVersion, xid uint32) (OpenFlowMessage, error)
- func OpenFlowHelloMessage(version OpenFlowVersion, xid uint32, versions ...OpenFlowVersion) (OpenFlowMessage, error)
- func ParseOpenFlowMessage(data []byte) (OpenFlowMessage, error)
- func ReadOpenFlowMessage(r io.Reader) (OpenFlowMessage, error)
- type OpenFlowMetadata
- type OpenFlowProtocolError
- type OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) Actions() *OpenFlowActionsBuilder
- func (b *OpenFlowRuleBuilder) Cookie(cookie uint64) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) CookieMask(mask uint64) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *OpenFlowRuleBuilder) EthType(value uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) Execute(ctx context.Context) error
- func (b *OpenFlowRuleBuilder) Flow() OpenFlowFlow
- func (b *OpenFlowRuleBuilder) IPProto(proto uint8) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) IPv4Dst(cidr string) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) IPv4Src(cidr string) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) InPort(port uint32) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *OpenFlowRuleBuilder) Priority(priority uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) TCPDst(port uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) TCPSrc(port uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) Table(id uint8) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) UDPDst(port uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) UDPSrc(port uint16) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) Validate() error
- func (b *OpenFlowRuleBuilder) WithLabel(key, value string) *OpenFlowRuleBuilder
- func (b *OpenFlowRuleBuilder) WithOwner(kind, name string) *OpenFlowRuleBuilder
- type OpenFlowRuleRef
- type OpenFlowSession
- func (s *OpenFlowSession) AddFlow(ctx context.Context, flow OpenFlowFlow) error
- func (s *OpenFlowSession) Close() error
- func (s *OpenFlowSession) DeleteFlow(ctx context.Context, flow OpenFlowFlow) error
- func (s *OpenFlowSession) DumpFlows(ctx context.Context, request OpenFlowFlowStatsRequest) ([]OpenFlowMessage, error)
- func (s *OpenFlowSession) Handshake(ctx context.Context) error
- func (s *OpenFlowSession) ModifyFlowStrict(ctx context.Context, flow OpenFlowFlow) error
- func (s *OpenFlowSession) Version() OpenFlowVersion
- type OpenFlowVersion
- type OpenVSwitch
- type OwnerRef
- type OwnershipAuditFinding
- type OwnershipAuditOptions
- type OwnershipAuditReport
- type OwnershipAuditResource
- type OwnershipAuditSummary
- type Plan
- type PlannedOperation
- type PortBindingEvent
- type PortGroup
- type PortGroupBuilder
- func (b *PortGroupBuilder) Execute(ctx context.Context) error
- func (b *PortGroupBuilder) WithACL(direction string, priority int, match, action string) *PortGroupBuilder
- func (b *PortGroupBuilder) WithACLExternalID(key, value string) *PortGroupBuilder
- func (b *PortGroupBuilder) WithACLUUID(uuid string) *PortGroupBuilder
- func (b *PortGroupBuilder) WithExternalID(key, value string) *PortGroupBuilder
- func (b *PortGroupBuilder) WithPortUUID(uuid string) *PortGroupBuilder
- type PortGroupRef
- type ProviderNetwork
- type ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *ProviderNetworkBuilder) Execute(ctx context.Context) error
- func (b *ProviderNetworkBuilder) OnLogicalSwitch(name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *ProviderNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *ProviderNetworkBuilder) UseBridge(name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) Validate() error
- func (b *ProviderNetworkBuilder) WithBridge(name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) WithLabel(key, value string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) WithLocalnetPort(name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) WithLogicalSwitch(name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) WithOwner(kind, name string) *ProviderNetworkBuilder
- func (b *ProviderNetworkBuilder) WithPhysicalNetwork(name string) *ProviderNetworkBuilder
- type ProviderNetworkPatch
- type ProviderNetworkRef
- func (r *ProviderNetworkRef) Apply(ctx context.Context, network ProviderNetwork) error
- func (r *ProviderNetworkRef) Delete(ctx context.Context) error
- func (r *ProviderNetworkRef) Ensure() *ProviderNetworkBuilder
- func (r *ProviderNetworkRef) Get(ctx context.Context) (*ProviderNetwork, error)
- func (r *ProviderNetworkRef) Inspect(ctx context.Context) (InspectResult, error)
- func (r *ProviderNetworkRef) Patch(ctx context.Context, patch ProviderNetworkPatch) (*ProviderNetwork, error)
- type ProviderNetworkStatus
- type QoS
- type QoSBuilder
- func (b *QoSBuilder) AttachToSwitch(name string) *QoSBuilder
- func (b *QoSBuilder) Execute(ctx context.Context) error
- func (b *QoSBuilder) WithBurst(burst int) *QoSBuilder
- func (b *QoSBuilder) WithDSCP(value int) *QoSBuilder
- func (b *QoSBuilder) WithDirection(direction string) *QoSBuilder
- func (b *QoSBuilder) WithExternalID(key, value string) *QoSBuilder
- func (b *QoSBuilder) WithMark(value int) *QoSBuilder
- func (b *QoSBuilder) WithMatch(match string) *QoSBuilder
- func (b *QoSBuilder) WithPriority(priority int) *QoSBuilder
- func (b *QoSBuilder) WithRate(rate int) *QoSBuilder
- type QoSPolicy
- type QoSPolicyBuilder
- func (b *QoSPolicyBuilder) AddRule(rule QoSRule) *QoSPolicyBuilder
- func (b *QoSPolicyBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *QoSPolicyBuilder) Execute(ctx context.Context) error
- func (b *QoSPolicyBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *QoSPolicyBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *QoSPolicyBuilder) Validate() error
- func (b *QoSPolicyBuilder) WithLabel(key, value string) *QoSPolicyBuilder
- func (b *QoSPolicyBuilder) WithOwner(kind, name string) *QoSPolicyBuilder
- type QoSPolicyPatch
- type QoSPolicyRef
- func (r *QoSPolicyRef) Apply(ctx context.Context, policy QoSPolicy) error
- func (r *QoSPolicyRef) Delete(ctx context.Context) error
- func (r *QoSPolicyRef) Ensure() *QoSPolicyBuilder
- func (r *QoSPolicyRef) Get(ctx context.Context) (*QoSPolicy, error)
- func (r *QoSPolicyRef) Patch(ctx context.Context, patch QoSPolicyPatch) (*QoSPolicy, error)
- type QoSRef
- type QoSRule
- type RBACPermissionEvent
- type RBACRoleEvent
- type ReconcileResult
- type ResourceStatusState
- type Row
- type RowEvent
- type SBBFD
- type SBChassis
- type SBClient
- func (s *SBClient) BFD(logicalPort string) *TableRef
- func (s *SBClient) Chassis(name string) *TableRef
- func (s *SBClient) Connection(target string) *TableRef
- func (s *SBClient) DNS(name string) *TableRef
- func (s *SBClient) Datapath(uuid string) *TableRef
- func (s *SBClient) Encap(ip string) *TableRef
- func (s *SBClient) FDB(mac string) *TableRef
- func (s *SBClient) GetBFD(ctx context.Context, logicalPort, dstIP string, srcPort, disc int) (*SBBFD, error)
- func (s *SBClient) GetChassis(ctx context.Context, name string) (*SBChassis, error)
- func (s *SBClient) GetDNS(ctx context.Context, uuid string) (*SBDNS, error)
- func (s *SBClient) GetDatapath(ctx context.Context, tunnelKey int) (*SBDatapathBinding, error)
- func (s *SBClient) GetDatapathByUUID(ctx context.Context, uuid string) (*SBDatapathBinding, error)
- func (s *SBClient) GetFDB(ctx context.Context, mac string, dpKey int) (*SBFDB, error)
- func (s *SBClient) GetLogicalFlow(ctx context.Context, uuid string) (*SBLogicalFlow, error)
- func (s *SBClient) GetMACBinding(ctx context.Context, logicalPort, ip string) (*SBMACBinding, error)
- func (s *SBClient) GetMeter(ctx context.Context, name string) (*SBMeter, error)
- func (s *SBClient) GetMeterBand(ctx context.Context, uuid string) (*SBMeterBand, error)
- func (s *SBClient) GetMulticastGroup(ctx context.Context, datapath string, tunnelKey int) (*SBMulticastGroup, error)
- func (s *SBClient) GetPortBinding(ctx context.Context, logicalPort string) (*SBPortBinding, error)
- func (s *SBClient) GetRBACPermission(ctx context.Context, uuid string) (*SBRBACPermission, error)
- func (s *SBClient) GetRBACRole(ctx context.Context, name string) (*SBRBACRole, error)
- func (s *SBClient) GetServiceMonitor(ctx context.Context, logicalPort, ip, protocol string, port int) (*SBServiceMonitor, error)
- func (s *SBClient) ListBFD(ctx context.Context) ([]SBBFD, error)
- func (s *SBClient) ListChassis(ctx context.Context) ([]SBChassis, error)
- func (s *SBClient) ListDNS(ctx context.Context) ([]SBDNS, error)
- func (s *SBClient) ListDatapaths(ctx context.Context) ([]SBDatapathBinding, error)
- func (s *SBClient) ListFDB(ctx context.Context) ([]SBFDB, error)
- func (s *SBClient) ListLogicalFlows(ctx context.Context) ([]SBLogicalFlow, error)
- func (s *SBClient) ListMACBindings(ctx context.Context) ([]SBMACBinding, error)
- func (s *SBClient) ListMeterBands(ctx context.Context) ([]SBMeterBand, error)
- func (s *SBClient) ListMeters(ctx context.Context) ([]SBMeter, error)
- func (s *SBClient) ListMulticastGroups(ctx context.Context) ([]SBMulticastGroup, error)
- func (s *SBClient) ListPortBindings(ctx context.Context) ([]SBPortBinding, error)
- func (s *SBClient) ListRBACPermissions(ctx context.Context) ([]SBRBACPermission, error)
- func (s *SBClient) ListRBACRoles(ctx context.Context) ([]SBRBACRole, error)
- func (s *SBClient) ListServiceMonitors(ctx context.Context) ([]SBServiceMonitor, error)
- func (s *SBClient) LogicalFlow(uuid string) *TableRef
- func (s *SBClient) MACBinding(logicalPort string) *TableRef
- func (s *SBClient) Meter(name string) *TableRef
- func (s *SBClient) MulticastGroup(name string) *TableRef
- func (s *SBClient) PortBinding(logicalPort string) *TableRef
- func (s *SBClient) RBACPermission(uuid string) *TableRef
- func (s *SBClient) RBACRole(name string) *TableRef
- func (s *SBClient) SBGlobal() *TableRef
- func (s *SBClient) SSL() *TableRef
- func (s *SBClient) ServiceMonitor(logicalPort string) *TableRef
- func (s *SBClient) Table(table string) *TableRef
- func (s *SBClient) TableBy(table, column, value string) *TableRef
- func (s *SBClient) WatchBFD(ctx context.Context) (<-chan BFDEvent, <-chan error)
- func (s *SBClient) WatchChassis(ctx context.Context) (<-chan ChassisEvent, <-chan error)
- func (s *SBClient) WatchDNS(ctx context.Context) (<-chan DNSEvent, <-chan error)
- func (s *SBClient) WatchDatapaths(ctx context.Context) (<-chan DatapathEvent, <-chan error)
- func (s *SBClient) WatchFDB(ctx context.Context) (<-chan FDBEvent, <-chan error)
- func (s *SBClient) WatchLogicalFlows(ctx context.Context) (<-chan LogicalFlowEvent, <-chan error)
- func (s *SBClient) WatchMACBindings(ctx context.Context) (<-chan MACBindingEvent, <-chan error)
- func (s *SBClient) WatchMeterBands(ctx context.Context) (<-chan MeterBandEvent, <-chan error)
- func (s *SBClient) WatchMeters(ctx context.Context) (<-chan MeterEvent, <-chan error)
- func (s *SBClient) WatchMulticastGroups(ctx context.Context) (<-chan MulticastGroupEvent, <-chan error)
- func (s *SBClient) WatchPortBindings(ctx context.Context) (<-chan PortBindingEvent, <-chan error)
- func (s *SBClient) WatchRBACPermissions(ctx context.Context) (<-chan RBACPermissionEvent, <-chan error)
- func (s *SBClient) WatchRBACRoles(ctx context.Context) (<-chan RBACRoleEvent, <-chan error)
- func (s *SBClient) WatchServiceMonitors(ctx context.Context) (<-chan ServiceMonitorEvent, <-chan error)
- func (s *SBClient) WatchTable(ctx context.Context, table string) (<-chan RowEvent, <-chan error)
- type SBDNS
- type SBDatapathBinding
- type SBFDB
- type SBLogicalFlow
- type SBMACBinding
- type SBMeter
- type SBMeterBand
- type SBMulticastGroup
- type SBPortBinding
- type SBRBACPermission
- type SBRBACRole
- type SBServiceMonitor
- type SDWANAgent
- type SDWANAgentCapabilities
- type SDWANAgentHeartbeat
- type SDWANAgentStatus
- type SDWANApplyPlan
- type SDWANAssignment
- type SDWANAssignmentStatus
- type SDWANAssignmentStatusState
- type SDWANBackend
- type SDWANClient
- type SDWANControlPlane
- type SDWANDeleteBuilder
- type SDWANLayer
- type SDWANLink
- type SDWANLinkStatus
- type SDWANNetwork
- type SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) AddLink(link SDWANLink) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) AddPolicy(name string, policy SDWANPolicy) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) AddSite(name string, site SDWANSite) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) Apply(ctx context.Context) error
- func (b *SDWANNetworkBuilder) ApplyPlan(ctx context.Context) (SDWANApplyPlan, error)
- func (b *SDWANNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *SDWANNetworkBuilder) Execute(ctx context.Context) error
- func (b *SDWANNetworkBuilder) Layer2() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) Layer3() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) PathModeAuto() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) PathModeDirect() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) PathModeRelay() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) PathModeTransit() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *SDWANNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *SDWANNetworkBuilder) TopologyFullMesh() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) TopologyHubSpoke() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) TopologyPartialMesh() *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) Validate() error
- func (b *SDWANNetworkBuilder) WithLabel(key, value string) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithLayer(layer SDWANLayer) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithLinkAttribute(linkName, key, value string) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithOwner(kind, name string) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithPathMode(mode SDWANPathMode) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithSiteAttribute(siteName, key, value string) *SDWANNetworkBuilder
- func (b *SDWANNetworkBuilder) WithTransport(transport SDWANTransport) *SDWANNetworkBuilder
- type SDWANNetworkRef
- type SDWANOperation
- type SDWANPathMode
- type SDWANPolicy
- type SDWANSite
- type SDWANSiteStatus
- type SDWANStatus
- type SDWANTopology
- type SDWANTransport
- type SchemaRegistry
- func (s *SchemaRegistry) Columns(table string) []string
- func (s *SchemaRegistry) Database() string
- func (s *SchemaRegistry) HasColumn(table, column string) bool
- func (s *SchemaRegistry) HasTable(table string) bool
- func (s *SchemaRegistry) ReferenceColumnInfos(table, refTable string) []referenceColumnInfo
- func (s *SchemaRegistry) ReferenceColumns(table, refTable string) []string
- func (s *SchemaRegistry) RequireColumns(table string, columns ...string) error
- func (s *SchemaRegistry) RequireConditionColumns(table string, conditions ...libovsdb.Condition) error
- func (s *SchemaRegistry) RequireTable(table string) error
- func (s *SchemaRegistry) Tables() []string
- func (s *SchemaRegistry) Version() string
- type SecurityPolicy
- type SecurityPolicyBuilder
- func (b *SecurityPolicyBuilder) AddRule(rule SecurityRule) *SecurityPolicyBuilder
- func (b *SecurityPolicyBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *SecurityPolicyBuilder) Execute(ctx context.Context) error
- func (b *SecurityPolicyBuilder) ForSubject(subject string) *SecurityPolicyBuilder
- func (b *SecurityPolicyBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *SecurityPolicyBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *SecurityPolicyBuilder) Validate() error
- func (b *SecurityPolicyBuilder) WithLabel(key, value string) *SecurityPolicyBuilder
- func (b *SecurityPolicyBuilder) WithOwner(kind, name string) *SecurityPolicyBuilder
- type SecurityPolicyPatch
- type SecurityPolicyRef
- func (r *SecurityPolicyRef) Apply(ctx context.Context, policy SecurityPolicy) error
- func (r *SecurityPolicyRef) Delete(ctx context.Context) error
- func (r *SecurityPolicyRef) Ensure() *SecurityPolicyBuilder
- func (r *SecurityPolicyRef) Get(ctx context.Context) (*SecurityPolicy, error)
- func (r *SecurityPolicyRef) Inspect(ctx context.Context) (InspectResult, error)
- func (r *SecurityPolicyRef) Patch(ctx context.Context, patch SecurityPolicyPatch) (*SecurityPolicy, error)
- type SecurityRule
- type ServiceBackend
- type ServiceMonitorEvent
- type ServicePatch
- type ServicePort
- type ServiceVIP
- type StatusFinding
- type TableBuilder
- func (b *TableBuilder) DeleteMap(column string, values map[string]string) *TableBuilder
- func (b *TableBuilder) DeleteSet(column string, values ...any) *TableBuilder
- func (b *TableBuilder) DeleteUUIDSet(column string, uuids ...string) *TableBuilder
- func (b *TableBuilder) Execute(ctx context.Context) error
- func (b *TableBuilder) MutateMap(column string, values map[string]string) *TableBuilder
- func (b *TableBuilder) MutateSet(column string, values ...any) *TableBuilder
- func (b *TableBuilder) MutateUUIDSet(column string, uuids ...string) *TableBuilder
- func (b *TableBuilder) SelectColumns(columns ...string) *TableBuilder
- func (b *TableBuilder) WithACL(direction string, priority int, match, action string) *TableBuilder
- func (b *TableBuilder) WithAction(action string) *TableBuilder
- func (b *TableBuilder) WithAddressSetAddresses(addresses ...string) *TableBuilder
- func (b *TableBuilder) WithAddresses(addresses ...string) *TableBuilder
- func (b *TableBuilder) WithBFDLogicalPort(port string) *TableBuilder
- func (b *TableBuilder) WithBFDStatus(status string) *TableBuilder
- func (b *TableBuilder) WithChassis(uuid string) *TableBuilder
- func (b *TableBuilder) WithColumn(column string, value any) *TableBuilder
- func (b *TableBuilder) WithController(target string) *TableBuilder
- func (b *TableBuilder) WithDHCPOption(key, value string) *TableBuilder
- func (b *TableBuilder) WithDNSRecord(name, value string) *TableBuilder
- func (b *TableBuilder) WithDatapath(uuid string) *TableBuilder
- func (b *TableBuilder) WithDirection(direction string) *TableBuilder
- func (b *TableBuilder) WithEncap(kind, ip string) *TableBuilder
- func (b *TableBuilder) WithExternalID(key, value string) *TableBuilder
- func (b *TableBuilder) WithGatewayPriority(priority int) *TableBuilder
- func (b *TableBuilder) WithLogicalPort(port string) *TableBuilder
- func (b *TableBuilder) WithMAC(mac string) *TableBuilder
- func (b *TableBuilder) WithManager(target string) *TableBuilder
- func (b *TableBuilder) WithMatch(match string) *TableBuilder
- func (b *TableBuilder) WithMirrorSelectAll() *TableBuilder
- func (b *TableBuilder) WithNAT(kind, logicalIP, externalIP string) *TableBuilder
- func (b *TableBuilder) WithName(name string) *TableBuilder
- func (b *TableBuilder) WithNetworks(networks ...string) *TableBuilder
- func (b *TableBuilder) WithOption(key, value string) *TableBuilder
- func (b *TableBuilder) WithOptionalColumn(column string, value any) *TableBuilder
- func (b *TableBuilder) WithPortGroupPorts(portUUIDs ...string) *TableBuilder
- func (b *TableBuilder) WithPriority(priority int) *TableBuilder
- func (b *TableBuilder) WithQoSType(kind string) *TableBuilder
- func (b *TableBuilder) WithQueueDSCP(dscp int) *TableBuilder
- func (b *TableBuilder) WithQueueOtherConfig(key, value string) *TableBuilder
- func (b *TableBuilder) WithRouterPort(mac string, networks ...string) *TableBuilder
- func (b *TableBuilder) WithSamplingTarget(target string) *TableBuilder
- func (b *TableBuilder) WithTarget(target string) *TableBuilder
- func (b *TableBuilder) WithTier(tier int) *TableBuilder
- func (b *TableBuilder) WithType(kind string) *TableBuilder
- func (b *TableBuilder) WithUUIDRef(column, uuid string) *TableBuilder
- func (b *TableBuilder) WithUUIDSet(column string, uuids ...string) *TableBuilder
- func (b *TableBuilder) WithVIP(vip, backends string) *TableBuilder
- type TableRef
- func (r *TableRef) AddUUID(column, uuid string) *TableBuilder
- func (r *TableRef) Create() *TableBuilder
- func (r *TableRef) Delete() *TableBuilder
- func (r *TableRef) DeleteUUID(column, uuid string) *TableBuilder
- func (r *TableRef) Ensure() *TableBuilder
- func (r *TableRef) Get(ctx context.Context) (Row, error)
- func (r *TableRef) List(ctx context.Context) ([]Row, error)
- func (r *TableRef) Update() *TableBuilder
- func (r *TableRef) Watch(ctx context.Context) (<-chan RowEvent, <-chan error)
- func (r *TableRef) Where(column string, value any) *TableRef
- func (r *TableRef) WhereCondition(column string, fn libovsdb.ConditionFunction, value any) *TableRef
- func (r *TableRef) WhereConditions(conditions ...libovsdb.Condition) *TableRef
- type VirtualNetwork
- type VirtualNetworkBuilder
- func (b *VirtualNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *VirtualNetworkBuilder) Execute(ctx context.Context) error
- func (b *VirtualNetworkBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *VirtualNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *VirtualNetworkBuilder) Validate() error
- func (b *VirtualNetworkBuilder) WithCIDR(cidr string) *VirtualNetworkBuilder
- func (b *VirtualNetworkBuilder) WithDNS(name string, configure func(*LogicalSwitchDNSBuilder)) *VirtualNetworkBuilder
- func (b *VirtualNetworkBuilder) WithGateway(ip string) *VirtualNetworkBuilder
- func (b *VirtualNetworkBuilder) WithLabel(key, value string) *VirtualNetworkBuilder
- func (b *VirtualNetworkBuilder) WithOwner(kind, name string) *VirtualNetworkBuilder
- type VirtualNetworkPatch
- type VirtualNetworkRef
- func (r *VirtualNetworkRef) Apply(ctx context.Context, network VirtualNetwork) error
- func (r *VirtualNetworkRef) Delete(ctx context.Context) error
- func (r *VirtualNetworkRef) Ensure() *VirtualNetworkBuilder
- func (r *VirtualNetworkRef) Get(ctx context.Context) (*VirtualNetwork, error)
- func (r *VirtualNetworkRef) Inspect(ctx context.Context) (InspectResult, error)
- func (r *VirtualNetworkRef) Patch(ctx context.Context, patch VirtualNetworkPatch) (*VirtualNetwork, error)
- type WorkloadAttachment
- type WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) DryRun(ctx context.Context) (DryRunResult, error)
- func (b *WorkloadAttachmentBuilder) Execute(ctx context.Context) error
- func (b *WorkloadAttachmentBuilder) OnNetwork(name string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) Plan(ctx context.Context) (Plan, error)
- func (b *WorkloadAttachmentBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
- func (b *WorkloadAttachmentBuilder) SyncLocalOVS(bridge string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) Validate() error
- func (b *WorkloadAttachmentBuilder) WithIP(ip string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithInterface(name string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithLabel(key, value string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithMAC(mac string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithOVSInterface(name string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithOVSInterfaceType(kind string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithOVSOption(key, value string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithOVSPort(name string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithOwner(kind, name string) *WorkloadAttachmentBuilder
- func (b *WorkloadAttachmentBuilder) WithWorkload(name string) *WorkloadAttachmentBuilder
- type WorkloadAttachmentPatch
- type WorkloadAttachmentRef
- func (r *WorkloadAttachmentRef) Apply(ctx context.Context, attachment WorkloadAttachment) error
- func (r *WorkloadAttachmentRef) Delete(ctx context.Context) error
- func (r *WorkloadAttachmentRef) DetachLocalOVS(ctx context.Context) error
- func (r *WorkloadAttachmentRef) Ensure() *WorkloadAttachmentBuilder
- func (r *WorkloadAttachmentRef) Get(ctx context.Context) (*WorkloadAttachment, error)
- func (r *WorkloadAttachmentRef) Inspect(ctx context.Context) (InspectResult, error)
- func (r *WorkloadAttachmentRef) Patch(ctx context.Context, patch WorkloadAttachmentPatch) (*WorkloadAttachment, error)
- type WorkloadLocalOVS
- type WorkloadPathStatus
Examples ¶
Constants ¶
const ( DoctorInfo DoctorSeverity = "info" DoctorWarning DoctorSeverity = "warning" DoctorError DoctorSeverity = "error" DiagnosticPass DiagnosticStatus = "pass" DiagnosticWarn DiagnosticStatus = "warn" DiagnosticFail DiagnosticStatus = "fail" DiagnosticSkip DiagnosticStatus = "skip" DiagnosticCheckConnections DiagnosticCheck = "connections" DiagnosticCheckSchema DiagnosticCheck = "schema" DiagnosticCheckCounts DiagnosticCheck = "counts" DiagnosticCheckBindings DiagnosticCheck = "bindings" DiagnosticCheckBridgeMapping DiagnosticCheck = "bridge_mappings" DiagnosticCheckHeavyTables DiagnosticCheck = "heavy_tables" )
const ( EnvV2SchemaChecks = "OVNFLOW_V2_SCHEMA_CHECKS" EnvV2MutationChecks = "OVNFLOW_V2_MUTATION_CHECKS" EnvLinuxRouterChecks = "OVNFLOW_LINUX_ROUTER_CHECKS" EnvLinuxRouterNATBackend = "OVNFLOW_NAT_BACKEND" EnvOpenFlowChecks = "OVNFLOW_OPENFLOW_CHECKS" EnvSDWANBackendChecks = "OVNFLOW_SDWAN_BACKEND_CHECKS" EnvSDWANPrivilegedChecks = "OVNFLOW_SDWAN_PRIVILEGED_CHECKS" EnvWireGuardChecks = "OVNFLOW_WIREGUARD_CHECKS" EnvOVSTunnelChecks = "OVNFLOW_OVS_TUNNEL_CHECKS" EnvLinuxRouteChecks = "OVNFLOW_LINUX_ROUTE_CHECKS" NATBackendAuto = "auto" NATBackendNFTables = "nftables" NATBackendIPTables = "iptables" )
const ( // EnvOVSAddr points at the Open_vSwitch OVSDB endpoint, for example // tcp:172.27.192.120:6640. EnvOVSAddr = "OVNFLOW_OVS_ADDR" // EnvOVNNBAddr points at the OVN Northbound OVSDB endpoint, for example // tcp:172.27.192.120:6641. EnvOVNNBAddr = "OVNFLOW_OVN_NB_ADDR" // EnvOVNSBAddr points at the OVN Southbound OVSDB endpoint, for example // tcp:172.27.192.120:6642. EnvOVNSBAddr = "OVNFLOW_OVN_SB_ADDR" // EnvOpenFlowAddr points at an OpenFlow controller endpoint exposed by OVS, // for example tcp:127.0.0.1:6653. EnvOpenFlowAddr = "OVNFLOW_OPENFLOW_ADDR" // EnvTestResourcePrefix controls the prefix used for all integration-test // rows created in OVN and OVS. EnvTestResourcePrefix = "OVNFLOW_TEST_PREFIX" // EnvTestBridge controls the dedicated OVS bridge used by integration tests. EnvTestBridge = "OVNFLOW_TEST_BRIDGE" // EnvAllowBRInt must be set to a truthy value before integration tests are // allowed to target br-int directly. EnvAllowBRInt = "OVNFLOW_ALLOW_BR_INT" // EnvRequireIntegration turns endpoint/SDK connection skips into failures. // CI and release gates should enable it so regressions cannot hide behind // skipped integration tests. EnvRequireIntegration = "OVNFLOW_REQUIRE_INTEGRATION" )
const ( DefaultIntegrationResourcePrefix = "ovnflow-it-" DefaultIntegrationBridge = "br-ovnflow-it" )
const ( OpenFlowPortAny uint32 = 0xffffffff OpenFlowGroupAny uint32 = 0xffffffff OpenFlowControllerPort uint32 = 0xfffffffd )
const ( ExternalIDPrefix = "ovnflow.io/" ExternalIDManagedByKey = ExternalIDPrefix + "managed-by" ExternalIDAPIVersionKey = ExternalIDPrefix + "api-version" ExternalIDKindKey = ExternalIDPrefix + "kind" ExternalIDNameKey = ExternalIDPrefix + "name" ExternalIDOwnerKindKey = ExternalIDPrefix + "owner-kind" ExternalIDOwnerNameKey = ExternalIDPrefix + "owner-name" ExternalIDOwnerIDKey = ExternalIDPrefix + "owner-id" ExternalIDLabelPrefix = ExternalIDPrefix + "label/" )
const ( SDWANAgentFeatureWireGuard = "wireguard" SDWANAgentFeatureLinuxRoute = "linux-route" SDWANAgentFeatureOVSTunnel = "ovs-tunnel" SDWANAgentFeatureOpenFlow = "openflow" )
Variables ¶
var ( ErrAlreadyExists = &Error{Kind: ErrorAlreadyExists} ErrNotFound = &Error{Kind: ErrorNotFound} ErrConflict = &Error{Kind: ErrorConflict} ErrInvalidSchema = &Error{Kind: ErrorInvalidSchema} ErrTimeout = &Error{Kind: ErrorTimeout} ErrCanceled = &Error{Kind: ErrorCanceled} ErrPartial = &Error{Kind: ErrorPartial} ErrValidation = &Error{Kind: ErrorValidation} ErrUnsupported = &Error{Kind: ErrorUnsupported} ErrPermissionDenied = &Error{Kind: ErrorPermissionDenied} ErrAmbiguous = &Error{Kind: ErrorAmbiguous} ErrOwnershipViolation = &Error{Kind: ErrorOwnershipViolation} )
Functions ¶
func EnvGateEnabled ¶
func ExternalIDLabelKey ¶
ExternalIDLabelKey encodes an arbitrary label key as an external_ids key. The suffix is raw URL-safe base64 without padding.
func FormatBridgeMappings ¶
func IsReservedExternalIDKey ¶
func MarshalOpenFlowMessage ¶ added in v2.2.0
func MarshalOpenFlowMessage(msg OpenFlowMessage) ([]byte, error)
func ParseOpenFlowMultipartReply ¶ added in v2.2.0
func ParseOpenFlowMultipartReply(msg OpenFlowMessage) (uint16, uint16, []byte, error)
func ValidNATBackend ¶
func WriteOpenFlowMessage ¶ added in v2.2.0
func WriteOpenFlowMessage(w io.Writer, msg OpenFlowMessage) error
Types ¶
type ACL ¶
type ACL struct {
UUID string `ovsdb:"_uuid"`
Name *string `ovsdb:"name"`
Priority int `ovsdb:"priority"`
Direction string `ovsdb:"direction"`
Match string `ovsdb:"match"`
Action string `ovsdb:"action"`
Log bool `ovsdb:"log"`
Meter *string `ovsdb:"meter"`
Severity *string `ovsdb:"severity"`
Label int `ovsdb:"label"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
Tier int
Options map[string]string
}
ACL is an OVN Northbound ACL model. Version-specific fields are decoded by the runtime fluent layer and intentionally left out of the libovsdb cache model so older schemas can still connect.
type ACLBuilder ¶
type ACLBuilder struct {
// contains filtered or unexported fields
}
ACLBuilder builds ACL operations.
func (*ACLBuilder) WithAction ¶
func (b *ACLBuilder) WithAction(action string) *ACLBuilder
func (*ACLBuilder) WithDirection ¶
func (b *ACLBuilder) WithDirection(direction string) *ACLBuilder
func (*ACLBuilder) WithExternalID ¶
func (b *ACLBuilder) WithExternalID(key, value string) *ACLBuilder
func (*ACLBuilder) WithLabel ¶
func (b *ACLBuilder) WithLabel(label int) *ACLBuilder
func (*ACLBuilder) WithLog ¶
func (b *ACLBuilder) WithLog(log bool) *ACLBuilder
func (*ACLBuilder) WithMatch ¶
func (b *ACLBuilder) WithMatch(match string) *ACLBuilder
func (*ACLBuilder) WithMeter ¶
func (b *ACLBuilder) WithMeter(meter string) *ACLBuilder
func (*ACLBuilder) WithOption ¶
func (b *ACLBuilder) WithOption(key, value string) *ACLBuilder
func (*ACLBuilder) WithPriority ¶
func (b *ACLBuilder) WithPriority(priority int) *ACLBuilder
func (*ACLBuilder) WithSeverity ¶
func (b *ACLBuilder) WithSeverity(severity string) *ACLBuilder
func (*ACLBuilder) WithTier ¶
func (b *ACLBuilder) WithTier(tier int) *ACLBuilder
type ACLRef ¶
type ACLRef struct {
// contains filtered or unexported fields
}
ACLRef identifies an ACL row by direction, priority, match, and optional name.
func (*ACLRef) Create ¶
func (r *ACLRef) Create() *ACLBuilder
func (*ACLRef) Delete ¶
func (r *ACLRef) Delete() *ACLBuilder
func (*ACLRef) Ensure ¶
func (r *ACLRef) Ensure() *ACLBuilder
type AddressSet ¶
type AddressSet struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Addresses []string `ovsdb:"addresses"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
AddressSet is an OVN Northbound Address_Set model.
type AddressSetBuilder ¶
type AddressSetBuilder struct {
// contains filtered or unexported fields
}
AddressSetBuilder builds Address_Set operations.
func (*AddressSetBuilder) WithAddress ¶
func (b *AddressSetBuilder) WithAddress(address string) *AddressSetBuilder
func (*AddressSetBuilder) WithAddresses ¶
func (b *AddressSetBuilder) WithAddresses(addresses ...string) *AddressSetBuilder
func (*AddressSetBuilder) WithExternalID ¶
func (b *AddressSetBuilder) WithExternalID(key, value string) *AddressSetBuilder
type AddressSetRef ¶
type AddressSetRef struct {
// contains filtered or unexported fields
}
AddressSetRef identifies one Address_Set row by name.
func (*AddressSetRef) Create ¶
func (r *AddressSetRef) Create() *AddressSetBuilder
func (*AddressSetRef) Delete ¶
func (r *AddressSetRef) Delete() *AddressSetBuilder
func (*AddressSetRef) Ensure ¶
func (r *AddressSetRef) Ensure() *AddressSetBuilder
type AdoptCandidate ¶ added in v2.1.0
type AdoptCandidate struct {
Database string `json:"database"`
Table string `json:"table"`
UUID string `json:"uuid,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
Owner OwnerRef `json:"owner"`
Owned bool `json:"owned"`
MarkerComplete bool `json:"marker_complete"`
Risk CleanupRisk `json:"risk"`
RecommendedAction CleanupAction `json:"recommended_action"`
Reasons []string `json:"reasons,omitempty"`
Resource OwnershipAuditResource `json:"resource"`
}
type AdoptPlan ¶ added in v2.1.0
type AdoptPlan struct {
Candidates []AdoptCandidate `json:"candidates"`
Findings []OwnershipAuditFinding `json:"findings,omitempty"`
ReadOnly bool `json:"read_only"`
}
func NewAdoptPlanFromAudit ¶ added in v2.1.0
func NewAdoptPlanFromAudit(audit *OwnershipAuditReport, opts AdoptPlanOptions) *AdoptPlan
func (*AdoptPlan) ExecutableCandidates ¶ added in v2.1.0
func (p *AdoptPlan) ExecutableCandidates() []AdoptCandidate
type AdoptPlanOptions ¶ added in v2.1.0
type AdoptPlanOptions struct {
Audit *OwnershipAuditReport
Owner OwnerRef
Kinds []string
Names []string
}
type BFD ¶
type BFD struct {
UUID string `ovsdb:"_uuid"`
LogicalPort string `ovsdb:"logical_port"`
DstIP string `ovsdb:"dst_ip"`
MinTx *int `ovsdb:"min_tx"`
MinRx *int `ovsdb:"min_rx"`
DetectMult *int `ovsdb:"detect_mult"`
Status *string `ovsdb:"status"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
BFD is an OVN Northbound BFD model.
type BFDBuilder ¶
type BFDBuilder struct {
// contains filtered or unexported fields
}
BFDBuilder builds BFD operations.
func (*BFDBuilder) WithDetectMult ¶
func (b *BFDBuilder) WithDetectMult(value int) *BFDBuilder
func (*BFDBuilder) WithExternalID ¶
func (b *BFDBuilder) WithExternalID(key, value string) *BFDBuilder
func (*BFDBuilder) WithMinRx ¶
func (b *BFDBuilder) WithMinRx(value int) *BFDBuilder
func (*BFDBuilder) WithMinTx ¶
func (b *BFDBuilder) WithMinTx(value int) *BFDBuilder
func (*BFDBuilder) WithOption ¶
func (b *BFDBuilder) WithOption(key, value string) *BFDBuilder
func (*BFDBuilder) WithStatus ¶
func (b *BFDBuilder) WithStatus(status string) *BFDBuilder
type BFDRef ¶
type BFDRef struct {
// contains filtered or unexported fields
}
BFDRef identifies one BFD row by logical_port and dst_ip.
func (*BFDRef) Create ¶
func (r *BFDRef) Create() *BFDBuilder
func (*BFDRef) Delete ¶
func (r *BFDRef) Delete() *BFDBuilder
func (*BFDRef) Ensure ¶
func (r *BFDRef) Ensure() *BFDBuilder
type BridgeBuilder ¶
type BridgeBuilder struct {
// contains filtered or unexported fields
}
func (*BridgeBuilder) AddPort ¶
func (b *BridgeBuilder) AddPort(name string) *OVSPortBuilder
func (*BridgeBuilder) WithAutoAttach ¶
func (b *BridgeBuilder) WithAutoAttach(systemName string, configure func(*TableBuilder)) *BridgeBuilder
func (*BridgeBuilder) WithControllerTarget ¶
func (b *BridgeBuilder) WithControllerTarget(target string) *BridgeBuilder
func (*BridgeBuilder) WithDatapathType ¶
func (b *BridgeBuilder) WithDatapathType(kind string) *BridgeBuilder
func (*BridgeBuilder) WithExternalID ¶
func (b *BridgeBuilder) WithExternalID(key, value string) *BridgeBuilder
func (*BridgeBuilder) WithFailMode ¶
func (b *BridgeBuilder) WithFailMode(mode string) *BridgeBuilder
func (*BridgeBuilder) WithFlowTable ¶
func (b *BridgeBuilder) WithFlowTable(tableID int, name string, configure func(*TableBuilder)) *BridgeBuilder
func (*BridgeBuilder) WithIPFIX ¶
func (b *BridgeBuilder) WithIPFIX(name string, configure func(*TableBuilder)) *BridgeBuilder
func (*BridgeBuilder) WithMirror ¶
func (b *BridgeBuilder) WithMirror(name string, configure func(*TableBuilder)) *BridgeBuilder
func (*BridgeBuilder) WithNetFlow ¶
func (b *BridgeBuilder) WithNetFlow(name string, configure func(*TableBuilder)) *BridgeBuilder
func (*BridgeBuilder) WithSFlow ¶
func (b *BridgeBuilder) WithSFlow(name string, configure func(*TableBuilder)) *BridgeBuilder
type BridgeRef ¶
type BridgeRef struct {
// contains filtered or unexported fields
}
func (*BridgeRef) AddPort ¶
func (r *BridgeRef) AddPort(name string) *OVSPortBuilder
func (*BridgeRef) Delete ¶
func (r *BridgeRef) Delete() *BridgeBuilder
func (*BridgeRef) DeletePort ¶
func (r *BridgeRef) DeletePort(name string) *BridgeBuilder
func (*BridgeRef) Ensure ¶
func (r *BridgeRef) Ensure() *BridgeBuilder
type ChassisEvent ¶
type CleanupAction ¶ added in v2.1.0
type CleanupAction string
const ( CleanupActionKeep CleanupAction = "keep" CleanupActionReview CleanupAction = "review" CleanupActionDeleteOwned CleanupAction = "delete_owned" AdoptActionImport CleanupAction = "import" AdoptActionCompleteMarker CleanupAction = "complete_marker" )
type CleanupCandidate ¶ added in v2.1.0
type CleanupCandidate struct {
Database string `json:"database"`
Table string `json:"table"`
UUID string `json:"uuid,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
Owner OwnerRef `json:"owner"`
Owned bool `json:"owned"`
MarkerComplete bool `json:"marker_complete"`
Risk CleanupRisk `json:"risk"`
RecommendedAction CleanupAction `json:"recommended_action"`
Reasons []string `json:"reasons,omitempty"`
Resource OwnershipAuditResource `json:"resource"`
}
type CleanupPlan ¶ added in v2.1.0
type CleanupPlan struct {
Candidates []CleanupCandidate `json:"candidates"`
Findings []OwnershipAuditFinding `json:"findings,omitempty"`
ReadOnly bool `json:"read_only"`
}
func NewCleanupPlanFromAudit ¶ added in v2.1.0
func NewCleanupPlanFromAudit(audit *OwnershipAuditReport, opts CleanupPlanOptions) *CleanupPlan
func (*CleanupPlan) ExecutableCandidates ¶ added in v2.1.0
func (p *CleanupPlan) ExecutableCandidates() []CleanupCandidate
type CleanupPlanOptions ¶ added in v2.1.0
type CleanupPlanOptions struct {
Audit *OwnershipAuditReport
Owner OwnerRef
Kinds []string
Names []string
}
type CleanupRisk ¶ added in v2.1.0
type CleanupRisk string
const ( CleanupRiskLow CleanupRisk = "low" CleanupRiskMedium CleanupRisk = "medium" CleanupRiskHigh CleanupRisk = "high" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the public SDK entrypoint.
func (*Client) CleanupPlan ¶ added in v2.1.0
func (c *Client) CleanupPlan(ctx context.Context, opts CleanupPlanOptions) (*CleanupPlan, error)
func (*Client) Diagnostics ¶
func (c *Client) Diagnostics() *Diagnostics
func (*Client) NetworkStatus ¶ added in v2.1.0
func (*Client) OpenFlow ¶ added in v2.2.0
func (c *Client) OpenFlow() *OpenFlowClient
OpenFlow returns native OpenFlow APIs for local Open_vSwitch bridges.
func (*Client) ProviderNetwork ¶
func (c *Client) ProviderNetwork(name string) *ProviderNetworkRef
func (*Client) ProviderNetworkStatus ¶ added in v2.1.0
func (*Client) SDWAN ¶ added in v2.2.0
func (c *Client) SDWAN() *SDWANClient
func (*Client) UseSDWANBackend ¶ added in v2.2.0
func (c *Client) UseSDWANBackend(backend SDWANBackend) *Client
UseSDWANBackend sets the backend used by Client.SDWAN.
func (*Client) WorkloadAttachment ¶
func (c *Client) WorkloadAttachment(name string) *WorkloadAttachmentRef
func (*Client) WorkloadPath ¶ added in v2.1.0
type Config ¶
type Config struct {
OVSAddr string
OVNNBAddr string
OVNSBAddr string
OpenFlow OpenFlowConfig
SDWAN SDWANBackend
}
Config configures the three OVSDB connections used by ovnflow.
func ConfigFromEnv ¶
func ConfigFromEnv() Config
ConfigFromEnv loads the SDK configuration from the same environment variables used by the Windows + WSL integration tests.
type DHCPOptions ¶
type DHCPOptions struct {
UUID string `ovsdb:"_uuid"`
CIDR string `ovsdb:"cidr"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
DHCPOptions is an OVN Northbound DHCP_Options model.
type DHCPOptionsBuilder ¶
type DHCPOptionsBuilder struct {
// contains filtered or unexported fields
}
DHCPOptionsBuilder builds DHCP_Options operations.
func (*DHCPOptionsBuilder) Execute ¶
func (b *DHCPOptionsBuilder) Execute(ctx context.Context) error
func (*DHCPOptionsBuilder) WithExternalID ¶
func (b *DHCPOptionsBuilder) WithExternalID(key, value string) *DHCPOptionsBuilder
func (*DHCPOptionsBuilder) WithOption ¶
func (b *DHCPOptionsBuilder) WithOption(key, value string) *DHCPOptionsBuilder
type DHCPOptionsRef ¶
type DHCPOptionsRef struct {
// contains filtered or unexported fields
}
DHCPOptionsRef identifies one DHCP_Options row by cidr.
func (*DHCPOptionsRef) Create ¶
func (r *DHCPOptionsRef) Create() *DHCPOptionsBuilder
func (*DHCPOptionsRef) Delete ¶
func (r *DHCPOptionsRef) Delete() *DHCPOptionsBuilder
func (*DHCPOptionsRef) Ensure ¶
func (r *DHCPOptionsRef) Ensure() *DHCPOptionsBuilder
type DNS ¶
type DNS struct {
UUID string `ovsdb:"_uuid"`
Records map[string]string `ovsdb:"records"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
Options map[string]string
}
DNS is an OVN Northbound DNS model.
type DNSBuilder ¶
type DNSBuilder struct {
// contains filtered or unexported fields
}
DNSBuilder builds DNS operations.
func (*DNSBuilder) WithExternalID ¶
func (b *DNSBuilder) WithExternalID(key, value string) *DNSBuilder
func (*DNSBuilder) WithOption ¶
func (b *DNSBuilder) WithOption(key, value string) *DNSBuilder
func (*DNSBuilder) WithRecord ¶
func (b *DNSBuilder) WithRecord(name, value string) *DNSBuilder
type DNSRef ¶
type DNSRef struct {
// contains filtered or unexported fields
}
DNSRef identifies one DNS row by external_ids name when supplied.
func (*DNSRef) Create ¶
func (r *DNSRef) Create() *DNSBuilder
func (*DNSRef) Delete ¶
func (r *DNSRef) Delete() *DNSBuilder
func (*DNSRef) Ensure ¶
func (r *DNSRef) Ensure() *DNSBuilder
type DatapathEvent ¶
type DatapathEvent struct {
Type EventType
Old *SBDatapathBinding
New *SBDatapathBinding
}
type DiagnosticCheck ¶
type DiagnosticCheck string
type DiagnosticCheckResult ¶
type DiagnosticCheckResult struct {
Name DiagnosticCheck `json:"name"`
Status DiagnosticStatus `json:"status"`
Message string `json:"message,omitempty"`
}
type DiagnosticStatus ¶
type DiagnosticStatus string
type Diagnostics ¶
type Diagnostics struct {
// contains filtered or unexported fields
}
func (*Diagnostics) AuditOwnership ¶
func (d *Diagnostics) AuditOwnership(ctx context.Context, opts OwnershipAuditOptions) (*OwnershipAuditReport, error)
func (*Diagnostics) Doctor ¶
func (d *Diagnostics) Doctor(ctx context.Context, opts DoctorOptions) (*DoctorReport, error)
type Diff ¶
type Diff struct {
Resource string
Name string
Changes []DiffChange
}
type DiffChange ¶
type DoctorDatabaseReport ¶
type DoctorFinding ¶
type DoctorNorthboundReport ¶
type DoctorNorthboundReport struct {
LogicalSwitches int `json:"logical_switches"`
LogicalSwitchPorts int `json:"logical_switch_ports"`
LogicalRouters int `json:"logical_routers"`
LogicalRouterPorts int `json:"logical_router_ports"`
ACLs int `json:"acls"`
NATs int `json:"nats"`
LoadBalancers int `json:"load_balancers"`
DNSRecords int `json:"dns_records"`
DHCPOptions int `json:"dhcp_options"`
ProviderLocalnetPorts int `json:"provider_localnet_ports"`
}
type DoctorOVSReport ¶
type DoctorOptions ¶
type DoctorOptions struct {
Checks []DiagnosticCheck
IncludeHeavy bool
}
type DoctorReport ¶
type DoctorReport struct {
Databases map[string]DoctorDatabaseReport `json:"databases"`
TableRows map[string]map[string]int `json:"table_rows"`
Checks []DiagnosticCheckResult `json:"checks"`
Northbound DoctorNorthboundReport `json:"northbound"`
Southbound DoctorSouthboundReport `json:"southbound"`
OVS DoctorOVSReport `json:"ovs"`
Findings []DoctorFinding `json:"findings"`
}
type DoctorSeverity ¶
type DoctorSeverity string
type DoctorSouthboundReport ¶
type DoctorSouthboundReport struct {
Chassis int `json:"chassis"`
Datapaths int `json:"datapaths"`
PortBindings int `json:"port_bindings"`
BoundPortBindings int `json:"bound_port_bindings"`
UnboundPortBindings int `json:"unbound_port_bindings"`
LogicalFlows int `json:"logical_flows"`
ServiceMonitors int `json:"service_monitors"`
}
type DryRunResult ¶
type Error ¶
type Error struct {
Kind ErrorKind
Database string
Table string
Operation string
Object string
Message string
Err error
}
Error is a typed error suitable for controller retry and branching logic.
type ErrorKind ¶
type ErrorKind string
ErrorKind classifies errors returned by ovnflow.
const ( ErrorAlreadyExists ErrorKind = "already_exists" ErrorNotFound ErrorKind = "not_found" ErrorConflict ErrorKind = "conflict" ErrorInvalidSchema ErrorKind = "invalid_schema" ErrorTimeout ErrorKind = "timeout" ErrorCanceled ErrorKind = "canceled" ErrorPartial ErrorKind = "partial_success" ErrorValidation ErrorKind = "validation" ErrorUnsupported ErrorKind = "unsupported" ErrorPermissionDenied ErrorKind = "permission_denied" ErrorAmbiguous ErrorKind = "ambiguous" ErrorOwnershipViolation ErrorKind = "ownership_violation" )
type GatewayChassis ¶
type GatewayChassis struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
ChassisName string `ovsdb:"chassis_name"`
Priority int `ovsdb:"priority"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
GatewayChassis is an OVN Northbound Gateway_Chassis model.
type GatewayChassisBuilder ¶
type GatewayChassisBuilder struct {
// contains filtered or unexported fields
}
GatewayChassisBuilder builds Gateway_Chassis operations.
func (*GatewayChassisBuilder) Execute ¶
func (b *GatewayChassisBuilder) Execute(ctx context.Context) error
func (*GatewayChassisBuilder) WithChassisName ¶
func (b *GatewayChassisBuilder) WithChassisName(name string) *GatewayChassisBuilder
func (*GatewayChassisBuilder) WithExternalID ¶
func (b *GatewayChassisBuilder) WithExternalID(key, value string) *GatewayChassisBuilder
func (*GatewayChassisBuilder) WithOption ¶
func (b *GatewayChassisBuilder) WithOption(key, value string) *GatewayChassisBuilder
func (*GatewayChassisBuilder) WithPriority ¶
func (b *GatewayChassisBuilder) WithPriority(priority int) *GatewayChassisBuilder
type GatewayChassisRef ¶
type GatewayChassisRef struct {
// contains filtered or unexported fields
}
GatewayChassisRef identifies one Gateway_Chassis row by name.
func (*GatewayChassisRef) Create ¶
func (r *GatewayChassisRef) Create() *GatewayChassisBuilder
func (*GatewayChassisRef) Delete ¶
func (r *GatewayChassisRef) Delete() *GatewayChassisBuilder
func (*GatewayChassisRef) Ensure ¶
func (r *GatewayChassisRef) Ensure() *GatewayChassisBuilder
type HAChassis ¶
type HAChassis struct {
UUID string `ovsdb:"_uuid"`
ChassisName string `ovsdb:"chassis_name"`
Priority int `ovsdb:"priority"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
HAChassis is an OVN Northbound HA_Chassis model.
type HAChassisBuilder ¶
type HAChassisBuilder struct {
// contains filtered or unexported fields
}
HAChassisBuilder builds HA_Chassis operations.
func (*HAChassisBuilder) WithExternalID ¶
func (b *HAChassisBuilder) WithExternalID(key, value string) *HAChassisBuilder
func (*HAChassisBuilder) WithPriority ¶
func (b *HAChassisBuilder) WithPriority(priority int) *HAChassisBuilder
type HAChassisGroup ¶
type HAChassisGroup struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
HAChassis []string `ovsdb:"ha_chassis"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
HAChassisGroup is an OVN Northbound HA_Chassis_Group model.
type HAChassisGroupBuilder ¶
type HAChassisGroupBuilder struct {
// contains filtered or unexported fields
}
HAChassisGroupBuilder builds HA_Chassis_Group operations.
func (*HAChassisGroupBuilder) Execute ¶
func (b *HAChassisGroupBuilder) Execute(ctx context.Context) error
func (*HAChassisGroupBuilder) WithExternalID ¶
func (b *HAChassisGroupBuilder) WithExternalID(key, value string) *HAChassisGroupBuilder
func (*HAChassisGroupBuilder) WithHAChassisUUID ¶
func (b *HAChassisGroupBuilder) WithHAChassisUUID(uuid string) *HAChassisGroupBuilder
type HAChassisGroupRef ¶
type HAChassisGroupRef struct {
// contains filtered or unexported fields
}
HAChassisGroupRef identifies one HA_Chassis_Group row by name.
func (*HAChassisGroupRef) Create ¶
func (r *HAChassisGroupRef) Create() *HAChassisGroupBuilder
func (*HAChassisGroupRef) Delete ¶
func (r *HAChassisGroupRef) Delete() *HAChassisGroupBuilder
func (*HAChassisGroupRef) Ensure ¶
func (r *HAChassisGroupRef) Ensure() *HAChassisGroupBuilder
type HAChassisRef ¶
type HAChassisRef struct {
// contains filtered or unexported fields
}
HAChassisRef identifies one HA_Chassis row by chassis_name.
func (*HAChassisRef) Create ¶
func (r *HAChassisRef) Create() *HAChassisBuilder
func (*HAChassisRef) Delete ¶
func (r *HAChassisRef) Delete() *HAChassisBuilder
func (*HAChassisRef) Ensure ¶
func (r *HAChassisRef) Ensure() *HAChassisBuilder
type IPAMPool ¶ added in v2.1.0
type IPAMPool struct {
CIDR string
Gateway string
Reserved []string
Allocated []string
Excluded []string
}
IPAMPool describes an in-memory IPv4 address pool for preflight planning.
Gateway defaults to the first usable address in CIDR when omitted. Reserved and Excluded addresses are never allocated. Allocated is updated by Allocate and Release, but no state is persisted outside this struct.
func NewIPAMPool ¶ added in v2.1.0
NewIPAMPool returns a pool with the requested CIDR. The pool is validated by planning and allocation helpers so callers can build it incrementally.
func (*IPAMPool) Allocate ¶ added in v2.1.0
Allocate reserves the requested IPv4 address, or the next sequential address when requested is omitted. The returned address is appended to pool.Allocated.
func (IPAMPool) Available ¶ added in v2.1.0
Available reports the number of currently allocatable IPv4 addresses.
type IPAllocationPlan ¶ added in v2.1.0
type IPAllocationPlan struct {
PoolCIDR string
Gateway string
Reserved []string
Allocated []string
Excluded []string
Available int
Next string
}
IPAllocationPlan is a snapshot of an IPAMPool's effective allocation state.
func PlanIPAllocation ¶ added in v2.1.0
func PlanIPAllocation(pool IPAMPool) (IPAllocationPlan, error)
PlanIPAllocation validates pool and returns its effective gateway, exclusions, availability count, and next sequential allocation candidate.
type InMemorySDWANBackend ¶ added in v2.2.0
type InMemorySDWANBackend struct {
// contains filtered or unexported fields
}
func NewInMemorySDWANBackend ¶ added in v2.2.0
func NewInMemorySDWANBackend() *InMemorySDWANBackend
func (*InMemorySDWANBackend) ApplySDWAN ¶ added in v2.2.0
func (b *InMemorySDWANBackend) ApplySDWAN(_ context.Context, network SDWANNetwork, plan SDWANApplyPlan) error
func (*InMemorySDWANBackend) DeleteSDWAN ¶ added in v2.2.0
func (b *InMemorySDWANBackend) DeleteSDWAN(_ context.Context, name string) error
func (*InMemorySDWANBackend) GetSDWAN ¶ added in v2.2.0
func (b *InMemorySDWANBackend) GetSDWAN(_ context.Context, name string) (*SDWANNetwork, error)
func (*InMemorySDWANBackend) LastPlan ¶ added in v2.2.0
func (b *InMemorySDWANBackend) LastPlan(name string) (SDWANApplyPlan, bool)
type InMemorySDWANControlPlane ¶ added in v2.3.0
type InMemorySDWANControlPlane struct {
// contains filtered or unexported fields
}
func NewInMemorySDWANControlPlane ¶ added in v2.3.0
func NewInMemorySDWANControlPlane() *InMemorySDWANControlPlane
func (*InMemorySDWANControlPlane) AckAssignment ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) AckAssignment(_ context.Context, id string, status SDWANAssignmentStatus) (*SDWANAssignment, error)
func (*InMemorySDWANControlPlane) AssignSDWAN ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) AssignSDWAN(_ context.Context, agentID string, network SDWANNetwork, plan SDWANApplyPlan) (*SDWANAssignment, error)
func (*InMemorySDWANControlPlane) GetAgent ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) GetAgent(_ context.Context, id string) (*SDWANAgent, error)
func (*InMemorySDWANControlPlane) GetAssignment ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) GetAssignment(_ context.Context, id string) (*SDWANAssignment, error)
func (*InMemorySDWANControlPlane) Heartbeat ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) Heartbeat(_ context.Context, hb SDWANAgentHeartbeat) (*SDWANAgent, error)
func (*InMemorySDWANControlPlane) ListAgents ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) ListAgents(context.Context) ([]SDWANAgent, error)
func (*InMemorySDWANControlPlane) ListAssignments ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) ListAssignments(_ context.Context, agentID string) ([]SDWANAssignment, error)
func (*InMemorySDWANControlPlane) RegisterAgent ¶ added in v2.3.0
func (c *InMemorySDWANControlPlane) RegisterAgent(_ context.Context, agent SDWANAgent) (*SDWANAgent, error)
type InspectResult ¶
type IntegrationConfig ¶
type IntegrationConfig struct {
OVSAddr string
OVNNBAddr string
OVNSBAddr string
OpenFlowAddr string
ResourcePrefix string
BridgeName string
AllowBRInt bool
Require bool
}
IntegrationConfig contains the environment-driven settings shared by all integration tests. It deliberately avoids hard-coded WSL addresses because WSL IP addresses can change after restart.
func LoadIntegrationConfigFromEnv ¶
func LoadIntegrationConfigFromEnv() IntegrationConfig
LoadIntegrationConfigFromEnv reads the Windows + WSL integration-test configuration from environment variables.
func (IntegrationConfig) MissingEndpoints ¶
func (c IntegrationConfig) MissingEndpoints() []string
MissingEndpoints returns the required endpoint environment variables that are not configured. Integration tests should skip when this list is non-empty.
func (IntegrationConfig) ShouldRequireEndpoints ¶
func (c IntegrationConfig) ShouldRequireEndpoints() bool
ShouldRequireEndpoints reports whether integration endpoint failures should fail the test process instead of being reported as skips.
func (IntegrationConfig) Validate ¶
func (c IntegrationConfig) Validate() error
Validate rejects configuration that could accidentally target production-like OVS resources.
type IntentAction ¶
type IntentAction string
const ( IntentActionEnsure IntentAction = "ensure" IntentActionDelete IntentAction = "delete" IntentActionInspect IntentAction = "inspect" IntentActionPatch IntentAction = "patch" )
type Labels ¶
Labels carries portable grouping metadata without embedding private platform concepts in the SDK.
type LoadBalancer ¶
type LoadBalancer struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
VIPs map[string]string `ovsdb:"vips"`
Protocol *string `ovsdb:"protocol"`
SelectionFields []string `ovsdb:"selection_fields"`
IPPortMappings map[string]string `ovsdb:"ip_port_mappings"`
HealthCheck []string `ovsdb:"health_check"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
LoadBalancer is an OVN Northbound Load_Balancer model.
type LoadBalancerBuilder ¶
type LoadBalancerBuilder struct {
// contains filtered or unexported fields
}
LoadBalancerBuilder builds Load_Balancer operations.
func (*LoadBalancerBuilder) AttachToRouter ¶
func (b *LoadBalancerBuilder) AttachToRouter(name string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) Execute ¶
func (b *LoadBalancerBuilder) Execute(ctx context.Context) error
func (*LoadBalancerBuilder) WithExternalID ¶
func (b *LoadBalancerBuilder) WithExternalID(key, value string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithHealthCheckUUID ¶
func (b *LoadBalancerBuilder) WithHealthCheckUUID(uuid string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithIPPortMapping ¶
func (b *LoadBalancerBuilder) WithIPPortMapping(endpoint, mapping string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithOption ¶
func (b *LoadBalancerBuilder) WithOption(key, value string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithProtocol ¶
func (b *LoadBalancerBuilder) WithProtocol(protocol string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithSelectionField ¶
func (b *LoadBalancerBuilder) WithSelectionField(field string) *LoadBalancerBuilder
func (*LoadBalancerBuilder) WithVIP ¶
func (b *LoadBalancerBuilder) WithVIP(vip, backends string) *LoadBalancerBuilder
type LoadBalancerRef ¶
type LoadBalancerRef struct {
// contains filtered or unexported fields
}
LoadBalancerRef identifies one Load_Balancer row by name.
func (*LoadBalancerRef) Create ¶
func (r *LoadBalancerRef) Create() *LoadBalancerBuilder
func (*LoadBalancerRef) Delete ¶
func (r *LoadBalancerRef) Delete() *LoadBalancerBuilder
func (*LoadBalancerRef) Ensure ¶
func (r *LoadBalancerRef) Ensure() *LoadBalancerBuilder
type LogicalFlowEvent ¶
type LogicalFlowEvent struct {
Type EventType
Old *SBLogicalFlow
New *SBLogicalFlow
}
type LogicalRouter ¶
type LogicalRouter struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Ports []string `ovsdb:"ports"`
StaticRoutes []string `ovsdb:"static_routes"`
NAT []string `ovsdb:"nat"`
LoadBalancers []string `ovsdb:"load_balancer"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
LogicalRouter is an OVN Northbound Logical_Router model.
type LogicalRouterBuilder ¶
type LogicalRouterBuilder struct {
// contains filtered or unexported fields
}
LogicalRouterBuilder builds Logical_Router operations.
func (*LogicalRouterBuilder) Execute ¶
func (b *LogicalRouterBuilder) Execute(ctx context.Context) error
func (*LogicalRouterBuilder) WithExternalID ¶
func (b *LogicalRouterBuilder) WithExternalID(key, value string) *LogicalRouterBuilder
func (*LogicalRouterBuilder) WithLoadBalancerUUID ¶
func (b *LogicalRouterBuilder) WithLoadBalancerUUID(uuid string) *LogicalRouterBuilder
func (*LogicalRouterBuilder) WithNATUUID ¶
func (b *LogicalRouterBuilder) WithNATUUID(uuid string) *LogicalRouterBuilder
func (*LogicalRouterBuilder) WithOption ¶
func (b *LogicalRouterBuilder) WithOption(key, value string) *LogicalRouterBuilder
func (*LogicalRouterBuilder) WithPortUUID ¶
func (b *LogicalRouterBuilder) WithPortUUID(uuid string) *LogicalRouterBuilder
type LogicalRouterPort ¶
type LogicalRouterPort struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
MAC string `ovsdb:"mac"`
Networks []string `ovsdb:"networks"`
GatewayChassis []string `ovsdb:"gateway_chassis"`
HAChassisGroup *string `ovsdb:"ha_chassis_group"`
Peer *string `ovsdb:"peer"`
Enabled *bool `ovsdb:"enabled"`
IPv6Prefix []string `ovsdb:"ipv6_prefix"`
IPv6RAConfigs map[string]string `ovsdb:"ipv6_ra_configs"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
LogicalRouterPort is an OVN Northbound Logical_Router_Port model.
type LogicalRouterPortBuilder ¶
type LogicalRouterPortBuilder struct {
// contains filtered or unexported fields
}
LogicalRouterPortBuilder builds Logical_Router_Port operations.
func (*LogicalRouterPortBuilder) AttachToRouter ¶
func (b *LogicalRouterPortBuilder) AttachToRouter(name string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) Execute ¶
func (b *LogicalRouterPortBuilder) Execute(ctx context.Context) error
func (*LogicalRouterPortBuilder) WithEnabled ¶
func (b *LogicalRouterPortBuilder) WithEnabled(enabled bool) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithExternalID ¶
func (b *LogicalRouterPortBuilder) WithExternalID(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithGatewayChassis ¶
func (b *LogicalRouterPortBuilder) WithGatewayChassis(name, chassisName string, priority int) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithGatewayChassisExternalID ¶
func (b *LogicalRouterPortBuilder) WithGatewayChassisExternalID(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithGatewayChassisOption ¶
func (b *LogicalRouterPortBuilder) WithGatewayChassisOption(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithGatewayChassisUUID ¶
func (b *LogicalRouterPortBuilder) WithGatewayChassisUUID(uuid string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithHAChassis ¶
func (b *LogicalRouterPortBuilder) WithHAChassis(chassisName string, priority int) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithHAChassisExternalID ¶
func (b *LogicalRouterPortBuilder) WithHAChassisExternalID(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithHAChassisGroup ¶
func (b *LogicalRouterPortBuilder) WithHAChassisGroup(name string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithHAChassisGroupExternalID ¶
func (b *LogicalRouterPortBuilder) WithHAChassisGroupExternalID(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithHAChassisGroupUUID ¶
func (b *LogicalRouterPortBuilder) WithHAChassisGroupUUID(uuid string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithIPv6Prefix ¶
func (b *LogicalRouterPortBuilder) WithIPv6Prefix(prefix string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithIPv6RAConfig ¶
func (b *LogicalRouterPortBuilder) WithIPv6RAConfig(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithMAC ¶
func (b *LogicalRouterPortBuilder) WithMAC(mac string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithNetwork ¶
func (b *LogicalRouterPortBuilder) WithNetwork(network string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithNetworks ¶
func (b *LogicalRouterPortBuilder) WithNetworks(networks ...string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithOption ¶
func (b *LogicalRouterPortBuilder) WithOption(key, value string) *LogicalRouterPortBuilder
func (*LogicalRouterPortBuilder) WithPeer ¶
func (b *LogicalRouterPortBuilder) WithPeer(peer string) *LogicalRouterPortBuilder
type LogicalRouterPortRef ¶
type LogicalRouterPortRef struct {
// contains filtered or unexported fields
}
LogicalRouterPortRef identifies one Logical_Router_Port row by name.
func (*LogicalRouterPortRef) Create ¶
func (r *LogicalRouterPortRef) Create() *LogicalRouterPortBuilder
func (*LogicalRouterPortRef) Delete ¶
func (r *LogicalRouterPortRef) Delete() *LogicalRouterPortBuilder
func (*LogicalRouterPortRef) Ensure ¶
func (r *LogicalRouterPortRef) Ensure() *LogicalRouterPortBuilder
type LogicalRouterRef ¶
type LogicalRouterRef struct {
// contains filtered or unexported fields
}
LogicalRouterRef identifies one Logical_Router row by name.
func (*LogicalRouterRef) Create ¶
func (r *LogicalRouterRef) Create() *LogicalRouterBuilder
func (*LogicalRouterRef) Delete ¶
func (r *LogicalRouterRef) Delete() *LogicalRouterBuilder
func (*LogicalRouterRef) Ensure ¶
func (r *LogicalRouterRef) Ensure() *LogicalRouterBuilder
type LogicalSwitch ¶
type LogicalSwitch struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Ports []string `ovsdb:"ports"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
LogicalSwitch is the v0.1 OVN Northbound Logical_Switch model.
type LogicalSwitchBuilder ¶
type LogicalSwitchBuilder struct {
// contains filtered or unexported fields
}
func (*LogicalSwitchBuilder) AddLocalnetPort ¶
func (b *LogicalSwitchBuilder) AddLocalnetPort(name, networkName string) *LogicalSwitchPortBuilder
func (*LogicalSwitchBuilder) AddPort ¶
func (b *LogicalSwitchBuilder) AddPort(name string) *LogicalSwitchPortBuilder
func (*LogicalSwitchBuilder) Execute ¶
func (b *LogicalSwitchBuilder) Execute(ctx context.Context) error
Execute commits the logical switch operation.
func (*LogicalSwitchBuilder) WithExternalID ¶
func (b *LogicalSwitchBuilder) WithExternalID(key, value string) *LogicalSwitchBuilder
func (*LogicalSwitchBuilder) WithSubnet ¶
func (b *LogicalSwitchBuilder) WithSubnet(cidr string) *LogicalSwitchBuilder
type LogicalSwitchDNS ¶
func (LogicalSwitchDNS) RecordMap ¶
func (d LogicalSwitchDNS) RecordMap() map[string][]string
func (LogicalSwitchDNS) Validate ¶
func (d LogicalSwitchDNS) Validate() error
type LogicalSwitchDNSBuilder ¶
type LogicalSwitchDNSBuilder struct {
// contains filtered or unexported fields
}
func (*LogicalSwitchDNSBuilder) AddRecord ¶
func (b *LogicalSwitchDNSBuilder) AddRecord(domain string, ips ...string) *LogicalSwitchDNSBuilder
func (*LogicalSwitchDNSBuilder) DryRun ¶
func (b *LogicalSwitchDNSBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*LogicalSwitchDNSBuilder) Plan ¶
func (b *LogicalSwitchDNSBuilder) Plan(ctx context.Context) (Plan, error)
func (*LogicalSwitchDNSBuilder) Reconcile ¶
func (b *LogicalSwitchDNSBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*LogicalSwitchDNSBuilder) Validate ¶
func (b *LogicalSwitchDNSBuilder) Validate() error
func (*LogicalSwitchDNSBuilder) WithLabel ¶
func (b *LogicalSwitchDNSBuilder) WithLabel(key, value string) *LogicalSwitchDNSBuilder
func (*LogicalSwitchDNSBuilder) WithOwner ¶
func (b *LogicalSwitchDNSBuilder) WithOwner(kind, name string) *LogicalSwitchDNSBuilder
type LogicalSwitchDNSPatch ¶
type LogicalSwitchDNSRef ¶
type LogicalSwitchDNSRef struct {
// contains filtered or unexported fields
}
func (*LogicalSwitchDNSRef) Apply ¶
func (r *LogicalSwitchDNSRef) Apply(ctx context.Context, dns LogicalSwitchDNS) error
func (*LogicalSwitchDNSRef) Delete ¶
func (r *LogicalSwitchDNSRef) Delete(ctx context.Context) error
func (*LogicalSwitchDNSRef) Ensure ¶
func (r *LogicalSwitchDNSRef) Ensure() *LogicalSwitchDNSBuilder
func (*LogicalSwitchDNSRef) Get ¶
func (r *LogicalSwitchDNSRef) Get(ctx context.Context) (*LogicalSwitchDNS, error)
func (*LogicalSwitchDNSRef) Inspect ¶
func (r *LogicalSwitchDNSRef) Inspect(ctx context.Context) (InspectResult, error)
func (*LogicalSwitchDNSRef) Patch ¶
func (r *LogicalSwitchDNSRef) Patch(ctx context.Context, patch LogicalSwitchDNSPatch) (*LogicalSwitchDNS, error)
type LogicalSwitchPort ¶
type LogicalSwitchPort struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Addresses []string `ovsdb:"addresses"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
Options map[string]string `ovsdb:"options"`
Type string `ovsdb:"type"`
}
LogicalSwitchPort is the v0.1 OVN Northbound Logical_Switch_Port model.
type LogicalSwitchPortBuilder ¶
type LogicalSwitchPortBuilder struct {
// contains filtered or unexported fields
}
func (*LogicalSwitchPortBuilder) AsLocalnet ¶
func (p *LogicalSwitchPortBuilder) AsLocalnet(networkName string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) Execute ¶
func (p *LogicalSwitchPortBuilder) Execute(ctx context.Context) error
func (*LogicalSwitchPortBuilder) WithAddress ¶
func (p *LogicalSwitchPortBuilder) WithAddress(mac, ip string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithAddresses ¶
func (p *LogicalSwitchPortBuilder) WithAddresses(addresses ...string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithExternalID ¶
func (p *LogicalSwitchPortBuilder) WithExternalID(key, value string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithIP ¶
func (p *LogicalSwitchPortBuilder) WithIP(ip string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithMac ¶
func (p *LogicalSwitchPortBuilder) WithMac(mac string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithOption ¶
func (p *LogicalSwitchPortBuilder) WithOption(key, value string) *LogicalSwitchPortBuilder
func (*LogicalSwitchPortBuilder) WithType ¶
func (p *LogicalSwitchPortBuilder) WithType(kind string) *LogicalSwitchPortBuilder
type LogicalSwitchRef ¶
type LogicalSwitchRef struct {
// contains filtered or unexported fields
}
func (*LogicalSwitchRef) Create ¶
func (r *LogicalSwitchRef) Create() *LogicalSwitchBuilder
func (*LogicalSwitchRef) Delete ¶
func (r *LogicalSwitchRef) Delete() *LogicalSwitchBuilder
func (*LogicalSwitchRef) Ensure ¶
func (r *LogicalSwitchRef) Ensure() *LogicalSwitchBuilder
type MACBindingEvent ¶
type MACBindingEvent struct {
Type EventType
Old *SBMACBinding
New *SBMACBinding
}
type Meter ¶
type Meter struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Unit string `ovsdb:"unit"`
Bands []string `ovsdb:"bands"`
Fair *bool `ovsdb:"fair"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
Meter is an OVN Northbound Meter model.
type MeterBand ¶
type MeterBand struct {
UUID string `ovsdb:"_uuid"`
Action string `ovsdb:"action"`
Rate int `ovsdb:"rate"`
BurstSize int `ovsdb:"burst_size"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
MeterBand is an OVN Northbound Meter_Band model.
type MeterBandBuilder ¶
type MeterBandBuilder struct {
// contains filtered or unexported fields
}
MeterBandBuilder builds Meter_Band operations.
func (*MeterBandBuilder) WithAction ¶
func (b *MeterBandBuilder) WithAction(action string) *MeterBandBuilder
func (*MeterBandBuilder) WithBurstSize ¶
func (b *MeterBandBuilder) WithBurstSize(size int) *MeterBandBuilder
func (*MeterBandBuilder) WithExternalID ¶
func (b *MeterBandBuilder) WithExternalID(key, value string) *MeterBandBuilder
func (*MeterBandBuilder) WithRate ¶
func (b *MeterBandBuilder) WithRate(rate int) *MeterBandBuilder
type MeterBandEvent ¶
type MeterBandEvent struct {
Type EventType
Old *SBMeterBand
New *SBMeterBand
}
type MeterBandRef ¶
type MeterBandRef struct {
// contains filtered or unexported fields
}
MeterBandRef identifies Meter_Band rows by an SDK supplied external ID.
func (*MeterBandRef) Create ¶
func (r *MeterBandRef) Create() *MeterBandBuilder
func (*MeterBandRef) Delete ¶
func (r *MeterBandRef) Delete() *MeterBandBuilder
func (*MeterBandRef) Ensure ¶
func (r *MeterBandRef) Ensure() *MeterBandBuilder
type MeterBuilder ¶
type MeterBuilder struct {
// contains filtered or unexported fields
}
MeterBuilder builds Meter operations.
func (*MeterBuilder) WithBand ¶
func (b *MeterBuilder) WithBand(action string, rate int) *MeterBuilder
func (*MeterBuilder) WithBandExternalID ¶
func (b *MeterBuilder) WithBandExternalID(key, value string) *MeterBuilder
func (*MeterBuilder) WithBandUUID ¶
func (b *MeterBuilder) WithBandUUID(uuid string) *MeterBuilder
func (*MeterBuilder) WithExternalID ¶
func (b *MeterBuilder) WithExternalID(key, value string) *MeterBuilder
func (*MeterBuilder) WithFair ¶
func (b *MeterBuilder) WithFair(fair bool) *MeterBuilder
func (*MeterBuilder) WithNamedBand ¶
func (b *MeterBuilder) WithNamedBand(name, action string, rate int) *MeterBuilder
func (*MeterBuilder) WithUnit ¶
func (b *MeterBuilder) WithUnit(unit string) *MeterBuilder
type MeterEvent ¶
type MeterRef ¶
type MeterRef struct {
// contains filtered or unexported fields
}
MeterRef identifies one Meter row by name.
func (*MeterRef) Create ¶
func (r *MeterRef) Create() *MeterBuilder
func (*MeterRef) Delete ¶
func (r *MeterRef) Delete() *MeterBuilder
func (*MeterRef) Ensure ¶
func (r *MeterRef) Ensure() *MeterBuilder
type MulticastGroupEvent ¶
type MulticastGroupEvent struct {
Type EventType
Old *SBMulticastGroup
New *SBMulticastGroup
}
type NAT ¶
type NAT struct {
UUID string `ovsdb:"_uuid"`
Type string `ovsdb:"type"`
LogicalIP string `ovsdb:"logical_ip"`
ExternalIP string `ovsdb:"external_ip"`
LogicalPort *string `ovsdb:"logical_port"`
ExternalMAC *string `ovsdb:"external_mac"`
ExternalPortRange string `ovsdb:"external_port_range"`
AllowedExtIPs *string `ovsdb:"allowed_ext_ips"`
ExemptedExtIPs *string `ovsdb:"exempted_ext_ips"`
Match string `ovsdb:"match"`
Priority int `ovsdb:"priority"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
GatewayPort *string
}
NAT is an OVN Northbound NAT model.
type NATBuilder ¶
type NATBuilder struct {
// contains filtered or unexported fields
}
NATBuilder builds NAT operations.
func (*NATBuilder) AttachToRouter ¶
func (b *NATBuilder) AttachToRouter(name string) *NATBuilder
func (*NATBuilder) WithAllowedExternalIPsUUID ¶
func (b *NATBuilder) WithAllowedExternalIPsUUID(uuid string) *NATBuilder
func (*NATBuilder) WithExemptedExternalIPsUUID ¶
func (b *NATBuilder) WithExemptedExternalIPsUUID(uuid string) *NATBuilder
func (*NATBuilder) WithExternalID ¶
func (b *NATBuilder) WithExternalID(key, value string) *NATBuilder
func (*NATBuilder) WithExternalIP ¶
func (b *NATBuilder) WithExternalIP(ip string) *NATBuilder
func (*NATBuilder) WithExternalMAC ¶
func (b *NATBuilder) WithExternalMAC(mac string) *NATBuilder
func (*NATBuilder) WithExternalPortRange ¶
func (b *NATBuilder) WithExternalPortRange(portRange string) *NATBuilder
func (*NATBuilder) WithGatewayPortUUID ¶
func (b *NATBuilder) WithGatewayPortUUID(uuid string) *NATBuilder
func (*NATBuilder) WithLogicalIP ¶
func (b *NATBuilder) WithLogicalIP(ip string) *NATBuilder
func (*NATBuilder) WithLogicalPort ¶
func (b *NATBuilder) WithLogicalPort(port string) *NATBuilder
func (*NATBuilder) WithMatch ¶
func (b *NATBuilder) WithMatch(match string) *NATBuilder
func (*NATBuilder) WithOption ¶
func (b *NATBuilder) WithOption(key, value string) *NATBuilder
func (*NATBuilder) WithPriority ¶
func (b *NATBuilder) WithPriority(priority int) *NATBuilder
func (*NATBuilder) WithType ¶
func (b *NATBuilder) WithType(kind string) *NATBuilder
type NATRef ¶
type NATRef struct {
// contains filtered or unexported fields
}
NATRef identifies a NAT row by type and logical_ip.
func (*NATRef) Create ¶
func (r *NATRef) Create() *NATBuilder
func (*NATRef) Delete ¶
func (r *NATRef) Delete() *NATBuilder
func (*NATRef) Ensure ¶
func (r *NATRef) Ensure() *NATBuilder
type NBClient ¶
type NBClient struct {
// contains filtered or unexported fields
}
NBClient provides OVN Northbound fluent APIs.
func (*NBClient) ACLByMatch ¶
func (*NBClient) AddressSet ¶
func (n *NBClient) AddressSet(name string) *AddressSetRef
func (*NBClient) Connection ¶
func (*NBClient) DHCPOptions ¶
func (n *NBClient) DHCPOptions(cidr string) *DHCPOptionsRef
func (*NBClient) ForwardingGroup ¶
func (*NBClient) GatewayChassis ¶
func (n *NBClient) GatewayChassis(name string) *GatewayChassisRef
func (*NBClient) GetAddressSet ¶
func (*NBClient) GetDHCPOptions ¶
func (*NBClient) GetGatewayChassis ¶
func (*NBClient) GetHAChassis ¶
func (*NBClient) GetHAChassisGroup ¶
func (*NBClient) GetLoadBalancer ¶
func (*NBClient) GetLogicalRouter ¶
func (*NBClient) GetLogicalRouterPort ¶
func (*NBClient) GetLogicalSwitch ¶
GetLogicalSwitch returns a logical switch by name.
func (*NBClient) GetLogicalSwitchPort ¶
func (*NBClient) GetMeterBand ¶
func (*NBClient) GetPortGroup ¶
func (*NBClient) HAChassis ¶
func (n *NBClient) HAChassis(chassisName string) *HAChassisRef
func (*NBClient) HAChassisGroup ¶
func (n *NBClient) HAChassisGroup(name string) *HAChassisGroupRef
func (*NBClient) ListLogicalSwitchPorts ¶
func (n *NBClient) ListLogicalSwitchPorts(ctx context.Context) ([]LogicalSwitchPort, error)
func (*NBClient) ListLogicalSwitches ¶
func (n *NBClient) ListLogicalSwitches(ctx context.Context) ([]LogicalSwitch, error)
func (*NBClient) LoadBalancer ¶
func (n *NBClient) LoadBalancer(name string) *LoadBalancerRef
func (*NBClient) LogicalRouter ¶
func (n *NBClient) LogicalRouter(name string) *LogicalRouterRef
func (*NBClient) LogicalRouterPort ¶
func (n *NBClient) LogicalRouterPort(name string) *LogicalRouterPortRef
func (*NBClient) LogicalSwitch ¶
func (n *NBClient) LogicalSwitch(name string) *LogicalSwitchRef
func (*NBClient) LogicalSwitchDNS ¶
func (n *NBClient) LogicalSwitchDNS(name string) *LogicalSwitchDNSRef
func (*NBClient) MeterBand ¶
func (n *NBClient) MeterBand(name string) *MeterBandRef
func (*NBClient) NATByLogicalIP ¶
func (*NBClient) NetworkService ¶ added in v2.1.0
func (n *NBClient) NetworkService(name string) *NetworkServiceRef
func (*NBClient) PortGroup ¶
func (n *NBClient) PortGroup(name string) *PortGroupRef
func (*NBClient) QoSByMatch ¶
func (*NBClient) QoSPolicy ¶ added in v2.1.0
func (n *NBClient) QoSPolicy(name string) *QoSPolicyRef
func (*NBClient) SecurityPolicy ¶
func (n *NBClient) SecurityPolicy(name string) *SecurityPolicyRef
func (*NBClient) Table ¶
Table exposes the full runtime OVN Northbound schema through the fluent API.
func (*NBClient) TableBy ¶
TableBy exposes a runtime OVN Northbound table row selected by column=value.
func (*NBClient) TableLogicalSwitchPort ¶
func (*NBClient) VirtualNetwork ¶
func (n *NBClient) VirtualNetwork(name string) *VirtualNetworkRef
func (*NBClient) WorkloadAttachment ¶
func (n *NBClient) WorkloadAttachment(name string) *WorkloadAttachmentRef
type NetworkService ¶ added in v2.1.0
type NetworkService struct {
Name string
VIPs []ServiceVIP
Protocol string
AttachToRouter string
Owner OwnerRef
Labels Labels
}
func (NetworkService) Validate ¶ added in v2.1.0
func (s NetworkService) Validate() error
type NetworkServiceBuilder ¶ added in v2.1.0
type NetworkServiceBuilder struct {
// contains filtered or unexported fields
}
func (*NetworkServiceBuilder) AttachToRouter ¶ added in v2.1.0
func (b *NetworkServiceBuilder) AttachToRouter(name string) *NetworkServiceBuilder
func (*NetworkServiceBuilder) DryRun ¶ added in v2.1.0
func (b *NetworkServiceBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*NetworkServiceBuilder) Execute ¶ added in v2.1.0
func (b *NetworkServiceBuilder) Execute(ctx context.Context) error
func (*NetworkServiceBuilder) Plan ¶ added in v2.1.0
func (b *NetworkServiceBuilder) Plan(ctx context.Context) (Plan, error)
func (*NetworkServiceBuilder) Reconcile ¶ added in v2.1.0
func (b *NetworkServiceBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*NetworkServiceBuilder) Validate ¶ added in v2.1.0
func (b *NetworkServiceBuilder) Validate() error
func (*NetworkServiceBuilder) WithLabel ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithLabel(key, value string) *NetworkServiceBuilder
func (*NetworkServiceBuilder) WithOwner ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithOwner(kind, name string) *NetworkServiceBuilder
func (*NetworkServiceBuilder) WithOwnerID ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithOwnerID(kind, id string) *NetworkServiceBuilder
func (*NetworkServiceBuilder) WithProtocol ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithProtocol(protocol string) *NetworkServiceBuilder
func (*NetworkServiceBuilder) WithVIP ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithVIP(address string, port int, backends ...ServiceBackend) *NetworkServiceBuilder
func (*NetworkServiceBuilder) WithVIPString ¶ added in v2.1.0
func (b *NetworkServiceBuilder) WithVIPString(vip string, backends ...string) *NetworkServiceBuilder
type NetworkServiceDeleteBuilder ¶ added in v2.1.0
type NetworkServiceDeleteBuilder struct {
// contains filtered or unexported fields
}
type NetworkServiceRef ¶ added in v2.1.0
type NetworkServiceRef struct {
// contains filtered or unexported fields
}
func (*NetworkServiceRef) Apply ¶ added in v2.1.0
func (r *NetworkServiceRef) Apply(ctx context.Context, service NetworkService) error
func (*NetworkServiceRef) Delete ¶ added in v2.1.0
func (r *NetworkServiceRef) Delete() *NetworkServiceDeleteBuilder
func (*NetworkServiceRef) Ensure ¶ added in v2.1.0
func (r *NetworkServiceRef) Ensure() *NetworkServiceBuilder
func (*NetworkServiceRef) Get ¶ added in v2.1.0
func (r *NetworkServiceRef) Get(ctx context.Context) (*NetworkService, error)
func (*NetworkServiceRef) Patch ¶ added in v2.1.0
func (r *NetworkServiceRef) Patch(ctx context.Context, patch ServicePatch) (*NetworkService, error)
type NetworkStatus ¶ added in v2.1.0
type NetworkStatus struct {
Name string `json:"name"`
State ResourceStatusState `json:"state"`
Network *VirtualNetwork `json:"network,omitempty"`
Doctor *DoctorReport `json:"doctor,omitempty"`
Ownership *OwnershipAuditReport `json:"ownership,omitempty"`
Findings []StatusFinding `json:"findings,omitempty"`
Degraded bool `json:"degraded"`
ReadOnly bool `json:"read_only"`
}
type OVSAutoAttach ¶
type OVSAutoAttach struct {
UUID string `ovsdb:"_uuid"`
SystemName string `ovsdb:"system_name"`
SystemDescription string `ovsdb:"system_description"`
Mappings map[int]int `ovsdb:"mappings"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSAutoAttach is the Open_vSwitch AutoAttach model.
type OVSBridge ¶
type OVSBridge struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Ports []string `ovsdb:"ports"`
Controllers []string `ovsdb:"controller"`
Mirrors []string `ovsdb:"mirrors"`
NetFlow *string `ovsdb:"netflow"`
SFlow *string `ovsdb:"sflow"`
IPFIX *string `ovsdb:"ipfix"`
FlowTables map[int]string `ovsdb:"flow_tables"`
AutoAttach *string `ovsdb:"auto_attach"`
FailMode *string `ovsdb:"fail_mode"`
DatapathType string `ovsdb:"datapath_type"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSBridge is the Open_vSwitch Bridge model.
type OVSClient ¶
type OVSClient struct {
// contains filtered or unexported fields
}
OVSClient provides local Open_vSwitch fluent APIs.
func (*OVSClient) AutoAttach ¶
func (*OVSClient) Controller ¶
func (*OVSClient) DeleteBridgeMapping ¶
func (*OVSClient) EnsureBridgeMapping ¶
func (*OVSClient) GetBridgeMappings ¶
func (*OVSClient) GetInterface ¶
func (*OVSClient) GetInterfaceByUUID ¶ added in v2.0.1
func (*OVSClient) GetOpenVSwitch ¶
func (o *OVSClient) GetOpenVSwitch(ctx context.Context) (*OpenVSwitch, error)
func (*OVSClient) ListBridges ¶
func (*OVSClient) ListInterfaces ¶
func (o *OVSClient) ListInterfaces(ctx context.Context) ([]OVSInterface, error)
func (*OVSClient) OpenVSwitch ¶
func (*OVSClient) Table ¶
Table exposes the full runtime Open_vSwitch schema through the fluent API.
func (*OVSClient) TableBy ¶
TableBy exposes a runtime Open_vSwitch table row selected by column=value.
func (*OVSClient) WatchBridges ¶
func (*OVSClient) WatchInterfaces ¶
func (*OVSClient) WatchPorts ¶
type OVSController ¶
type OVSController struct {
UUID string `ovsdb:"_uuid"`
Target string `ovsdb:"target"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSController is the Open_vSwitch Controller model.
type OVSFlowTable ¶
type OVSFlowTable struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSFlowTable is the Open_vSwitch Flow_Table model.
type OVSIPFIX ¶
type OVSIPFIX struct {
UUID string `ovsdb:"_uuid"`
Targets []string `ovsdb:"targets"`
Sampling int `ovsdb:"sampling"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSIPFIX is the Open_vSwitch IPFIX model.
type OVSInterface ¶
type OVSInterface struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Type string `ovsdb:"type"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSInterface is the Open_vSwitch Interface model.
type OVSManager ¶
type OVSManager struct {
UUID string `ovsdb:"_uuid"`
Target string `ovsdb:"target"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSManager is the Open_vSwitch Manager model.
type OVSMirror ¶
type OVSMirror struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
SelectAll bool `ovsdb:"select_all"`
SelectSrcPort []string `ovsdb:"select_src_port"`
SelectDstPort []string `ovsdb:"select_dst_port"`
OutputPort *string `ovsdb:"output_port"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSMirror is the Open_vSwitch Mirror model.
type OVSNetFlow ¶
type OVSNetFlow struct {
UUID string `ovsdb:"_uuid"`
Targets []string `ovsdb:"targets"`
EngineType int `ovsdb:"engine_type"`
EngineID int `ovsdb:"engine_id"`
ActiveTimeout int `ovsdb:"active_timeout"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSNetFlow is the Open_vSwitch NetFlow model.
type OVSPort ¶
type OVSPort struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Interfaces []string `ovsdb:"interfaces"`
QoS *string `ovsdb:"qos"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSPort is the Open_vSwitch Port model.
type OVSPortBuilder ¶
type OVSPortBuilder struct {
// contains filtered or unexported fields
}
func (*OVSPortBuilder) WithExternalID ¶
func (p *OVSPortBuilder) WithExternalID(key, value string) *OVSPortBuilder
func (*OVSPortBuilder) WithInterfaceExternalID ¶
func (p *OVSPortBuilder) WithInterfaceExternalID(key, value string) *OVSPortBuilder
func (*OVSPortBuilder) WithInterfaceName ¶
func (p *OVSPortBuilder) WithInterfaceName(name string) *OVSPortBuilder
func (*OVSPortBuilder) WithInterfaceOption ¶
func (p *OVSPortBuilder) WithInterfaceOption(key, value string) *OVSPortBuilder
func (*OVSPortBuilder) WithInterfaceType ¶
func (p *OVSPortBuilder) WithInterfaceType(kind string) *OVSPortBuilder
func (*OVSPortBuilder) WithOption ¶
func (p *OVSPortBuilder) WithOption(key, value string) *OVSPortBuilder
type OVSQoS ¶
type OVSQoS struct {
UUID string `ovsdb:"_uuid"`
Type string `ovsdb:"type"`
Queues map[int]string `ovsdb:"queues"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSQoS is the Open_vSwitch QoS model.
type OVSQueue ¶
type OVSQueue struct {
UUID string `ovsdb:"_uuid"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OVSQueue is the Open_vSwitch Queue model.
type OVSSFlow ¶
type OVSSFlow struct {
UUID string `ovsdb:"_uuid"`
Agent string `ovsdb:"agent"`
Targets []string `ovsdb:"targets"`
Header int `ovsdb:"header"`
Sampling int `ovsdb:"sampling"`
Polling int `ovsdb:"polling"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSSFlow is the Open_vSwitch sFlow model.
type OVSSSL ¶
type OVSSSL struct {
UUID string `ovsdb:"_uuid"`
PrivateKey string `ovsdb:"private_key"`
Certificate string `ovsdb:"certificate"`
CACert string `ovsdb:"ca_cert"`
BootstrapCACert bool `ovsdb:"bootstrap_ca_cert"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
OVSSSL is the Open_vSwitch SSL model.
type OpenFlowAction ¶ added in v2.2.0
type OpenFlowAction struct {
Type OpenFlowActionType
Port uint32
Field string
Value string
}
type OpenFlowActionType ¶ added in v2.2.0
type OpenFlowActionType string
const ( OpenFlowActionOutput OpenFlowActionType = "output" OpenFlowActionSetField OpenFlowActionType = "set_field" )
type OpenFlowActionsBuilder ¶ added in v2.2.0
type OpenFlowActionsBuilder struct {
// contains filtered or unexported fields
}
func (*OpenFlowActionsBuilder) Output ¶ added in v2.2.0
func (a *OpenFlowActionsBuilder) Output(port uint32) *OpenFlowRuleBuilder
func (*OpenFlowActionsBuilder) SetField ¶ added in v2.2.0
func (a *OpenFlowActionsBuilder) SetField(field, value string) *OpenFlowRuleBuilder
type OpenFlowBridgeRef ¶ added in v2.2.0
type OpenFlowBridgeRef struct {
// contains filtered or unexported fields
}
func (*OpenFlowBridgeRef) DeleteFlow ¶ added in v2.2.0
func (r *OpenFlowBridgeRef) DeleteFlow(name string) *OpenFlowRuleBuilder
func (*OpenFlowBridgeRef) EnsureFlow ¶ added in v2.2.0
func (r *OpenFlowBridgeRef) EnsureFlow(name string) *OpenFlowRuleBuilder
type OpenFlowClient ¶ added in v2.2.0
type OpenFlowClient struct {
// contains filtered or unexported fields
}
func NewOpenFlowClient ¶ added in v2.2.0
func NewOpenFlowClient(config OpenFlowConfig) *OpenFlowClient
func NewOpenFlowClientWithDialer ¶ added in v2.2.0
func NewOpenFlowClientWithDialer(config OpenFlowConfig, dialer OpenFlowDialer) *OpenFlowClient
func (*OpenFlowClient) AutoConfigureBridgeController ¶ added in v2.2.0
func (c *OpenFlowClient) AutoConfigureBridgeController(target string) *OpenFlowClient
func (*OpenFlowClient) Bridge ¶ added in v2.2.0
func (c *OpenFlowClient) Bridge(name string) *OpenFlowBridgeRef
func (*OpenFlowClient) ConfigureBridgeController ¶ added in v2.2.0
func (c *OpenFlowClient) ConfigureBridgeController(ctx context.Context, bridge string) error
func (*OpenFlowClient) Dial ¶ added in v2.2.0
func (c *OpenFlowClient) Dial(ctx context.Context) (*OpenFlowSession, error)
func (*OpenFlowClient) WithDialer ¶ added in v2.2.0
func (c *OpenFlowClient) WithDialer(dialer OpenFlowDialer) *OpenFlowClient
func (*OpenFlowClient) WithEndpoint ¶ added in v2.2.0
func (c *OpenFlowClient) WithEndpoint(endpoint string) *OpenFlowClient
func (*OpenFlowClient) WithVersions ¶ added in v2.2.0
func (c *OpenFlowClient) WithVersions(versions ...OpenFlowVersion) *OpenFlowClient
type OpenFlowConfig ¶ added in v2.2.0
type OpenFlowDialer ¶ added in v2.2.0
type OpenFlowFeatures ¶ added in v2.2.0
type OpenFlowFeatures struct {
Version OpenFlowVersion
XID uint32
DatapathID uint64
Buffers uint32
Tables uint8
AuxiliaryID uint8
Capabilities uint32
}
func ParseOpenFlowFeatures ¶ added in v2.2.0
func ParseOpenFlowFeatures(msg OpenFlowMessage) (OpenFlowFeatures, error)
type OpenFlowFlow ¶ added in v2.2.0
type OpenFlowFlow struct {
Name string
Bridge string
Cookie uint64
CookieMask uint64
TableID uint8
Priority uint16
IdleTimeout uint16
HardTimeout uint16
Importance uint16
Match OpenFlowMatch
Instructions []OpenFlowInstruction
Actions []OpenFlowAction
Owner OwnerRef
Labels Labels
}
type OpenFlowFlowStatsRequest ¶ added in v2.2.0
type OpenFlowInstruction ¶ added in v2.2.0
type OpenFlowInstruction struct {
GotoTable *uint8
ClearActions bool
WriteMetadata *OpenFlowMetadata
Actions []OpenFlowAction
}
type OpenFlowMatch ¶ added in v2.2.0
type OpenFlowMatch struct {
InPort *uint32
Metadata *OpenFlowMetadata
EthSrc string
EthDst string
EthType *uint16
VLANVID *uint16
IPProto *uint8
IPv4Src string
IPv4Dst string
TCPSrc *uint16
TCPDst *uint16
UDPSrc *uint16
UDPDst *uint16
}
func ParseOpenFlowMatch ¶ added in v2.2.0
func ParseOpenFlowMatch(data []byte) (OpenFlowMatch, error)
type OpenFlowMessage ¶ added in v2.2.0
type OpenFlowMessage struct {
Version OpenFlowVersion
Type uint8
XID uint32
Body []byte
}
func MarshalOpenFlowFlowMod ¶ added in v2.2.0
func MarshalOpenFlowFlowMod(version OpenFlowVersion, xid uint32, command uint8, flow OpenFlowFlow) (OpenFlowMessage, error)
func MarshalOpenFlowFlowStatsRequest ¶ added in v2.2.0
func MarshalOpenFlowFlowStatsRequest(version OpenFlowVersion, xid uint32, request OpenFlowFlowStatsRequest) (OpenFlowMessage, error)
func OpenFlowFeaturesRequest ¶ added in v2.2.0
func OpenFlowFeaturesRequest(version OpenFlowVersion, xid uint32) (OpenFlowMessage, error)
func OpenFlowHelloMessage ¶ added in v2.2.0
func OpenFlowHelloMessage(version OpenFlowVersion, xid uint32, versions ...OpenFlowVersion) (OpenFlowMessage, error)
func ParseOpenFlowMessage ¶ added in v2.2.0
func ParseOpenFlowMessage(data []byte) (OpenFlowMessage, error)
func ReadOpenFlowMessage ¶ added in v2.2.0
func ReadOpenFlowMessage(r io.Reader) (OpenFlowMessage, error)
type OpenFlowMetadata ¶ added in v2.2.0
type OpenFlowProtocolError ¶ added in v2.2.0
type OpenFlowProtocolError struct {
Version OpenFlowVersion
XID uint32
Type uint16
Code uint16
Data []byte
}
func ParseOpenFlowProtocolError ¶ added in v2.2.0
func ParseOpenFlowProtocolError(msg OpenFlowMessage) (*OpenFlowProtocolError, error)
func (*OpenFlowProtocolError) Error ¶ added in v2.2.0
func (e *OpenFlowProtocolError) Error() string
type OpenFlowRuleBuilder ¶ added in v2.2.0
type OpenFlowRuleBuilder struct {
// contains filtered or unexported fields
}
func (*OpenFlowRuleBuilder) Actions ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Actions() *OpenFlowActionsBuilder
func (*OpenFlowRuleBuilder) Cookie ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Cookie(cookie uint64) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) CookieMask ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) CookieMask(mask uint64) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) DryRun ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*OpenFlowRuleBuilder) EthType ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) EthType(value uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) Execute ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Execute(ctx context.Context) error
func (*OpenFlowRuleBuilder) Flow ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Flow() OpenFlowFlow
func (*OpenFlowRuleBuilder) IPProto ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) IPProto(proto uint8) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) IPv4Dst ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) IPv4Dst(cidr string) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) IPv4Src ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) IPv4Src(cidr string) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) InPort ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) InPort(port uint32) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) Plan ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Plan(ctx context.Context) (Plan, error)
func (*OpenFlowRuleBuilder) Priority ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Priority(priority uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) TCPDst ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) TCPDst(port uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) TCPSrc ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) TCPSrc(port uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) Table ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Table(id uint8) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) UDPDst ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) UDPDst(port uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) UDPSrc ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) UDPSrc(port uint16) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) Validate ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) Validate() error
func (*OpenFlowRuleBuilder) WithLabel ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) WithLabel(key, value string) *OpenFlowRuleBuilder
func (*OpenFlowRuleBuilder) WithOwner ¶ added in v2.2.0
func (b *OpenFlowRuleBuilder) WithOwner(kind, name string) *OpenFlowRuleBuilder
type OpenFlowRuleRef ¶ added in v2.2.0
type OpenFlowRuleRef struct {
// contains filtered or unexported fields
}
type OpenFlowSession ¶ added in v2.2.0
type OpenFlowSession struct {
// contains filtered or unexported fields
}
func (*OpenFlowSession) AddFlow ¶ added in v2.2.0
func (s *OpenFlowSession) AddFlow(ctx context.Context, flow OpenFlowFlow) error
func (*OpenFlowSession) Close ¶ added in v2.2.0
func (s *OpenFlowSession) Close() error
func (*OpenFlowSession) DeleteFlow ¶ added in v2.2.0
func (s *OpenFlowSession) DeleteFlow(ctx context.Context, flow OpenFlowFlow) error
func (*OpenFlowSession) DumpFlows ¶ added in v2.2.0
func (s *OpenFlowSession) DumpFlows(ctx context.Context, request OpenFlowFlowStatsRequest) ([]OpenFlowMessage, error)
func (*OpenFlowSession) Handshake ¶ added in v2.2.0
func (s *OpenFlowSession) Handshake(ctx context.Context) error
func (*OpenFlowSession) ModifyFlowStrict ¶ added in v2.2.0
func (s *OpenFlowSession) ModifyFlowStrict(ctx context.Context, flow OpenFlowFlow) error
func (*OpenFlowSession) Version ¶ added in v2.2.0
func (s *OpenFlowSession) Version() OpenFlowVersion
type OpenFlowVersion ¶ added in v2.2.0
type OpenFlowVersion uint8
const ( OpenFlow13 OpenFlowVersion = 0x04 OpenFlow15 OpenFlowVersion = 0x06 )
type OpenVSwitch ¶
type OpenVSwitch struct {
UUID string `ovsdb:"_uuid"`
Bridges []string `ovsdb:"bridges"`
Managers []string `ovsdb:"manager_options"`
SSL *string `ovsdb:"ssl"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
OpenVSwitch is the Open_vSwitch root table model.
type OwnerRef ¶
OwnerRef identifies the neutral controller or platform object that owns an ovnflow-managed resource. Kind is required; either Name or ID must be set.
func (OwnerRef) ExternalIDs ¶
ExternalIDs returns reserved ovnflow external_ids for ownership and labels.
type OwnershipAuditFinding ¶
type OwnershipAuditFinding struct {
Severity DoctorSeverity `json:"severity"`
Code string `json:"code"`
Database string `json:"database,omitempty"`
Table string `json:"table,omitempty"`
Object string `json:"object,omitempty"`
Message string `json:"message"`
Details map[string]string `json:"details,omitempty"`
}
type OwnershipAuditOptions ¶
type OwnershipAuditReport ¶
type OwnershipAuditReport struct {
Summary OwnershipAuditSummary `json:"summary"`
Resources []OwnershipAuditResource `json:"resources"`
Findings []OwnershipAuditFinding `json:"findings"`
}
type OwnershipAuditResource ¶
type OwnershipAuditResource struct {
Database string `json:"database"`
Table string `json:"table"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Kind string `json:"kind,omitempty"`
Owner OwnerRef `json:"owner"`
Labels Labels `json:"labels,omitempty"`
ExternalIDs map[string]string `json:"external_ids,omitempty"`
}
type OwnershipAuditSummary ¶
type Plan ¶
type Plan struct {
Operations []PlannedOperation
Warnings []string
}
type PlannedOperation ¶
type PlannedOperation struct {
Action IntentAction
Resource string
Name string
Description string
}
type PortBindingEvent ¶
type PortBindingEvent struct {
Type EventType
Old *SBPortBinding
New *SBPortBinding
}
type PortGroup ¶
type PortGroup struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Ports []string `ovsdb:"ports"`
ACLs []string `ovsdb:"acls"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
PortGroup is an OVN Northbound Port_Group model.
type PortGroupBuilder ¶
type PortGroupBuilder struct {
// contains filtered or unexported fields
}
PortGroupBuilder builds Port_Group operations.
func (*PortGroupBuilder) WithACL ¶
func (b *PortGroupBuilder) WithACL(direction string, priority int, match, action string) *PortGroupBuilder
func (*PortGroupBuilder) WithACLExternalID ¶
func (b *PortGroupBuilder) WithACLExternalID(key, value string) *PortGroupBuilder
func (*PortGroupBuilder) WithACLUUID ¶
func (b *PortGroupBuilder) WithACLUUID(uuid string) *PortGroupBuilder
func (*PortGroupBuilder) WithExternalID ¶
func (b *PortGroupBuilder) WithExternalID(key, value string) *PortGroupBuilder
func (*PortGroupBuilder) WithPortUUID ¶
func (b *PortGroupBuilder) WithPortUUID(uuid string) *PortGroupBuilder
type PortGroupRef ¶
type PortGroupRef struct {
// contains filtered or unexported fields
}
PortGroupRef identifies one Port_Group row by name.
func (*PortGroupRef) Create ¶
func (r *PortGroupRef) Create() *PortGroupBuilder
func (*PortGroupRef) Delete ¶
func (r *PortGroupRef) Delete() *PortGroupBuilder
func (*PortGroupRef) Ensure ¶
func (r *PortGroupRef) Ensure() *PortGroupBuilder
type ProviderNetwork ¶
type ProviderNetwork struct {
Name string
PhysicalNetwork string
LogicalSwitch string
LocalnetPort string
Bridge string
Owner OwnerRef
Labels Labels
}
func (ProviderNetwork) Validate ¶
func (p ProviderNetwork) Validate() error
type ProviderNetworkBuilder ¶
type ProviderNetworkBuilder struct {
// contains filtered or unexported fields
}
func (*ProviderNetworkBuilder) DryRun ¶
func (b *ProviderNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*ProviderNetworkBuilder) Execute ¶
func (b *ProviderNetworkBuilder) Execute(ctx context.Context) error
func (*ProviderNetworkBuilder) OnLogicalSwitch ¶
func (b *ProviderNetworkBuilder) OnLogicalSwitch(name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) Plan ¶
func (b *ProviderNetworkBuilder) Plan(ctx context.Context) (Plan, error)
func (*ProviderNetworkBuilder) Reconcile ¶
func (b *ProviderNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*ProviderNetworkBuilder) UseBridge ¶
func (b *ProviderNetworkBuilder) UseBridge(name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) Validate ¶
func (b *ProviderNetworkBuilder) Validate() error
func (*ProviderNetworkBuilder) WithBridge ¶
func (b *ProviderNetworkBuilder) WithBridge(name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) WithLabel ¶
func (b *ProviderNetworkBuilder) WithLabel(key, value string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) WithLocalnetPort ¶
func (b *ProviderNetworkBuilder) WithLocalnetPort(name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) WithLogicalSwitch ¶
func (b *ProviderNetworkBuilder) WithLogicalSwitch(name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) WithOwner ¶
func (b *ProviderNetworkBuilder) WithOwner(kind, name string) *ProviderNetworkBuilder
func (*ProviderNetworkBuilder) WithPhysicalNetwork ¶
func (b *ProviderNetworkBuilder) WithPhysicalNetwork(name string) *ProviderNetworkBuilder
type ProviderNetworkPatch ¶
type ProviderNetworkRef ¶
type ProviderNetworkRef struct {
// contains filtered or unexported fields
}
func (*ProviderNetworkRef) Apply ¶
func (r *ProviderNetworkRef) Apply(ctx context.Context, network ProviderNetwork) error
func (*ProviderNetworkRef) Ensure ¶
func (r *ProviderNetworkRef) Ensure() *ProviderNetworkBuilder
func (*ProviderNetworkRef) Get ¶
func (r *ProviderNetworkRef) Get(ctx context.Context) (*ProviderNetwork, error)
func (*ProviderNetworkRef) Inspect ¶
func (r *ProviderNetworkRef) Inspect(ctx context.Context) (InspectResult, error)
func (*ProviderNetworkRef) Patch ¶
func (r *ProviderNetworkRef) Patch(ctx context.Context, patch ProviderNetworkPatch) (*ProviderNetwork, error)
type ProviderNetworkStatus ¶ added in v2.1.0
type ProviderNetworkStatus struct {
Name string `json:"name"`
State ResourceStatusState `json:"state"`
Network *ProviderNetwork `json:"network,omitempty"`
Doctor *DoctorReport `json:"doctor,omitempty"`
Ownership *OwnershipAuditReport `json:"ownership,omitempty"`
Findings []StatusFinding `json:"findings,omitempty"`
Degraded bool `json:"degraded"`
ReadOnly bool `json:"read_only"`
}
type QoS ¶
type QoS struct {
UUID string `ovsdb:"_uuid"`
Priority int `ovsdb:"priority"`
Direction string `ovsdb:"direction"`
Match string `ovsdb:"match"`
Action map[string]int `ovsdb:"action"`
Bandwidth map[string]int `ovsdb:"bandwidth"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
QoS is an OVN Northbound QoS model.
type QoSBuilder ¶
type QoSBuilder struct {
// contains filtered or unexported fields
}
QoSBuilder builds QoS operations.
func (*QoSBuilder) AttachToSwitch ¶
func (b *QoSBuilder) AttachToSwitch(name string) *QoSBuilder
func (*QoSBuilder) WithBurst ¶
func (b *QoSBuilder) WithBurst(burst int) *QoSBuilder
func (*QoSBuilder) WithDSCP ¶
func (b *QoSBuilder) WithDSCP(value int) *QoSBuilder
func (*QoSBuilder) WithDirection ¶
func (b *QoSBuilder) WithDirection(direction string) *QoSBuilder
func (*QoSBuilder) WithExternalID ¶
func (b *QoSBuilder) WithExternalID(key, value string) *QoSBuilder
func (*QoSBuilder) WithMark ¶
func (b *QoSBuilder) WithMark(value int) *QoSBuilder
func (*QoSBuilder) WithMatch ¶
func (b *QoSBuilder) WithMatch(match string) *QoSBuilder
func (*QoSBuilder) WithPriority ¶
func (b *QoSBuilder) WithPriority(priority int) *QoSBuilder
func (*QoSBuilder) WithRate ¶
func (b *QoSBuilder) WithRate(rate int) *QoSBuilder
type QoSPolicyBuilder ¶ added in v2.1.0
type QoSPolicyBuilder struct {
// contains filtered or unexported fields
}
QoSPolicyBuilder builds QoS policy intent operations.
func (*QoSPolicyBuilder) AddRule ¶ added in v2.1.0
func (b *QoSPolicyBuilder) AddRule(rule QoSRule) *QoSPolicyBuilder
func (*QoSPolicyBuilder) DryRun ¶ added in v2.1.0
func (b *QoSPolicyBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*QoSPolicyBuilder) Execute ¶ added in v2.1.0
func (b *QoSPolicyBuilder) Execute(ctx context.Context) error
func (*QoSPolicyBuilder) Plan ¶ added in v2.1.0
func (b *QoSPolicyBuilder) Plan(ctx context.Context) (Plan, error)
func (*QoSPolicyBuilder) Reconcile ¶ added in v2.1.0
func (b *QoSPolicyBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*QoSPolicyBuilder) Validate ¶ added in v2.1.0
func (b *QoSPolicyBuilder) Validate() error
func (*QoSPolicyBuilder) WithLabel ¶ added in v2.1.0
func (b *QoSPolicyBuilder) WithLabel(key, value string) *QoSPolicyBuilder
func (*QoSPolicyBuilder) WithOwner ¶ added in v2.1.0
func (b *QoSPolicyBuilder) WithOwner(kind, name string) *QoSPolicyBuilder
type QoSPolicyPatch ¶ added in v2.1.0
type QoSPolicyPatch struct {
ReplaceRules bool
Rules []QoSRule
AddRules []QoSRule
RemoveRules []string
Owner *OwnerRef
Labels Labels
RemoveLabels []string
}
QoSPolicyPatch describes incremental QoS policy edits.
type QoSPolicyRef ¶ added in v2.1.0
type QoSPolicyRef struct {
// contains filtered or unexported fields
}
QoSPolicyRef identifies a QoS policy intent by name.
func (*QoSPolicyRef) Apply ¶ added in v2.1.0
func (r *QoSPolicyRef) Apply(ctx context.Context, policy QoSPolicy) error
func (*QoSPolicyRef) Delete ¶ added in v2.1.0
func (r *QoSPolicyRef) Delete(ctx context.Context) error
func (*QoSPolicyRef) Ensure ¶ added in v2.1.0
func (r *QoSPolicyRef) Ensure() *QoSPolicyBuilder
func (*QoSPolicyRef) Get ¶ added in v2.1.0
func (r *QoSPolicyRef) Get(ctx context.Context) (*QoSPolicy, error)
func (*QoSPolicyRef) Patch ¶ added in v2.1.0
func (r *QoSPolicyRef) Patch(ctx context.Context, patch QoSPolicyPatch) (*QoSPolicy, error)
type QoSRef ¶
type QoSRef struct {
// contains filtered or unexported fields
}
QoSRef identifies one QoS row by direction, priority, and match.
func (*QoSRef) Create ¶
func (r *QoSRef) Create() *QoSBuilder
func (*QoSRef) Delete ¶
func (r *QoSRef) Delete() *QoSBuilder
func (*QoSRef) Ensure ¶
func (r *QoSRef) Ensure() *QoSBuilder
type QoSRule ¶ added in v2.1.0
type QoSRule struct {
Name string
Direction string
Priority int
Match string
Rate int
Burst int
DSCP *int
Mark *int
Switch string
}
QoSRule describes one OVN QoS rule without exposing OVN transaction details.
type RBACPermissionEvent ¶
type RBACPermissionEvent struct {
Type EventType
Old *SBRBACPermission
New *SBRBACPermission
}
type RBACRoleEvent ¶
type RBACRoleEvent struct {
Type EventType
Old *SBRBACRole
New *SBRBACRole
}
type ReconcileResult ¶
type ResourceStatusState ¶ added in v2.1.0
type ResourceStatusState string
const ( ResourceStatusPresent ResourceStatusState = "present" ResourceStatusMissing ResourceStatusState = "missing" ResourceStatusDegraded ResourceStatusState = "degraded" )
type SBBFD ¶
type SBBFD struct {
UUID string `ovsdb:"_uuid"`
SrcPort int `ovsdb:"src_port"`
Disc int `ovsdb:"disc"`
LogicalPort string `ovsdb:"logical_port"`
DstIP string `ovsdb:"dst_ip"`
MinTx int `ovsdb:"min_tx"`
MinRx int `ovsdb:"min_rx"`
DetectMult int `ovsdb:"detect_mult"`
Status string `ovsdb:"status"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
Options map[string]string `ovsdb:"options"`
}
SBBFD is an OVN Southbound BFD model.
type SBChassis ¶
type SBChassis struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Hostname string `ovsdb:"hostname"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
Encaps []string `ovsdb:"encaps"`
NbCfg int `ovsdb:"nb_cfg"`
OtherConfig map[string]string `ovsdb:"other_config"`
}
SBChassis is a minimal OVN Southbound Chassis model.
type SBClient ¶
type SBClient struct {
// contains filtered or unexported fields
}
SBClient exposes OVN Southbound APIs.
func (*SBClient) Connection ¶
func (*SBClient) GetChassis ¶
func (*SBClient) GetDatapath ¶
func (*SBClient) GetDatapathByUUID ¶
func (*SBClient) GetLogicalFlow ¶
func (*SBClient) GetMACBinding ¶
func (*SBClient) GetMeterBand ¶
func (*SBClient) GetMulticastGroup ¶
func (*SBClient) GetPortBinding ¶
func (*SBClient) GetRBACPermission ¶
func (*SBClient) GetRBACRole ¶
func (*SBClient) GetServiceMonitor ¶
func (*SBClient) ListChassis ¶
func (*SBClient) ListDatapaths ¶
func (s *SBClient) ListDatapaths(ctx context.Context) ([]SBDatapathBinding, error)
func (*SBClient) ListLogicalFlows ¶
func (s *SBClient) ListLogicalFlows(ctx context.Context) ([]SBLogicalFlow, error)
func (*SBClient) ListMACBindings ¶
func (s *SBClient) ListMACBindings(ctx context.Context) ([]SBMACBinding, error)
func (*SBClient) ListMeterBands ¶
func (s *SBClient) ListMeterBands(ctx context.Context) ([]SBMeterBand, error)
func (*SBClient) ListMulticastGroups ¶
func (s *SBClient) ListMulticastGroups(ctx context.Context) ([]SBMulticastGroup, error)
func (*SBClient) ListPortBindings ¶
func (s *SBClient) ListPortBindings(ctx context.Context) ([]SBPortBinding, error)
func (*SBClient) ListRBACPermissions ¶
func (s *SBClient) ListRBACPermissions(ctx context.Context) ([]SBRBACPermission, error)
func (*SBClient) ListRBACRoles ¶
func (s *SBClient) ListRBACRoles(ctx context.Context) ([]SBRBACRole, error)
func (*SBClient) ListServiceMonitors ¶
func (s *SBClient) ListServiceMonitors(ctx context.Context) ([]SBServiceMonitor, error)
func (*SBClient) LogicalFlow ¶
func (*SBClient) MACBinding ¶
func (*SBClient) MulticastGroup ¶
func (*SBClient) PortBinding ¶
func (*SBClient) RBACPermission ¶
func (*SBClient) ServiceMonitor ¶
func (*SBClient) Table ¶
Table exposes the full runtime OVN Southbound schema through the fluent API.
func (*SBClient) TableBy ¶
TableBy exposes a runtime OVN Southbound table row selected by column=value.
func (*SBClient) WatchChassis ¶
func (s *SBClient) WatchChassis(ctx context.Context) (<-chan ChassisEvent, <-chan error)
func (*SBClient) WatchDatapaths ¶
func (s *SBClient) WatchDatapaths(ctx context.Context) (<-chan DatapathEvent, <-chan error)
func (*SBClient) WatchLogicalFlows ¶
func (s *SBClient) WatchLogicalFlows(ctx context.Context) (<-chan LogicalFlowEvent, <-chan error)
func (*SBClient) WatchMACBindings ¶
func (s *SBClient) WatchMACBindings(ctx context.Context) (<-chan MACBindingEvent, <-chan error)
func (*SBClient) WatchMeterBands ¶
func (s *SBClient) WatchMeterBands(ctx context.Context) (<-chan MeterBandEvent, <-chan error)
func (*SBClient) WatchMeters ¶
func (s *SBClient) WatchMeters(ctx context.Context) (<-chan MeterEvent, <-chan error)
func (*SBClient) WatchMulticastGroups ¶
func (s *SBClient) WatchMulticastGroups(ctx context.Context) (<-chan MulticastGroupEvent, <-chan error)
func (*SBClient) WatchPortBindings ¶
func (s *SBClient) WatchPortBindings(ctx context.Context) (<-chan PortBindingEvent, <-chan error)
func (*SBClient) WatchRBACPermissions ¶
func (s *SBClient) WatchRBACPermissions(ctx context.Context) (<-chan RBACPermissionEvent, <-chan error)
func (*SBClient) WatchRBACRoles ¶
func (s *SBClient) WatchRBACRoles(ctx context.Context) (<-chan RBACRoleEvent, <-chan error)
func (*SBClient) WatchServiceMonitors ¶
func (s *SBClient) WatchServiceMonitors(ctx context.Context) (<-chan ServiceMonitorEvent, <-chan error)
type SBDNS ¶
type SBDNS struct {
UUID string `ovsdb:"_uuid"`
Records map[string]string `ovsdb:"records"`
Datapaths []string `ovsdb:"datapaths"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
SBDNS is an OVN Southbound DNS model.
type SBDatapathBinding ¶
type SBDatapathBinding struct {
UUID string `ovsdb:"_uuid"`
TunnelKey int `ovsdb:"tunnel_key"`
LoadBalancers []string `ovsdb:"load_balancers"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
SBDatapathBinding is a minimal OVN Southbound Datapath_Binding model.
type SBFDB ¶
type SBFDB struct {
UUID string `ovsdb:"_uuid"`
MAC string `ovsdb:"mac"`
DPKey int `ovsdb:"dp_key"`
PortKey int `ovsdb:"port_key"`
}
SBFDB is an OVN Southbound FDB model.
type SBLogicalFlow ¶
type SBLogicalFlow struct {
UUID string `ovsdb:"_uuid"`
LogicalDatapath *string `ovsdb:"logical_datapath"`
LogicalDPGroup *string `ovsdb:"logical_dp_group"`
Pipeline string `ovsdb:"pipeline"`
TableID int `ovsdb:"table_id"`
Priority int `ovsdb:"priority"`
Match string `ovsdb:"match"`
Actions string `ovsdb:"actions"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
SBLogicalFlow is an OVN Southbound Logical_Flow model.
type SBMACBinding ¶
type SBMACBinding struct {
UUID string `ovsdb:"_uuid"`
LogicalPort string `ovsdb:"logical_port"`
IP string `ovsdb:"ip"`
MAC string `ovsdb:"mac"`
Datapath string `ovsdb:"datapath"`
}
SBMACBinding is an OVN Southbound MAC_Binding model.
type SBMeter ¶
type SBMeter struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Unit string `ovsdb:"unit"`
Bands []string `ovsdb:"bands"`
}
SBMeter is an OVN Southbound Meter model.
type SBMeterBand ¶
type SBMeterBand struct {
UUID string `ovsdb:"_uuid"`
Action string `ovsdb:"action"`
Rate int `ovsdb:"rate"`
BurstSize int `ovsdb:"burst_size"`
}
SBMeterBand is an OVN Southbound Meter_Band model.
type SBMulticastGroup ¶
type SBMulticastGroup struct {
UUID string `ovsdb:"_uuid"`
Datapath string `ovsdb:"datapath"`
Name string `ovsdb:"name"`
TunnelKey int `ovsdb:"tunnel_key"`
Ports []string `ovsdb:"ports"`
}
SBMulticastGroup is an OVN Southbound Multicast_Group model.
type SBPortBinding ¶
type SBPortBinding struct {
UUID string `ovsdb:"_uuid"`
LogicalPort string `ovsdb:"logical_port"`
Type string `ovsdb:"type"`
Chassis *string `ovsdb:"chassis"`
Datapath string `ovsdb:"datapath"`
TunnelKey int `ovsdb:"tunnel_key"`
ParentPort *string `ovsdb:"parent_port"`
Tag *int `ovsdb:"tag"`
VirtualParent *string `ovsdb:"virtual_parent"`
Encap *string `ovsdb:"encap"`
GatewayChassis []string `ovsdb:"gateway_chassis"`
HAChassisGroup *string `ovsdb:"ha_chassis_group"`
MAC []string `ovsdb:"mac"`
NatAddresses []string `ovsdb:"nat_addresses"`
Up *bool `ovsdb:"up"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
SBPortBinding is a minimal OVN Southbound Port_Binding model.
type SBRBACPermission ¶
type SBRBACPermission struct {
UUID string `ovsdb:"_uuid"`
Table string `ovsdb:"table"`
Authorization []string `ovsdb:"authorization"`
InsertDelete bool `ovsdb:"insert_delete"`
Update []string `ovsdb:"update"`
}
SBRBACPermission is an OVN Southbound RBAC_Permission model.
type SBRBACRole ¶
type SBRBACRole struct {
UUID string `ovsdb:"_uuid"`
Name string `ovsdb:"name"`
Permissions map[string]string `ovsdb:"permissions"`
}
SBRBACRole is an OVN Southbound RBAC_Role model.
type SBServiceMonitor ¶
type SBServiceMonitor struct {
UUID string `ovsdb:"_uuid"`
IP string `ovsdb:"ip"`
Protocol *string `ovsdb:"protocol"`
Port int `ovsdb:"port"`
LogicalPort string `ovsdb:"logical_port"`
SrcMAC string `ovsdb:"src_mac"`
SrcIP string `ovsdb:"src_ip"`
Status *string `ovsdb:"status"`
Options map[string]string `ovsdb:"options"`
ExternalIDs map[string]string `ovsdb:"external_ids"`
}
SBServiceMonitor is an OVN Southbound Service_Monitor model.
type SDWANAgent ¶ added in v2.3.0
type SDWANAgent struct {
ID string
Site string
Endpoint string
Capabilities SDWANAgentCapabilities
Labels Labels
Status SDWANAgentStatus
}
func (SDWANAgent) Validate ¶ added in v2.3.0
func (a SDWANAgent) Validate() error
type SDWANAgentCapabilities ¶ added in v2.3.0
type SDWANAgentCapabilities struct {
Transports []SDWANTransport
Layers []SDWANLayer
Features []string
Attributes map[string]string
}
type SDWANAgentHeartbeat ¶ added in v2.3.0
type SDWANAgentHeartbeat struct {
AgentID string
Site string
Status SDWANAgentStatus
Observed []SDWANLinkStatus
Attributes map[string]string
At time.Time
}
type SDWANAgentStatus ¶ added in v2.3.0
type SDWANAgentStatus struct {
State ResourceStatusState
Message string
LastSeen time.Time
Observed []SDWANLinkStatus
Findings []StatusFinding
Generation int
Attributes map[string]string
}
func (SDWANAgentStatus) Validate ¶ added in v2.3.0
func (s SDWANAgentStatus) Validate() error
type SDWANApplyPlan ¶ added in v2.2.0
type SDWANApplyPlan struct {
Network string
Operations []SDWANOperation
}
type SDWANAssignment ¶ added in v2.3.0
type SDWANAssignment struct {
ID string
AgentID string
Network string
Site string
Generation int
Desired SDWANNetwork
Plan SDWANApplyPlan
Status SDWANAssignmentStatus
CreatedAt time.Time
UpdatedAt time.Time
}
type SDWANAssignmentStatus ¶ added in v2.3.0
type SDWANAssignmentStatus struct {
State SDWANAssignmentStatusState
Message string
AppliedAt time.Time
Findings []StatusFinding
Attributes map[string]string
}
func (SDWANAssignmentStatus) Validate ¶ added in v2.3.0
func (s SDWANAssignmentStatus) Validate() error
type SDWANAssignmentStatusState ¶ added in v2.3.0
type SDWANAssignmentStatusState string
const ( SDWANAssignmentPending SDWANAssignmentStatusState = "pending" SDWANAssignmentApplied SDWANAssignmentStatusState = "applied" SDWANAssignmentRejected SDWANAssignmentStatusState = "rejected" SDWANAssignmentFailed SDWANAssignmentStatusState = "failed" )
type SDWANBackend ¶ added in v2.2.0
type SDWANBackend interface {
GetSDWAN(context.Context, string) (*SDWANNetwork, error)
ApplySDWAN(context.Context, SDWANNetwork, SDWANApplyPlan) error
DeleteSDWAN(context.Context, string) error
}
type SDWANClient ¶ added in v2.2.0
type SDWANClient struct {
// contains filtered or unexported fields
}
func NewSDWANClient ¶ added in v2.2.0
func NewSDWANClient(backend SDWANBackend) *SDWANClient
func (*SDWANClient) Network ¶ added in v2.2.0
func (c *SDWANClient) Network(name string) *SDWANNetworkRef
func (*SDWANClient) WithBackend ¶ added in v2.2.0
func (c *SDWANClient) WithBackend(backend SDWANBackend) *SDWANClient
WithBackend returns an SD-WAN client that uses backend.
type SDWANControlPlane ¶ added in v2.3.0
type SDWANControlPlane interface {
RegisterAgent(context.Context, SDWANAgent) (*SDWANAgent, error)
Heartbeat(context.Context, SDWANAgentHeartbeat) (*SDWANAgent, error)
GetAgent(context.Context, string) (*SDWANAgent, error)
ListAgents(context.Context) ([]SDWANAgent, error)
AssignSDWAN(context.Context, string, SDWANNetwork, SDWANApplyPlan) (*SDWANAssignment, error)
GetAssignment(context.Context, string) (*SDWANAssignment, error)
ListAssignments(context.Context, string) ([]SDWANAssignment, error)
AckAssignment(context.Context, string, SDWANAssignmentStatus) (*SDWANAssignment, error)
}
type SDWANDeleteBuilder ¶ added in v2.2.0
type SDWANDeleteBuilder struct {
// contains filtered or unexported fields
}
type SDWANLayer ¶ added in v2.2.0
type SDWANLayer string
const ( SDWANLayerL3 SDWANLayer = "l3" SDWANLayerL2 SDWANLayer = "l2" )
type SDWANLink ¶ added in v2.2.0
type SDWANLink struct {
Name string
From string
To string
Transport SDWANTransport
PathMode SDWANPathMode
EndpointA string
EndpointB string
AllowedIPs []string
Cost int
Enabled bool
Disabled bool
Attributes map[string]string
}
func (SDWANLink) StableName ¶ added in v2.2.0
type SDWANLinkStatus ¶ added in v2.2.0
type SDWANLinkStatus struct {
Name string
From string
To string
Transport SDWANTransport
PathMode SDWANPathMode
Ready bool
}
type SDWANNetwork ¶ added in v2.2.0
type SDWANNetwork struct {
Name string
Layer SDWANLayer
Topology SDWANTopology
Transport SDWANTransport
PathMode SDWANPathMode
Sites []SDWANSite
Links []SDWANLink
Policies []SDWANPolicy
Owner OwnerRef
Labels Labels
Status SDWANStatus
}
func (SDWANNetwork) Validate ¶ added in v2.2.0
func (n SDWANNetwork) Validate() error
type SDWANNetworkBuilder ¶ added in v2.2.0
type SDWANNetworkBuilder struct {
// contains filtered or unexported fields
}
func (*SDWANNetworkBuilder) AddLink ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) AddLink(link SDWANLink) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) AddPolicy ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) AddPolicy(name string, policy SDWANPolicy) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) AddSite ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) AddSite(name string, site SDWANSite) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) Apply ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Apply(ctx context.Context) error
func (*SDWANNetworkBuilder) ApplyPlan ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) ApplyPlan(ctx context.Context) (SDWANApplyPlan, error)
func (*SDWANNetworkBuilder) DryRun ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*SDWANNetworkBuilder) Execute ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Execute(ctx context.Context) error
func (*SDWANNetworkBuilder) Layer2 ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Layer2() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) Layer3 ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Layer3() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) PathModeAuto ¶ added in v2.4.0
func (b *SDWANNetworkBuilder) PathModeAuto() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) PathModeDirect ¶ added in v2.4.0
func (b *SDWANNetworkBuilder) PathModeDirect() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) PathModeRelay ¶ added in v2.4.0
func (b *SDWANNetworkBuilder) PathModeRelay() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) PathModeTransit ¶ added in v2.4.0
func (b *SDWANNetworkBuilder) PathModeTransit() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) Plan ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Plan(ctx context.Context) (Plan, error)
func (*SDWANNetworkBuilder) Reconcile ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*SDWANNetworkBuilder) TopologyFullMesh ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) TopologyFullMesh() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) TopologyHubSpoke ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) TopologyHubSpoke() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) TopologyPartialMesh ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) TopologyPartialMesh() *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) Validate ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) Validate() error
func (*SDWANNetworkBuilder) WithLabel ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) WithLabel(key, value string) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithLayer ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) WithLayer(layer SDWANLayer) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithLinkAttribute ¶ added in v2.3.0
func (b *SDWANNetworkBuilder) WithLinkAttribute(linkName, key, value string) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithOwner ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) WithOwner(kind, name string) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithPathMode ¶ added in v2.4.0
func (b *SDWANNetworkBuilder) WithPathMode(mode SDWANPathMode) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithSiteAttribute ¶ added in v2.3.0
func (b *SDWANNetworkBuilder) WithSiteAttribute(siteName, key, value string) *SDWANNetworkBuilder
func (*SDWANNetworkBuilder) WithTransport ¶ added in v2.2.0
func (b *SDWANNetworkBuilder) WithTransport(transport SDWANTransport) *SDWANNetworkBuilder
type SDWANNetworkRef ¶ added in v2.2.0
type SDWANNetworkRef struct {
// contains filtered or unexported fields
}
func (*SDWANNetworkRef) Delete ¶ added in v2.2.0
func (r *SDWANNetworkRef) Delete() *SDWANDeleteBuilder
func (*SDWANNetworkRef) Ensure ¶ added in v2.2.0
func (r *SDWANNetworkRef) Ensure() *SDWANNetworkBuilder
func (*SDWANNetworkRef) Get ¶ added in v2.2.0
func (r *SDWANNetworkRef) Get(ctx context.Context) (*SDWANNetwork, error)
type SDWANOperation ¶ added in v2.2.0
type SDWANOperation struct {
Action IntentAction
Resource string
Name string
Description string
}
type SDWANPathMode ¶ added in v2.4.0
type SDWANPathMode string
const ( SDWANPathModeDirect SDWANPathMode = "direct" SDWANPathModeRelay SDWANPathMode = "relay" SDWANPathModeTransit SDWANPathMode = "transit" SDWANPathModeAuto SDWANPathMode = "auto" )
type SDWANPolicy ¶ added in v2.2.0
type SDWANSite ¶ added in v2.2.0
type SDWANSite struct {
Name string
Router string
CIDRs []string
Endpoint string
PublicKey string
Role string
Attributes map[string]string
L2Segments []string
Transit bool
Relay bool
}
func (SDWANSite) Validate ¶ added in v2.2.0
func (s SDWANSite) Validate(layer SDWANLayer) error
type SDWANSiteStatus ¶ added in v2.2.0
type SDWANStatus ¶ added in v2.2.0
type SDWANStatus struct {
State ResourceStatusState
Sites []SDWANSiteStatus
Links []SDWANLinkStatus
Findings []StatusFinding
LastApplied int
ResourceHash string
}
type SDWANTopology ¶ added in v2.2.0
type SDWANTopology string
const ( SDWANTopologyPartialMesh SDWANTopology = "partial-mesh" SDWANTopologyHubSpoke SDWANTopology = "hub-spoke" SDWANTopologyFullMesh SDWANTopology = "full-mesh" )
type SDWANTransport ¶ added in v2.2.0
type SDWANTransport string
const ( SDWANTransportWireGuard SDWANTransport = "wireguard" SDWANTransportGeneve SDWANTransport = "geneve" SDWANTransportVXLAN SDWANTransport = "vxlan" )
type SchemaRegistry ¶
type SchemaRegistry struct {
// contains filtered or unexported fields
}
SchemaRegistry captures the runtime capabilities advertised by an OVN/OVS database. Builders use it to fail fast for required columns and to skip optional version-specific columns.
func (*SchemaRegistry) Columns ¶
func (s *SchemaRegistry) Columns(table string) []string
Columns returns the schema columns for table, including _uuid first.
func (*SchemaRegistry) Database ¶
func (s *SchemaRegistry) Database() string
Database returns the OVSDB database name represented by the registry.
func (*SchemaRegistry) HasColumn ¶
func (s *SchemaRegistry) HasColumn(table, column string) bool
HasColumn reports whether table.column exists in the runtime schema.
func (*SchemaRegistry) HasTable ¶
func (s *SchemaRegistry) HasTable(table string) bool
HasTable reports whether the runtime schema contains table.
func (*SchemaRegistry) ReferenceColumnInfos ¶
func (s *SchemaRegistry) ReferenceColumnInfos(table, refTable string) []referenceColumnInfo
func (*SchemaRegistry) ReferenceColumns ¶
func (s *SchemaRegistry) ReferenceColumns(table, refTable string) []string
func (*SchemaRegistry) RequireColumns ¶
func (s *SchemaRegistry) RequireColumns(table string, columns ...string) error
RequireColumns returns ErrorInvalidSchema when any required column is missing.
func (*SchemaRegistry) RequireConditionColumns ¶
func (s *SchemaRegistry) RequireConditionColumns(table string, conditions ...libovsdb.Condition) error
func (*SchemaRegistry) RequireTable ¶
func (s *SchemaRegistry) RequireTable(table string) error
RequireTable returns ErrorInvalidSchema when table is unavailable.
func (*SchemaRegistry) Tables ¶
func (s *SchemaRegistry) Tables() []string
func (*SchemaRegistry) Version ¶
func (s *SchemaRegistry) Version() string
Version returns the runtime OVSDB schema version.
type SecurityPolicy ¶
type SecurityPolicy struct {
Name string
Subject string
Rules []SecurityRule
Owner OwnerRef
Labels Labels
}
func (SecurityPolicy) Validate ¶
func (p SecurityPolicy) Validate() error
type SecurityPolicyBuilder ¶
type SecurityPolicyBuilder struct {
// contains filtered or unexported fields
}
func (*SecurityPolicyBuilder) AddRule ¶
func (b *SecurityPolicyBuilder) AddRule(rule SecurityRule) *SecurityPolicyBuilder
func (*SecurityPolicyBuilder) DryRun ¶
func (b *SecurityPolicyBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*SecurityPolicyBuilder) Execute ¶
func (b *SecurityPolicyBuilder) Execute(ctx context.Context) error
func (*SecurityPolicyBuilder) ForSubject ¶
func (b *SecurityPolicyBuilder) ForSubject(subject string) *SecurityPolicyBuilder
func (*SecurityPolicyBuilder) Plan ¶
func (b *SecurityPolicyBuilder) Plan(ctx context.Context) (Plan, error)
func (*SecurityPolicyBuilder) Reconcile ¶
func (b *SecurityPolicyBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*SecurityPolicyBuilder) Validate ¶
func (b *SecurityPolicyBuilder) Validate() error
func (*SecurityPolicyBuilder) WithLabel ¶
func (b *SecurityPolicyBuilder) WithLabel(key, value string) *SecurityPolicyBuilder
func (*SecurityPolicyBuilder) WithOwner ¶
func (b *SecurityPolicyBuilder) WithOwner(kind, name string) *SecurityPolicyBuilder
type SecurityPolicyPatch ¶
type SecurityPolicyPatch struct {
Subject *string
ReplaceRules bool
Rules []SecurityRule
AddRules []SecurityRule
RemoveRules []string
Owner *OwnerRef
Labels Labels
RemoveLabels []string
}
type SecurityPolicyRef ¶
type SecurityPolicyRef struct {
// contains filtered or unexported fields
}
func (*SecurityPolicyRef) Apply ¶
func (r *SecurityPolicyRef) Apply(ctx context.Context, policy SecurityPolicy) error
func (*SecurityPolicyRef) Ensure ¶
func (r *SecurityPolicyRef) Ensure() *SecurityPolicyBuilder
func (*SecurityPolicyRef) Get ¶
func (r *SecurityPolicyRef) Get(ctx context.Context) (*SecurityPolicy, error)
func (*SecurityPolicyRef) Inspect ¶
func (r *SecurityPolicyRef) Inspect(ctx context.Context) (InspectResult, error)
func (*SecurityPolicyRef) Patch ¶
func (r *SecurityPolicyRef) Patch(ctx context.Context, patch SecurityPolicyPatch) (*SecurityPolicy, error)
type SecurityRule ¶
type ServiceBackend ¶ added in v2.1.0
func (ServiceBackend) String ¶ added in v2.1.0
func (b ServiceBackend) String() string
func (ServiceBackend) Validate ¶ added in v2.1.0
func (b ServiceBackend) Validate() error
type ServiceMonitorEvent ¶
type ServiceMonitorEvent struct {
Type EventType
Old *SBServiceMonitor
New *SBServiceMonitor
}
type ServicePatch ¶ added in v2.1.0
type ServicePatch struct {
ReplaceVIPs bool
VIPs []ServiceVIP
AddVIPs []ServiceVIP
RemoveVIPs []string
Protocol *string
AttachToRouter *string
Owner *OwnerRef
Labels Labels
RemoveLabels []string
}
type ServicePort ¶ added in v2.1.0
type ServiceVIP ¶ added in v2.1.0
type ServiceVIP struct {
Address string
Port int
Backends []ServiceBackend
}
func (ServiceVIP) BackendsString ¶ added in v2.1.0
func (v ServiceVIP) BackendsString() string
func (ServiceVIP) String ¶ added in v2.1.0
func (v ServiceVIP) String() string
func (ServiceVIP) Validate ¶ added in v2.1.0
func (v ServiceVIP) Validate() error
type StatusFinding ¶ added in v2.1.0
type TableBuilder ¶
type TableBuilder struct {
// contains filtered or unexported fields
}
TableBuilder builds a single-row table operation. Map and set mutations use OVSDB mutate by default so external controller-owned keys are preserved.
func (*TableBuilder) DeleteMap ¶
func (b *TableBuilder) DeleteMap(column string, values map[string]string) *TableBuilder
DeleteMap removes map entries from column.
func (*TableBuilder) DeleteSet ¶
func (b *TableBuilder) DeleteSet(column string, values ...any) *TableBuilder
DeleteSet removes one or more set values from column.
func (*TableBuilder) DeleteUUIDSet ¶
func (b *TableBuilder) DeleteUUIDSet(column string, uuids ...string) *TableBuilder
DeleteUUIDSet removes UUID references from a set column.
func (*TableBuilder) Execute ¶
func (b *TableBuilder) Execute(ctx context.Context) error
Execute commits the configured operation.
func (*TableBuilder) MutateMap ¶
func (b *TableBuilder) MutateMap(column string, values map[string]string) *TableBuilder
MutateMap inserts map entries into column.
func (*TableBuilder) MutateSet ¶
func (b *TableBuilder) MutateSet(column string, values ...any) *TableBuilder
MutateSet inserts one or more set values into column.
func (*TableBuilder) MutateUUIDSet ¶
func (b *TableBuilder) MutateUUIDSet(column string, uuids ...string) *TableBuilder
MutateUUIDSet inserts UUID references into a set column.
func (*TableBuilder) SelectColumns ¶
func (b *TableBuilder) SelectColumns(columns ...string) *TableBuilder
SelectColumns constrains columns used by Get/List helpers chained from tests and future extensions.
func (*TableBuilder) WithACL ¶
func (b *TableBuilder) WithACL(direction string, priority int, match, action string) *TableBuilder
func (*TableBuilder) WithAction ¶
func (b *TableBuilder) WithAction(action string) *TableBuilder
WithAction sets an action column.
func (*TableBuilder) WithAddressSetAddresses ¶
func (b *TableBuilder) WithAddressSetAddresses(addresses ...string) *TableBuilder
func (*TableBuilder) WithAddresses ¶
func (b *TableBuilder) WithAddresses(addresses ...string) *TableBuilder
WithAddresses sets an OVSDB set of string addresses.
func (*TableBuilder) WithBFDLogicalPort ¶
func (b *TableBuilder) WithBFDLogicalPort(port string) *TableBuilder
func (*TableBuilder) WithBFDStatus ¶
func (b *TableBuilder) WithBFDStatus(status string) *TableBuilder
func (*TableBuilder) WithChassis ¶
func (b *TableBuilder) WithChassis(uuid string) *TableBuilder
func (*TableBuilder) WithColumn ¶
func (b *TableBuilder) WithColumn(column string, value any) *TableBuilder
WithColumn sets a column in the insert/update row.
func (*TableBuilder) WithController ¶
func (b *TableBuilder) WithController(target string) *TableBuilder
func (*TableBuilder) WithDHCPOption ¶
func (b *TableBuilder) WithDHCPOption(key, value string) *TableBuilder
func (*TableBuilder) WithDNSRecord ¶
func (b *TableBuilder) WithDNSRecord(name, value string) *TableBuilder
func (*TableBuilder) WithDatapath ¶
func (b *TableBuilder) WithDatapath(uuid string) *TableBuilder
func (*TableBuilder) WithDirection ¶
func (b *TableBuilder) WithDirection(direction string) *TableBuilder
WithDirection sets a direction column, commonly from-lport or to-lport.
func (*TableBuilder) WithEncap ¶
func (b *TableBuilder) WithEncap(kind, ip string) *TableBuilder
func (*TableBuilder) WithExternalID ¶
func (b *TableBuilder) WithExternalID(key, value string) *TableBuilder
WithExternalID mutates external_ids without replacing existing keys.
func (*TableBuilder) WithGatewayPriority ¶
func (b *TableBuilder) WithGatewayPriority(priority int) *TableBuilder
func (*TableBuilder) WithLogicalPort ¶
func (b *TableBuilder) WithLogicalPort(port string) *TableBuilder
WithLogicalPort sets logical_port.
func (*TableBuilder) WithMAC ¶
func (b *TableBuilder) WithMAC(mac string) *TableBuilder
func (*TableBuilder) WithManager ¶
func (b *TableBuilder) WithManager(target string) *TableBuilder
func (*TableBuilder) WithMatch ¶
func (b *TableBuilder) WithMatch(match string) *TableBuilder
WithMatch sets a match expression column.
func (*TableBuilder) WithMirrorSelectAll ¶
func (b *TableBuilder) WithMirrorSelectAll() *TableBuilder
func (*TableBuilder) WithNAT ¶
func (b *TableBuilder) WithNAT(kind, logicalIP, externalIP string) *TableBuilder
func (*TableBuilder) WithName ¶
func (b *TableBuilder) WithName(name string) *TableBuilder
WithName sets the conventional name column.
func (*TableBuilder) WithNetworks ¶
func (b *TableBuilder) WithNetworks(networks ...string) *TableBuilder
WithNetworks sets an OVSDB set of network CIDRs.
func (*TableBuilder) WithOption ¶
func (b *TableBuilder) WithOption(key, value string) *TableBuilder
WithOption mutates options without replacing existing keys.
func (*TableBuilder) WithOptionalColumn ¶
func (b *TableBuilder) WithOptionalColumn(column string, value any) *TableBuilder
WithOptionalColumn sets a column only if the runtime schema supports it.
func (*TableBuilder) WithPortGroupPorts ¶
func (b *TableBuilder) WithPortGroupPorts(portUUIDs ...string) *TableBuilder
func (*TableBuilder) WithPriority ¶
func (b *TableBuilder) WithPriority(priority int) *TableBuilder
WithPriority sets a priority column.
func (*TableBuilder) WithQoSType ¶
func (b *TableBuilder) WithQoSType(kind string) *TableBuilder
func (*TableBuilder) WithQueueDSCP ¶
func (b *TableBuilder) WithQueueDSCP(dscp int) *TableBuilder
func (*TableBuilder) WithQueueOtherConfig ¶
func (b *TableBuilder) WithQueueOtherConfig(key, value string) *TableBuilder
func (*TableBuilder) WithRouterPort ¶
func (b *TableBuilder) WithRouterPort(mac string, networks ...string) *TableBuilder
func (*TableBuilder) WithSamplingTarget ¶
func (b *TableBuilder) WithSamplingTarget(target string) *TableBuilder
func (*TableBuilder) WithTarget ¶
func (b *TableBuilder) WithTarget(target string) *TableBuilder
WithTarget sets target, used by OVSDB Connection and Manager-like tables.
func (*TableBuilder) WithTier ¶
func (b *TableBuilder) WithTier(tier int) *TableBuilder
WithTier sets a tier column when supported by newer schemas.
func (*TableBuilder) WithType ¶
func (b *TableBuilder) WithType(kind string) *TableBuilder
WithType sets the conventional type column.
func (*TableBuilder) WithUUIDRef ¶
func (b *TableBuilder) WithUUIDRef(column, uuid string) *TableBuilder
WithUUIDRef sets a UUID reference column.
func (*TableBuilder) WithUUIDSet ¶
func (b *TableBuilder) WithUUIDSet(column string, uuids ...string) *TableBuilder
WithUUIDSet sets a UUID set column.
func (*TableBuilder) WithVIP ¶
func (b *TableBuilder) WithVIP(vip, backends string) *TableBuilder
type TableRef ¶
type TableRef struct {
// contains filtered or unexported fields
}
TableRef is a runtime-schema-aware fluent handle for any OVSDB table. Typed NB/SB/OVS APIs are thin wrappers over this for less common tables.
func (*TableRef) AddUUID ¶
func (r *TableRef) AddUUID(column, uuid string) *TableBuilder
func (*TableRef) Create ¶
func (r *TableRef) Create() *TableBuilder
Create starts an insert operation.
func (*TableRef) Delete ¶
func (r *TableRef) Delete() *TableBuilder
Delete starts a delete operation.
func (*TableRef) DeleteUUID ¶
func (r *TableRef) DeleteUUID(column, uuid string) *TableBuilder
func (*TableRef) Ensure ¶
func (r *TableRef) Ensure() *TableBuilder
Ensure starts an idempotent create-or-mutate operation.
func (*TableRef) List ¶
List selects rows from this table. Identity and explicit Where conditions are both honored; an empty reference returns the full table.
func (*TableRef) Update ¶
func (r *TableRef) Update() *TableBuilder
Update starts a mutate/update operation for an existing row.
func (*TableRef) WhereCondition ¶
func (r *TableRef) WhereCondition(column string, fn libovsdb.ConditionFunction, value any) *TableRef
WhereCondition adds a condition to this table reference.
type VirtualNetwork ¶
type VirtualNetwork struct {
Name string
CIDRs []string
Gateway string
DNS LogicalSwitchDNS
Owner OwnerRef
Labels Labels
}
func (VirtualNetwork) Validate ¶
func (v VirtualNetwork) Validate() error
type VirtualNetworkBuilder ¶
type VirtualNetworkBuilder struct {
// contains filtered or unexported fields
}
func (*VirtualNetworkBuilder) DryRun ¶
func (b *VirtualNetworkBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*VirtualNetworkBuilder) Execute ¶
func (b *VirtualNetworkBuilder) Execute(ctx context.Context) error
func (*VirtualNetworkBuilder) Plan ¶
func (b *VirtualNetworkBuilder) Plan(ctx context.Context) (Plan, error)
func (*VirtualNetworkBuilder) Reconcile ¶
func (b *VirtualNetworkBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*VirtualNetworkBuilder) Validate ¶
func (b *VirtualNetworkBuilder) Validate() error
func (*VirtualNetworkBuilder) WithCIDR ¶
func (b *VirtualNetworkBuilder) WithCIDR(cidr string) *VirtualNetworkBuilder
func (*VirtualNetworkBuilder) WithDNS ¶
func (b *VirtualNetworkBuilder) WithDNS(name string, configure func(*LogicalSwitchDNSBuilder)) *VirtualNetworkBuilder
func (*VirtualNetworkBuilder) WithGateway ¶
func (b *VirtualNetworkBuilder) WithGateway(ip string) *VirtualNetworkBuilder
func (*VirtualNetworkBuilder) WithLabel ¶
func (b *VirtualNetworkBuilder) WithLabel(key, value string) *VirtualNetworkBuilder
func (*VirtualNetworkBuilder) WithOwner ¶
func (b *VirtualNetworkBuilder) WithOwner(kind, name string) *VirtualNetworkBuilder
type VirtualNetworkPatch ¶
type VirtualNetworkRef ¶
type VirtualNetworkRef struct {
// contains filtered or unexported fields
}
func (*VirtualNetworkRef) Apply ¶
func (r *VirtualNetworkRef) Apply(ctx context.Context, network VirtualNetwork) error
func (*VirtualNetworkRef) Ensure ¶
func (r *VirtualNetworkRef) Ensure() *VirtualNetworkBuilder
func (*VirtualNetworkRef) Get ¶
func (r *VirtualNetworkRef) Get(ctx context.Context) (*VirtualNetwork, error)
func (*VirtualNetworkRef) Inspect ¶
func (r *VirtualNetworkRef) Inspect(ctx context.Context) (InspectResult, error)
func (*VirtualNetworkRef) Patch ¶
func (r *VirtualNetworkRef) Patch(ctx context.Context, patch VirtualNetworkPatch) (*VirtualNetwork, error)
type WorkloadAttachment ¶
type WorkloadAttachment struct {
Name string
Network string
Workload string
InterfaceName string
MAC string
IPs []string
LocalOVS WorkloadLocalOVS
Owner OwnerRef
Labels Labels
}
func (WorkloadAttachment) Validate ¶
func (w WorkloadAttachment) Validate() error
type WorkloadAttachmentBuilder ¶
type WorkloadAttachmentBuilder struct {
// contains filtered or unexported fields
}
func (*WorkloadAttachmentBuilder) DryRun ¶
func (b *WorkloadAttachmentBuilder) DryRun(ctx context.Context) (DryRunResult, error)
func (*WorkloadAttachmentBuilder) Execute ¶
func (b *WorkloadAttachmentBuilder) Execute(ctx context.Context) error
func (*WorkloadAttachmentBuilder) OnNetwork ¶
func (b *WorkloadAttachmentBuilder) OnNetwork(name string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) Plan ¶
func (b *WorkloadAttachmentBuilder) Plan(ctx context.Context) (Plan, error)
func (*WorkloadAttachmentBuilder) Reconcile ¶
func (b *WorkloadAttachmentBuilder) Reconcile(ctx context.Context) (ReconcileResult, error)
func (*WorkloadAttachmentBuilder) SyncLocalOVS ¶
func (b *WorkloadAttachmentBuilder) SyncLocalOVS(bridge string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) Validate ¶
func (b *WorkloadAttachmentBuilder) Validate() error
func (*WorkloadAttachmentBuilder) WithIP ¶
func (b *WorkloadAttachmentBuilder) WithIP(ip string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithInterface ¶
func (b *WorkloadAttachmentBuilder) WithInterface(name string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithLabel ¶
func (b *WorkloadAttachmentBuilder) WithLabel(key, value string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithMAC ¶
func (b *WorkloadAttachmentBuilder) WithMAC(mac string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithOVSInterface ¶
func (b *WorkloadAttachmentBuilder) WithOVSInterface(name string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithOVSInterfaceType ¶
func (b *WorkloadAttachmentBuilder) WithOVSInterfaceType(kind string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithOVSOption ¶
func (b *WorkloadAttachmentBuilder) WithOVSOption(key, value string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithOVSPort ¶
func (b *WorkloadAttachmentBuilder) WithOVSPort(name string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithOwner ¶
func (b *WorkloadAttachmentBuilder) WithOwner(kind, name string) *WorkloadAttachmentBuilder
func (*WorkloadAttachmentBuilder) WithWorkload ¶
func (b *WorkloadAttachmentBuilder) WithWorkload(name string) *WorkloadAttachmentBuilder
type WorkloadAttachmentPatch ¶
type WorkloadAttachmentRef ¶
type WorkloadAttachmentRef struct {
// contains filtered or unexported fields
}
func (*WorkloadAttachmentRef) Apply ¶
func (r *WorkloadAttachmentRef) Apply(ctx context.Context, attachment WorkloadAttachment) error
func (*WorkloadAttachmentRef) Delete ¶
func (r *WorkloadAttachmentRef) Delete(ctx context.Context) error
func (*WorkloadAttachmentRef) DetachLocalOVS ¶
func (r *WorkloadAttachmentRef) DetachLocalOVS(ctx context.Context) error
func (*WorkloadAttachmentRef) Ensure ¶
func (r *WorkloadAttachmentRef) Ensure() *WorkloadAttachmentBuilder
func (*WorkloadAttachmentRef) Get ¶
func (r *WorkloadAttachmentRef) Get(ctx context.Context) (*WorkloadAttachment, error)
func (*WorkloadAttachmentRef) Inspect ¶
func (r *WorkloadAttachmentRef) Inspect(ctx context.Context) (InspectResult, error)
func (*WorkloadAttachmentRef) Patch ¶
func (r *WorkloadAttachmentRef) Patch(ctx context.Context, patch WorkloadAttachmentPatch) (*WorkloadAttachment, error)
type WorkloadLocalOVS ¶
type WorkloadLocalOVS struct {
Bridge string
PortName string
InterfaceName string
InterfaceType string
Options map[string]string
}
func (WorkloadLocalOVS) Empty ¶
func (o WorkloadLocalOVS) Empty() bool
func (WorkloadLocalOVS) Validate ¶
func (o WorkloadLocalOVS) Validate() error
type WorkloadPathStatus ¶ added in v2.1.0
type WorkloadPathStatus struct {
Name string `json:"name"`
State ResourceStatusState `json:"state"`
Attachment *WorkloadAttachment `json:"attachment,omitempty"`
Doctor *DoctorReport `json:"doctor,omitempty"`
Ownership *OwnershipAuditReport `json:"ownership,omitempty"`
Findings []StatusFinding `json:"findings,omitempty"`
Degraded bool `json:"degraded"`
ReadOnly bool `json:"read_only"`
}
Source Files
¶
- cleanup.go
- config.go
- doc.go
- doctor.go
- errors.go
- fluent.go
- gates.go
- integration_config.go
- intent.go
- ipam.go
- model.go
- nb.go
- nb_northbound_gateway.go
- nb_northbound_groups.go
- nb_northbound_helpers.go
- nb_northbound_l3.go
- nb_northbound_models.go
- nb_northbound_services.go
- nb_runtime.go
- openflow_client.go
- openflow_intent.go
- openflow_protocol.go
- ovs.go
- ovs_runtime.go
- ownership.go
- ownership_audit.go
- planning.go
- qos_intent.go
- sb.go
- sb_runtime.go
- schema.go
- sdwan.go
- sdwan_agent.go
- service_intent.go
- status.go
- util.go
- watch.go
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
local_ovs
command
|
|
|
logical_switch
command
|
|
|
southbound_watch
command
|
|
|
internal
|
|