Documentation ¶
Index ¶
- Constants
- Variables
- type ICNB
- func (o *ICNB) CreateTransitSwitch(ctx context.Context, name string, mayExist bool) error
- func (o *ICNB) CreateTransitSwitchAllocation(ctx context.Context, switchName string, azName string) (*net.IPNet, *net.IPNet, error)
- func (o *ICNB) DeleteTransitSwitch(ctx context.Context, name string, force bool) error
- func (o *ICNB) DeleteTransitSwitchAllocation(ctx context.Context, switchName string, azName string) error
- type ICSB
- type NB
- func (o *NB) CleanupLogicalSwitchPort(ctx context.Context, portName OVNSwitchPort, switchName OVNSwitch, ...) error
- func (o *NB) ClearPortGroupPortACLRules(ctx context.Context, portGroupName OVNPortGroup, portName OVNSwitchPort) error
- func (o *NB) CreateAddressSet(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) CreateChassisGroup(ctx context.Context, haChassisGroupName OVNChassisGroup, mayExist bool) error
- func (o *NB) CreateLoadBalancer(ctx context.Context, loadBalancerName OVNLoadBalancer, routerName OVNRouter, ...) error
- func (o *NB) CreateLogicalRouter(ctx context.Context, routerName OVNRouter, mayExist bool) error
- func (o *NB) CreateLogicalRouterNAT(ctx context.Context, routerName OVNRouter, natType string, intNet *net.IPNet, ...) error
- func (o *NB) CreateLogicalRouterPeering(ctx context.Context, opts OVNRouterPeering) error
- func (o *NB) CreateLogicalRouterPort(ctx context.Context, routerName OVNRouter, portName OVNRouterPort, ...) error
- func (o *NB) CreateLogicalRouterRoute(ctx context.Context, routerName OVNRouter, mayExist bool, ...) error
- func (o *NB) CreateLogicalSwitch(ctx context.Context, switchName OVNSwitch, mayExist bool) error
- func (o *NB) CreateLogicalSwitchPort(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort, ...) error
- func (o *NB) CreatePortGroup(ctx context.Context, projectID int64, portGroupName OVNPortGroup, ...) error
- func (o *NB) DeleteAddressSet(ctx context.Context, addressSetPrefix OVNAddressSet) error
- func (o *NB) DeleteChassisGroup(ctx context.Context, haChassisGroupName OVNChassisGroup) error
- func (o *NB) DeleteLoadBalancer(ctx context.Context, loadBalancerNames ...OVNLoadBalancer) error
- func (o *NB) DeleteLogicalRouter(ctx context.Context, routerName OVNRouter) error
- func (o *NB) DeleteLogicalRouterNAT(ctx context.Context, routerName OVNRouter, natType string, all bool, ...) error
- func (o *NB) DeleteLogicalRouterPeering(ctx context.Context, opts OVNRouterPeering) error
- func (o *NB) DeleteLogicalRouterPort(ctx context.Context, routerName OVNRouter, portName OVNRouterPort) error
- func (o *NB) DeleteLogicalRouterRoute(ctx context.Context, routerName OVNRouter, prefixes ...net.IPNet) error
- func (o *NB) DeleteLogicalSwitch(ctx context.Context, switchName OVNSwitch) error
- func (o *NB) DeleteLogicalSwitchDHCPOption(ctx context.Context, switchName OVNSwitch, uuids ...OVNDHCPOptionsUUID) error
- func (o *NB) DeleteLogicalSwitchPort(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort) error
- func (o *NB) DeleteLogicalSwitchPortDNS(ctx context.Context, switchName OVNSwitch, dnsUUID OVNDNSUUID, ...) error
- func (o *NB) DeletePortGroup(ctx context.Context, portGroupNames ...OVNPortGroup) error
- func (o *NB) GetLogicalRouter(ctx context.Context, routerName OVNRouter) (*ovnNB.LogicalRouter, error)
- func (o *NB) GetLogicalRouterPort(ctx context.Context, portName OVNRouterPort) (*ovnNB.LogicalRouterPort, error)
- func (o *NB) GetLogicalRouterPortHardwareAddress(ctx context.Context, ovnRouterPort OVNRouterPort) (string, error)
- func (o *NB) GetLogicalRouterRoutes(ctx context.Context, routerName OVNRouter) ([]OVNRouterRoute, error)
- func (o *NB) GetLogicalSwitch(ctx context.Context, switchName OVNSwitch) (*ovnNB.LogicalSwitch, error)
- func (o *NB) GetLogicalSwitchDHCPOptions(ctx context.Context, switchName OVNSwitch) ([]OVNDHCPOptsSet, error)
- func (o *NB) GetLogicalSwitchDHCPv4Revervations(ctx context.Context, switchName OVNSwitch) ([]iprange.Range, error)
- func (o *NB) GetLogicalSwitchIPs(ctx context.Context, switchName OVNSwitch) (map[OVNSwitchPort][]net.IP, error)
- func (o *NB) GetLogicalSwitchPortDNS(ctx context.Context, portName OVNSwitchPort) (OVNDNSUUID, string, []net.IP, error)
- func (o *NB) GetLogicalSwitchPortDynamicIPs(ctx context.Context, portName OVNSwitchPort) ([]net.IP, error)
- func (o *NB) GetLogicalSwitchPortIPs(ctx context.Context, portName OVNSwitchPort) ([]net.IP, error)
- func (o *NB) GetLogicalSwitchPortLocation(ctx context.Context, portName OVNSwitchPort) (string, error)
- func (o *NB) GetLogicalSwitchPortUUID(ctx context.Context, portName OVNSwitchPort) (OVNSwitchPortUUID, error)
- func (o *NB) GetLogicalSwitchPorts(ctx context.Context, switchName OVNSwitch) (map[OVNSwitchPort]OVNSwitchPortUUID, error)
- func (o *NB) GetName(ctx context.Context) (string, error)
- func (o *NB) GetPortGroupInfo(ctx context.Context, portGroupName OVNPortGroup) (OVNPortGroupUUID, bool, error)
- func (o *NB) GetPortGroupsByProject(ctx context.Context, projectID int64) ([]OVNPortGroup, error)
- func (o *NB) SetChassisGroupPriority(ctx context.Context, haChassisGroupName OVNChassisGroup, chassisID string, ...) error
- func (o *NB) UpdateAddressSetAdd(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) UpdateAddressSetRemove(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) UpdateLogicalRouterPolicy(ctx context.Context, routerName OVNRouter, policies ...OVNRouterPolicy) error
- func (o *NB) UpdateLogicalRouterPort(ctx context.Context, portName OVNRouterPort, ipv6ra *OVNIPv6RAOpts) error
- func (o *NB) UpdateLogicalSwitchACLRules(ctx context.Context, switchName OVNSwitch, aclRules ...OVNACLRule) error
- func (o *NB) UpdateLogicalSwitchDHCPv4Options(ctx context.Context, switchName OVNSwitch, uuid OVNDHCPOptionsUUID, ...) error
- func (o *NB) UpdateLogicalSwitchDHCPv4Revervations(ctx context.Context, switchName OVNSwitch, reservedIPs []iprange.Range) error
- func (o *NB) UpdateLogicalSwitchDHCPv6Options(ctx context.Context, switchName OVNSwitch, uuid OVNDHCPOptionsUUID, ...) error
- func (o *NB) UpdateLogicalSwitchIPAllocation(ctx context.Context, switchName OVNSwitch, opts *OVNIPAllocationOpts) error
- func (o *NB) UpdateLogicalSwitchPortDNS(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort, ...) (OVNDNSUUID, error)
- func (o *NB) UpdateLogicalSwitchPortLinkProviderNetwork(ctx context.Context, switchPortName OVNSwitchPort, extNetworkName string) error
- func (o *NB) UpdateLogicalSwitchPortLinkRouter(ctx context.Context, switchPortName OVNSwitchPort, ...) error
- func (o *NB) UpdateLogicalSwitchPortOptions(ctx context.Context, portName OVNSwitchPort, options map[string]string) error
- func (o *NB) UpdatePortGroupACLRules(ctx context.Context, portGroupName OVNPortGroup, ...) error
- func (o *NB) UpdatePortGroupMembers(ctx context.Context, addMembers map[OVNPortGroup][]OVNSwitchPortUUID, ...) error
- func (o *NB) UpdatePortGroupPortACLRules(ctx context.Context, portGroupName OVNPortGroup, portName OVNSwitchPort, ...) error
- type OVNACLRule
- type OVNAddressSet
- type OVNChassisGroup
- type OVNDHCPOptionsUUID
- type OVNDHCPOptsSet
- type OVNDHCPv4Opts
- type OVNDHCPv6Opts
- type OVNDNSUUID
- type OVNIPAllocationOpts
- type OVNIPv6AddressMode
- type OVNIPv6RAOpts
- type OVNLoadBalancer
- type OVNLoadBalancerHealthCheck
- type OVNLoadBalancerTarget
- type OVNLoadBalancerVIP
- type OVNPortGroup
- type OVNPortGroupUUID
- type OVNRouter
- type OVNRouterPeering
- type OVNRouterPolicy
- type OVNRouterPort
- type OVNRouterRoute
- type OVNSwitch
- type OVNSwitchPort
- type OVNSwitchPortOpts
- type OVNSwitchPortUUID
- type SB
Constants ¶
const ( TCPFIN = 0x001 TCPSYN = 0x002 TCPRST = 0x004 TCPPSH = 0x008 TCPACK = 0x010 TCPURG = 0x020 TCPECE = 0x040 TCPCWR = 0x080 TCPNS = 0x100 )
OVS TCP Flags from OVS lib/packets.h.
Variables ¶
var ErrExists = fmt.Errorf("object already exists")
ErrExists indicates that a DB record already exists.
var ErrNotFound = ovsdbClient.ErrNotFound
ErrNotFound indicates that a DB record doesn't exist.
var ErrNotManaged = fmt.Errorf("object not incus-managed")
ErrNotManaged indicates that a DB record wasn't created by Incus.
Functions ¶
This section is empty.
Types ¶
type ICNB ¶
type ICNB struct {
// contains filtered or unexported fields
}
ICNB client.
func NewICNB ¶
func NewICNB(dbAddr string, sslCACert string, sslClientCert string, sslClientKey string) (*ICNB, error)
NewICNB initializes new OVN client for Northbound IC operations.
func (*ICNB) CreateTransitSwitch ¶
CreateTransitSwitch creates a new managed transit switch.
func (*ICNB) CreateTransitSwitchAllocation ¶ added in v6.0.2
func (o *ICNB) CreateTransitSwitchAllocation(ctx context.Context, switchName string, azName string) (*net.IPNet, *net.IPNet, error)
CreateTransitSwitchAllocation creates a new allocation on the switch.
func (*ICNB) DeleteTransitSwitch ¶
DeleteTransitSwitch deletes an existing transit switch. The force parameter is required to delete a transit switch which wasn't created by Incus.
type ICSB ¶
type ICSB struct {
// contains filtered or unexported fields
}
ICSB client.
type NB ¶
type NB struct {
// contains filtered or unexported fields
}
NB client.
func (*NB) CleanupLogicalSwitchPort ¶ added in v6.0.2
func (o *NB) CleanupLogicalSwitchPort(ctx context.Context, portName OVNSwitchPort, switchName OVNSwitch, switchPortGroupName OVNPortGroup, dnsUUID OVNDNSUUID) error
CleanupLogicalSwitchPort deletes the named logical switch port and its associated config.
func (*NB) ClearPortGroupPortACLRules ¶ added in v6.0.2
func (o *NB) ClearPortGroupPortACLRules(ctx context.Context, portGroupName OVNPortGroup, portName OVNSwitchPort) error
ClearPortGroupPortACLRules clears any rules assigned to the logical switch port in the specified port group.
func (*NB) CreateAddressSet ¶ added in v6.0.2
func (o *NB) CreateAddressSet(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
CreateAddressSet creates address sets for IP versions 4 and 6 in the format "<addressSetPrefix>_ip<IP version>". Populates them with the relevant addresses supplied.
func (*NB) CreateChassisGroup ¶
func (o *NB) CreateChassisGroup(ctx context.Context, haChassisGroupName OVNChassisGroup, mayExist bool) error
CreateChassisGroup adds a new HA chassis group. If mayExist is true, then an existing resource of the same name is not treated as an error.
func (*NB) CreateLoadBalancer ¶ added in v6.0.2
func (o *NB) CreateLoadBalancer(ctx context.Context, loadBalancerName OVNLoadBalancer, routerName OVNRouter, switchName OVNSwitch, vips ...OVNLoadBalancerVIP) error
CreateLoadBalancer creates a new load balancer (if doesn't exist) on the specified router and switch. Providing an empty set of vips will delete the load balancer.
func (*NB) CreateLogicalRouter ¶
CreateLogicalRouter adds a named logical router. If mayExist is true, then an existing resource of the same name is not treated as an error.
func (*NB) CreateLogicalRouterNAT ¶
func (o *NB) CreateLogicalRouterNAT(ctx context.Context, routerName OVNRouter, natType string, intNet *net.IPNet, extIP net.IP, intIP net.IP, stateless bool, mayExist bool) error
CreateLogicalRouterNAT adds an SNAT or DNAT rule to a logical router to translate packets from intNet to extIP.
func (*NB) CreateLogicalRouterPeering ¶ added in v6.0.2
func (o *NB) CreateLogicalRouterPeering(ctx context.Context, opts OVNRouterPeering) error
CreateLogicalRouterPeering applies a peering relationship between two logical routers.
func (*NB) CreateLogicalRouterPort ¶
func (o *NB) CreateLogicalRouterPort(ctx context.Context, routerName OVNRouter, portName OVNRouterPort, mac net.HardwareAddr, gatewayMTU uint32, ipAddr []*net.IPNet, haChassisGroupName OVNChassisGroup, mayExist bool) error
CreateLogicalRouterPort adds a named logical router port to a logical router.
func (*NB) CreateLogicalRouterRoute ¶ added in v6.0.2
func (o *NB) CreateLogicalRouterRoute(ctx context.Context, routerName OVNRouter, mayExist bool, routes ...OVNRouterRoute) error
CreateLogicalRouterRoute adds a static route to the logical router.
func (*NB) CreateLogicalSwitch ¶
CreateLogicalSwitch adds a named logical switch. If mayExist is true, then an existing resource of the same name is not treated as an error.
func (*NB) CreateLogicalSwitchPort ¶
func (o *NB) CreateLogicalSwitchPort(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort, opts *OVNSwitchPortOpts, mayExist bool) error
CreateLogicalSwitchPort adds a named logical switch port to a logical switch, and sets options if provided. If mayExist is true, then an existing resource of the same name is not treated as an error.
func (*NB) CreatePortGroup ¶ added in v6.0.2
func (o *NB) CreatePortGroup(ctx context.Context, projectID int64, portGroupName OVNPortGroup, associatedPortGroup OVNPortGroup, associatedSwitch OVNSwitch, initialPortMembers ...OVNSwitchPort) error
CreatePortGroup creates a new port group and optionally adds logical switch ports to the group.
func (*NB) DeleteAddressSet ¶ added in v6.0.2
func (o *NB) DeleteAddressSet(ctx context.Context, addressSetPrefix OVNAddressSet) error
DeleteAddressSet deletes address sets for IP versions 4 and 6 in the format "<addressSetPrefix>_ip<IP version>".
func (*NB) DeleteChassisGroup ¶
func (o *NB) DeleteChassisGroup(ctx context.Context, haChassisGroupName OVNChassisGroup) error
DeleteChassisGroup deletes an HA chassis group.
func (*NB) DeleteLoadBalancer ¶ added in v6.0.2
func (o *NB) DeleteLoadBalancer(ctx context.Context, loadBalancerNames ...OVNLoadBalancer) error
DeleteLoadBalancer deletes the specified load balancer(s).
func (*NB) DeleteLogicalRouter ¶
DeleteLogicalRouter deletes a named logical router.
func (*NB) DeleteLogicalRouterNAT ¶
func (o *NB) DeleteLogicalRouterNAT(ctx context.Context, routerName OVNRouter, natType string, all bool, extIPs ...net.IP) error
DeleteLogicalRouterNAT deletes all NAT rules of a particular type from a logical router.
func (*NB) DeleteLogicalRouterPeering ¶ added in v6.0.2
func (o *NB) DeleteLogicalRouterPeering(ctx context.Context, opts OVNRouterPeering) error
DeleteLogicalRouterPeering deletes a peering relationship between two logical routers. Requires LocalRouter, LocalRouterPort, TargetRouter and TargetRouterPort opts fields to be populated.
func (*NB) DeleteLogicalRouterPort ¶
func (o *NB) DeleteLogicalRouterPort(ctx context.Context, routerName OVNRouter, portName OVNRouterPort) error
DeleteLogicalRouterPort deletes a named logical router port from a logical router.
func (*NB) DeleteLogicalRouterRoute ¶ added in v6.0.2
func (o *NB) DeleteLogicalRouterRoute(ctx context.Context, routerName OVNRouter, prefixes ...net.IPNet) error
DeleteLogicalRouterRoute deletes a static route from the logical router.
func (*NB) DeleteLogicalSwitch ¶ added in v6.0.2
DeleteLogicalSwitch deletes a named logical switch.
func (*NB) DeleteLogicalSwitchDHCPOption ¶ added in v6.0.2
func (o *NB) DeleteLogicalSwitchDHCPOption(ctx context.Context, switchName OVNSwitch, uuids ...OVNDHCPOptionsUUID) error
DeleteLogicalSwitchDHCPOption deletes the specified DHCP options defined for a switch.
func (*NB) DeleteLogicalSwitchPort ¶
func (o *NB) DeleteLogicalSwitchPort(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort) error
DeleteLogicalSwitchPort deletes a named logical switch port.
func (*NB) DeleteLogicalSwitchPortDNS ¶ added in v6.0.2
func (o *NB) DeleteLogicalSwitchPortDNS(ctx context.Context, switchName OVNSwitch, dnsUUID OVNDNSUUID, destroyEntry bool) error
DeleteLogicalSwitchPortDNS removes DNS records from a switch port. If destroyEntry the DNS entry record itself is also removed, otherwise it is just cleared but left in place.
func (*NB) DeletePortGroup ¶ added in v6.0.2
func (o *NB) DeletePortGroup(ctx context.Context, portGroupNames ...OVNPortGroup) error
DeletePortGroup deletes port groups along with their ACL rules.
func (*NB) GetLogicalRouter ¶ added in v6.0.2
func (o *NB) GetLogicalRouter(ctx context.Context, routerName OVNRouter) (*ovnNB.LogicalRouter, error)
GetLogicalRouter gets the OVN database record for the router.
func (*NB) GetLogicalRouterPort ¶
func (o *NB) GetLogicalRouterPort(ctx context.Context, portName OVNRouterPort) (*ovnNB.LogicalRouterPort, error)
GetLogicalRouterPort gets the OVN database record for the logical router port.
func (*NB) GetLogicalRouterPortHardwareAddress ¶ added in v6.0.2
func (o *NB) GetLogicalRouterPortHardwareAddress(ctx context.Context, ovnRouterPort OVNRouterPort) (string, error)
GetLogicalRouterPortHardwareAddress gets the hardware address of the logical router port.
func (*NB) GetLogicalRouterRoutes ¶ added in v6.0.2
func (o *NB) GetLogicalRouterRoutes(ctx context.Context, routerName OVNRouter) ([]OVNRouterRoute, error)
GetLogicalRouterRoutes returns a list of static routes in the main route table of the logical router.
func (*NB) GetLogicalSwitch ¶
func (o *NB) GetLogicalSwitch(ctx context.Context, switchName OVNSwitch) (*ovnNB.LogicalSwitch, error)
GetLogicalSwitch gets the OVN database record for the switch.
func (*NB) GetLogicalSwitchDHCPOptions ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchDHCPOptions(ctx context.Context, switchName OVNSwitch) ([]OVNDHCPOptsSet, error)
GetLogicalSwitchDHCPOptions retrieves the existing DHCP options defined for a logical switch.
func (*NB) GetLogicalSwitchDHCPv4Revervations ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchDHCPv4Revervations(ctx context.Context, switchName OVNSwitch) ([]iprange.Range, error)
GetLogicalSwitchDHCPv4Revervations gets the DHCPv4 IP reservations.
func (*NB) GetLogicalSwitchIPs ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchIPs(ctx context.Context, switchName OVNSwitch) (map[OVNSwitchPort][]net.IP, error)
GetLogicalSwitchIPs returns a list of IPs associated to each port connected to switch.
func (*NB) GetLogicalSwitchPortDNS ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchPortDNS(ctx context.Context, portName OVNSwitchPort) (OVNDNSUUID, string, []net.IP, error)
GetLogicalSwitchPortDNS returns the logical switch port DNS info (UUID, name and IPs).
func (*NB) GetLogicalSwitchPortDynamicIPs ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchPortDynamicIPs(ctx context.Context, portName OVNSwitchPort) ([]net.IP, error)
GetLogicalSwitchPortDynamicIPs returns a list of dynamc IPs for a switch port.
func (*NB) GetLogicalSwitchPortIPs ¶ added in v6.0.2
GetLogicalSwitchPortIPs returns a list of IPs for a switch port.
func (*NB) GetLogicalSwitchPortLocation ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchPortLocation(ctx context.Context, portName OVNSwitchPort) (string, error)
GetLogicalSwitchPortLocation returns the last set location of a logical switch port.
func (*NB) GetLogicalSwitchPortUUID ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchPortUUID(ctx context.Context, portName OVNSwitchPort) (OVNSwitchPortUUID, error)
GetLogicalSwitchPortUUID returns the logical switch port UUID.
func (*NB) GetLogicalSwitchPorts ¶ added in v6.0.2
func (o *NB) GetLogicalSwitchPorts(ctx context.Context, switchName OVNSwitch) (map[OVNSwitchPort]OVNSwitchPortUUID, error)
GetLogicalSwitchPorts returns a map of logical switch ports (name and UUID) for a switch. Includes non-instance ports, such as the router port.
func (*NB) GetPortGroupInfo ¶ added in v6.0.2
func (o *NB) GetPortGroupInfo(ctx context.Context, portGroupName OVNPortGroup) (OVNPortGroupUUID, bool, error)
GetPortGroupInfo returns the port group UUID or empty string if port doesn't exist, and whether the port group has any ACL rules defined on it.
func (*NB) GetPortGroupsByProject ¶ added in v6.0.2
GetPortGroupsByProject finds the port groups that are associated to the project ID.
func (*NB) SetChassisGroupPriority ¶
func (o *NB) SetChassisGroupPriority(ctx context.Context, haChassisGroupName OVNChassisGroup, chassisID string, priority int) error
SetChassisGroupPriority sets a given priority for the chassis ID in the chassis group..
func (*NB) UpdateAddressSetAdd ¶ added in v6.0.2
func (o *NB) UpdateAddressSetAdd(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
UpdateAddressSetAdd adds the supplied addresses to the address sets. If the set is missing, it will get automatically created. The address set name used is "<addressSetPrefix>_ip<IP version>", e.g. "foo_ip4".
func (*NB) UpdateAddressSetRemove ¶ added in v6.0.2
func (o *NB) UpdateAddressSetRemove(ctx context.Context, addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
UpdateAddressSetRemove removes the supplied addresses from the address set. The address set name used is "<addressSetPrefix>_ip<IP version>", e.g. "foo_ip4".
func (*NB) UpdateLogicalRouterPolicy ¶ added in v6.0.2
func (o *NB) UpdateLogicalRouterPolicy(ctx context.Context, routerName OVNRouter, policies ...OVNRouterPolicy) error
UpdateLogicalRouterPolicy removes any existing policies and applies the new policies to the specified router.
func (*NB) UpdateLogicalRouterPort ¶ added in v6.0.2
func (o *NB) UpdateLogicalRouterPort(ctx context.Context, portName OVNRouterPort, ipv6ra *OVNIPv6RAOpts) error
UpdateLogicalRouterPort updates properties of a logical router port.
func (*NB) UpdateLogicalSwitchACLRules ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchACLRules(ctx context.Context, switchName OVNSwitch, aclRules ...OVNACLRule) error
UpdateLogicalSwitchACLRules applies a set of rules to the specified logical switch. Any existing rules are removed.
func (*NB) UpdateLogicalSwitchDHCPv4Options ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchDHCPv4Options(ctx context.Context, switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, opts *OVNDHCPv4Opts) error
UpdateLogicalSwitchDHCPv4Options creates or updates a DHCPv4 option set associated with the specified switchName and subnet. If uuid is non-empty then the record that exists with that ID is updated, otherwise a new record is created.
func (*NB) UpdateLogicalSwitchDHCPv4Revervations ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchDHCPv4Revervations(ctx context.Context, switchName OVNSwitch, reservedIPs []iprange.Range) error
UpdateLogicalSwitchDHCPv4Revervations sets the DHCPv4 IP reservations.
func (*NB) UpdateLogicalSwitchDHCPv6Options ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchDHCPv6Options(ctx context.Context, switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, opts *OVNDHCPv6Opts) error
UpdateLogicalSwitchDHCPv6Options creates or updates a DHCPv6 option set associated with the specified switchName and subnet. If uuid is non-empty then the record that exists with that ID is updated, otherwise a new record is created.
func (*NB) UpdateLogicalSwitchIPAllocation ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchIPAllocation(ctx context.Context, switchName OVNSwitch, opts *OVNIPAllocationOpts) error
UpdateLogicalSwitchIPAllocation sets the IP allocation config on the logical switch.
func (*NB) UpdateLogicalSwitchPortDNS ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchPortDNS(ctx context.Context, switchName OVNSwitch, portName OVNSwitchPort, dnsName string, dnsIPs []net.IP) (OVNDNSUUID, error)
UpdateLogicalSwitchPortDNS sets up the switch port DNS records for the DNS name. Returns the DNS record UUID, IPv4 and IPv6 addresses used for DNS records.
func (*NB) UpdateLogicalSwitchPortLinkProviderNetwork ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchPortLinkProviderNetwork(ctx context.Context, switchPortName OVNSwitchPort, extNetworkName string) error
UpdateLogicalSwitchPortLinkProviderNetwork links a logical switch port to a provider network.
func (*NB) UpdateLogicalSwitchPortLinkRouter ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchPortLinkRouter(ctx context.Context, switchPortName OVNSwitchPort, routerPortName OVNRouterPort) error
UpdateLogicalSwitchPortLinkRouter links a logical switch port to a logical router port.
func (*NB) UpdateLogicalSwitchPortOptions ¶ added in v6.0.2
func (o *NB) UpdateLogicalSwitchPortOptions(ctx context.Context, portName OVNSwitchPort, options map[string]string) error
UpdateLogicalSwitchPortOptions sets the options for a logical switch port.
func (*NB) UpdatePortGroupACLRules ¶ added in v6.0.2
func (o *NB) UpdatePortGroupACLRules(ctx context.Context, portGroupName OVNPortGroup, matchReplace map[string]string, aclRules ...OVNACLRule) error
UpdatePortGroupACLRules applies a set of rules to the specified port group. Any existing rules are removed.
func (*NB) UpdatePortGroupMembers ¶ added in v6.0.2
func (o *NB) UpdatePortGroupMembers(ctx context.Context, addMembers map[OVNPortGroup][]OVNSwitchPortUUID, removeMembers map[OVNPortGroup][]OVNSwitchPortUUID) error
UpdatePortGroupMembers adds/removes logical switch ports (by UUID) to/from existing port groups.
func (*NB) UpdatePortGroupPortACLRules ¶ added in v6.0.2
func (o *NB) UpdatePortGroupPortACLRules(ctx context.Context, portGroupName OVNPortGroup, portName OVNSwitchPort, aclRules ...OVNACLRule) error
UpdatePortGroupPortACLRules applies a set of rules for the logical switch port in the specified port group. Any existing rules for that logical switch port in the port group are removed.
type OVNACLRule ¶
type OVNACLRule struct { Direction string // Either "from-lport" or "to-lport". Action string // Either "allow-related", "allow", "drop", or "reject". Match string // Match criteria. See OVN Southbound database's Logical_Flow table match column usage. Priority int // Priority (between 0 and 32767, inclusive). Higher values take precedence. Log bool // Whether or not to log matched packets. LogName string // Log label name (requires Log be true). }
OVNACLRule represents an ACL rule that can be added to a logical switch or port group.
type OVNDHCPOptsSet ¶
type OVNDHCPOptsSet struct { UUID OVNDHCPOptionsUUID CIDR *net.IPNet }
OVNDHCPOptsSet is an existing DHCP options set in the northbound database.
type OVNDHCPv4Opts ¶
type OVNDHCPv4Opts struct { ServerID net.IP ServerMAC net.HardwareAddr Router net.IP RecursiveDNSServer []net.IP DomainName string LeaseTime time.Duration MTU uint32 Netmask string DNSSearchList []string }
OVNDHCPv4Opts IPv4 DHCP options that can be applied to a switch port.
type OVNDHCPv6Opts ¶
type OVNDHCPv6Opts struct { ServerID net.HardwareAddr RecursiveDNSServer []net.IP DNSSearchList []string }
OVNDHCPv6Opts IPv6 DHCP option set that can be created (and then applied to a switch port by resulting ID).
type OVNIPAllocationOpts ¶
type OVNIPAllocationOpts struct { PrefixIPv4 *net.IPNet PrefixIPv6 *net.IPNet ExcludeIPv4 []iprange.Range }
OVNIPAllocationOpts defines IP allocation settings that can be applied to a logical switch.
type OVNIPv6AddressMode ¶
type OVNIPv6AddressMode string
OVNIPv6AddressMode IPv6 router advertisement address mode.
const OVNIPv6AddressModeDHCPStateful OVNIPv6AddressMode = "dhcpv6_stateful"
OVNIPv6AddressModeDHCPStateful IPv6 DHCPv6 stateful mode.
const OVNIPv6AddressModeDHCPStateless OVNIPv6AddressMode = "dhcpv6_stateless"
OVNIPv6AddressModeDHCPStateless IPv6 DHCPv6 stateless mode.
const OVNIPv6AddressModeSLAAC OVNIPv6AddressMode = "slaac"
OVNIPv6AddressModeSLAAC IPv6 SLAAC mode.
type OVNIPv6RAOpts ¶
type OVNIPv6RAOpts struct { SendPeriodic bool AddressMode OVNIPv6AddressMode MinInterval time.Duration MaxInterval time.Duration RecursiveDNSServer net.IP DNSSearchList []string MTU uint32 }
OVNIPv6RAOpts IPv6 router advertisements options that can be applied to a router.
type OVNLoadBalancerHealthCheck ¶ added in v6.0.2
type OVNLoadBalancerHealthCheck struct { Interval int Timeout int SuccessCount int FailureCount int CheckerIPV4 net.IP CheckerIPV6 net.IP }
OVNLoadBalancerHealthCheck represents an OVN load balancer health checker.
type OVNLoadBalancerTarget ¶
OVNLoadBalancerTarget represents an OVN load balancer Virtual IP target.
type OVNLoadBalancerVIP ¶
type OVNLoadBalancerVIP struct { HealthCheck *OVNLoadBalancerHealthCheck Protocol string // Either "tcp" or "udp". But only applies to port based VIPs. ListenAddress net.IP ListenPort uint64 Targets []OVNLoadBalancerTarget }
OVNLoadBalancerVIP represents a OVN load balancer Virtual IP entry.
type OVNRouterPeering ¶
type OVNRouterPeering struct { LocalRouter OVNRouter LocalRouterPort OVNRouterPort LocalRouterPortMAC net.HardwareAddr LocalRouterPortIPs []net.IPNet LocalRouterRoutes []net.IPNet TargetRouter OVNRouter TargetRouterPort OVNRouterPort TargetRouterPortMAC net.HardwareAddr TargetRouterPortIPs []net.IPNet TargetRouterRoutes []net.IPNet }
OVNRouterPeering represents a the configuration of a peering connection between two OVN logical routers.
type OVNRouterPolicy ¶
OVNRouterPolicy represents a router policy.
type OVNRouterRoute ¶
OVNRouterRoute represents a static route added to a logical router.
type OVNSwitchPortOpts ¶
type OVNSwitchPortOpts struct { MAC net.HardwareAddr // Optional, if nil will be set to dynamic. IPV4 string // Optional, if empty, allocate an address, if "none" then disable allocation. IPV6 string // Optional, if empty, allocate an address, if "none" then disable allocation. DHCPv4OptsID OVNDHCPOptionsUUID // Optional, if empty, no DHCPv4 enabled on port. DHCPv6OptsID OVNDHCPOptionsUUID // Optional, if empty, no DHCPv6 enabled on port. Parent OVNSwitchPort // Optional, if set a nested port is created. VLAN uint16 // Optional, use with Parent to request a specific VLAN for nested port. Location string // Optional, use to indicate the name of the server this port is bound to. RouterPort OVNRouterPort // Optional, the name of the associated logical router port. Promiscuous bool // Optional, controls whether to allow unknown traffic on the port. }
OVNSwitchPortOpts options that can be applied to a swich port.
type SB ¶
type SB struct {
// contains filtered or unexported fields
}
SB client.
func (*SB) GetLogicalRouterPortActiveChassisHostname ¶
func (o *SB) GetLogicalRouterPortActiveChassisHostname(ctx context.Context, ovnRouterPort OVNRouterPort) (string, error)
GetLogicalRouterPortActiveChassisHostname gets the hostname of the chassis managing the logical router port.