Documentation ¶
Index ¶
- Constants
- type NB
- func (o *NB) AddressSetAdd(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) AddressSetCreate(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) AddressSetDelete(addressSetPrefix OVNAddressSet) error
- func (o *NB) AddressSetRemove(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
- func (o *NB) ChassisGroupAdd(haChassisGroupName OVNChassisGroup, mayExist bool) error
- func (o *NB) ChassisGroupChassisAdd(haChassisGroupName OVNChassisGroup, chassisID string, priority uint) error
- func (o *NB) ChassisGroupChassisDelete(haChassisGroupName OVNChassisGroup, chassisID string) error
- func (o *NB) ChassisGroupDelete(haChassisGroupName OVNChassisGroup) error
- func (o *NB) GetHardwareAddress(ovnRouterPort OVNRouterPort) (string, error)
- func (o *NB) LoadBalancerApply(loadBalancerName OVNLoadBalancer, routers []OVNRouter, switches []OVNSwitch, ...) error
- func (o *NB) LoadBalancerDelete(loadBalancerNames ...OVNLoadBalancer) error
- func (o *NB) LogicalRouterAdd(routerName OVNRouter, mayExist bool) error
- func (o *NB) LogicalRouterDNATSNATAdd(routerName OVNRouter, extIP net.IP, intIP net.IP, stateless bool, ...) error
- func (o *NB) LogicalRouterDNATSNATDelete(routerName OVNRouter, extIPs ...net.IP) error
- func (o *NB) LogicalRouterDNATSNATDeleteAll(routerName OVNRouter) error
- func (o *NB) LogicalRouterDelete(routerName OVNRouter) error
- func (o *NB) LogicalRouterPeeringApply(opts OVNRouterPeering) error
- func (o *NB) LogicalRouterPeeringDelete(opts OVNRouterPeering) error
- func (o *NB) LogicalRouterPolicyApply(routerName OVNRouter, policies ...OVNRouterPolicy) error
- func (o *NB) LogicalRouterPortAdd(routerName OVNRouter, portName OVNRouterPort, mac net.HardwareAddr, ...) error
- func (o *NB) LogicalRouterPortDelete(portName OVNRouterPort) error
- func (o *NB) LogicalRouterPortDeleteIPv6Advertisements(portName OVNRouterPort) error
- func (o *NB) LogicalRouterPortLinkChassisGroup(portName OVNRouterPort, haChassisGroupName OVNChassisGroup) error
- func (o *NB) LogicalRouterPortSetIPv6Advertisements(portName OVNRouterPort, opts *OVNIPv6RAOpts) error
- func (o *NB) LogicalRouterRouteAdd(routerName OVNRouter, mayExist bool, routes ...OVNRouterRoute) error
- func (o *NB) LogicalRouterRouteDelete(routerName OVNRouter, prefixes ...net.IPNet) error
- func (o *NB) LogicalRouterRoutes(routerName OVNRouter) ([]OVNRouterRoute, error)
- func (o *NB) LogicalRouterSNATAdd(routerName OVNRouter, intNet *net.IPNet, extIP net.IP, mayExist bool) error
- func (o *NB) LogicalRouterSNATDeleteAll(routerName OVNRouter) error
- func (o *NB) LogicalSwitchAdd(switchName OVNSwitch, mayExist bool) error
- func (o *NB) LogicalSwitchDHCPOptionsDelete(switchName OVNSwitch, uuids ...OVNDHCPOptionsUUID) error
- func (o *NB) LogicalSwitchDHCPOptionsGet(switchName OVNSwitch) ([]OVNDHCPOptsSet, error)
- func (o *NB) LogicalSwitchDHCPv4OptionsSet(switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, ...) error
- func (o *NB) LogicalSwitchDHCPv4RevervationsGet(switchName OVNSwitch) ([]iprange.Range, error)
- func (o *NB) LogicalSwitchDHCPv4RevervationsSet(switchName OVNSwitch, reservedIPs []iprange.Range) error
- func (o *NB) LogicalSwitchDHCPv6OptionsSet(switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, ...) error
- func (o *NB) LogicalSwitchDelete(switchName OVNSwitch) error
- func (o *NB) LogicalSwitchIPs(switchName OVNSwitch) (map[OVNSwitchPort][]net.IP, error)
- func (o *NB) LogicalSwitchPortAdd(switchName OVNSwitch, portName OVNSwitchPort, opts *OVNSwitchPortOpts, ...) error
- func (o *NB) LogicalSwitchPortCleanup(portName OVNSwitchPort, switchName OVNSwitch, switchPortGroupName OVNPortGroup, ...) error
- func (o *NB) LogicalSwitchPortDelete(portName OVNSwitchPort) error
- func (o *NB) LogicalSwitchPortDeleteDNS(switchName OVNSwitch, dnsUUID OVNDNSUUID, destroyEntry bool) error
- func (o *NB) LogicalSwitchPortDynamicIPs(portName OVNSwitchPort) ([]net.IP, error)
- func (o *NB) LogicalSwitchPortGetDNS(portName OVNSwitchPort) (OVNDNSUUID, string, []net.IP, error)
- func (o *NB) LogicalSwitchPortIPs(portName OVNSwitchPort) ([]net.IP, error)
- func (o *NB) LogicalSwitchPortLinkProviderNetwork(switchPortName OVNSwitchPort, extNetworkName string) error
- func (o *NB) LogicalSwitchPortLinkRouter(switchPortName OVNSwitchPort, routerPortName OVNRouterPort) error
- func (o *NB) LogicalSwitchPortLocationGet(portName OVNSwitchPort) (string, error)
- func (o *NB) LogicalSwitchPortOptionsSet(portName OVNSwitchPort, options map[string]string) error
- func (o *NB) LogicalSwitchPortSetDNS(switchName OVNSwitch, portName OVNSwitchPort, dnsName string, dnsIPs []net.IP) (OVNDNSUUID, error)
- func (o *NB) LogicalSwitchPortUUID(portName OVNSwitchPort) (OVNSwitchPortUUID, error)
- func (o *NB) LogicalSwitchPorts(switchName OVNSwitch) (map[OVNSwitchPort]OVNSwitchPortUUID, error)
- func (o *NB) LogicalSwitchSetACLRules(switchName OVNSwitch, aclRules ...OVNACLRule) error
- func (o *NB) LogicalSwitchSetIPAllocation(switchName OVNSwitch, opts *OVNIPAllocationOpts) error
- func (o *NB) PortGroupAdd(projectID int64, portGroupName OVNPortGroup, associatedPortGroup OVNPortGroup, ...) error
- func (o *NB) PortGroupDelete(portGroupNames ...OVNPortGroup) error
- func (o *NB) PortGroupInfo(portGroupName OVNPortGroup) (OVNPortGroupUUID, bool, error)
- func (o *NB) PortGroupListByProject(projectID int64) ([]OVNPortGroup, error)
- func (o *NB) PortGroupMemberChange(addMembers map[OVNPortGroup][]OVNSwitchPortUUID, ...) error
- func (o *NB) PortGroupPortClearACLRules(portGroupName OVNPortGroup, portName OVNSwitchPort) error
- func (o *NB) PortGroupPortSetACLRules(portGroupName OVNPortGroup, portName OVNSwitchPort, aclRules ...OVNACLRule) error
- func (o *NB) PortGroupSetACLRules(portGroupName OVNPortGroup, matchReplace map[string]string, ...) 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 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 ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NB ¶
type NB struct {
// contains filtered or unexported fields
}
NB client.
func (*NB) AddressSetAdd ¶
func (o *NB) AddressSetAdd(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
AddressSetAdd adds the supplied addresses to the address sets, or creates a new address sets if needed. The address set name used is "<addressSetPrefix>_ip<IP version>", e.g. "foo_ip4".
func (*NB) AddressSetCreate ¶
func (o *NB) AddressSetCreate(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
AddressSetCreate 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) AddressSetDelete ¶
func (o *NB) AddressSetDelete(addressSetPrefix OVNAddressSet) error
AddressSetDelete deletes address sets for IP versions 4 and 6 in the format "<addressSetPrefix>_ip<IP version>".
func (*NB) AddressSetRemove ¶
func (o *NB) AddressSetRemove(addressSetPrefix OVNAddressSet, addresses ...net.IPNet) error
AddressSetRemove removes the supplied addresses from the address set. The address set name used is "<addressSetPrefix>_ip<IP version>", e.g. "foo_ip4".
func (*NB) ChassisGroupAdd ¶
func (o *NB) ChassisGroupAdd(haChassisGroupName OVNChassisGroup, mayExist bool) error
ChassisGroupAdd 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) ChassisGroupChassisAdd ¶
func (o *NB) ChassisGroupChassisAdd(haChassisGroupName OVNChassisGroup, chassisID string, priority uint) error
ChassisGroupChassisAdd adds a chassis ID to an HA chassis group with the specified priority.
func (*NB) ChassisGroupChassisDelete ¶
func (o *NB) ChassisGroupChassisDelete(haChassisGroupName OVNChassisGroup, chassisID string) error
ChassisGroupChassisDelete deletes a chassis ID from an HA chassis group.
func (*NB) ChassisGroupDelete ¶
func (o *NB) ChassisGroupDelete(haChassisGroupName OVNChassisGroup) error
ChassisGroupDelete deletes an HA chassis group.
func (*NB) GetHardwareAddress ¶
func (o *NB) GetHardwareAddress(ovnRouterPort OVNRouterPort) (string, error)
GetHardwareAddress gets the hardware address of the logical router port.
func (*NB) LoadBalancerApply ¶
func (o *NB) LoadBalancerApply(loadBalancerName OVNLoadBalancer, routers []OVNRouter, switches []OVNSwitch, vips ...OVNLoadBalancerVIP) error
LoadBalancerApply creates a new load balancer (if doesn't exist) on the specified routers and switches. Providing an empty set of vips will delete the load balancer.
func (*NB) LoadBalancerDelete ¶
func (o *NB) LoadBalancerDelete(loadBalancerNames ...OVNLoadBalancer) error
LoadBalancerDelete deletes the specified load balancer(s).
func (*NB) LogicalRouterAdd ¶
LogicalRouterAdd adds a named logical router.
func (*NB) LogicalRouterDNATSNATAdd ¶
func (o *NB) LogicalRouterDNATSNATAdd(routerName OVNRouter, extIP net.IP, intIP net.IP, stateless bool, mayExist bool) error
LogicalRouterDNATSNATAdd adds a DNAT_AND_SNAT rule to a logical router to translate packets from extIP to intIP.
func (*NB) LogicalRouterDNATSNATDelete ¶
LogicalRouterDNATSNATDelete deletes a DNAT_AND_SNAT rule from a logical router.
func (*NB) LogicalRouterDNATSNATDeleteAll ¶
LogicalRouterDNATSNATDeleteAll deletes all DNAT_AND_SNAT rules from a logical router.
func (*NB) LogicalRouterDelete ¶
LogicalRouterDelete deletes a named logical router.
func (*NB) LogicalRouterPeeringApply ¶
func (o *NB) LogicalRouterPeeringApply(opts OVNRouterPeering) error
LogicalRouterPeeringApply applies a peering relationship between two logical routers.
func (*NB) LogicalRouterPeeringDelete ¶
func (o *NB) LogicalRouterPeeringDelete(opts OVNRouterPeering) error
LogicalRouterPeeringDelete deletes a peering relationship between two logical routers. Requires LocalRouter, LocalRouterPort, TargetRouter and TargetRouterPort opts fields to be populated.
func (*NB) LogicalRouterPolicyApply ¶
func (o *NB) LogicalRouterPolicyApply(routerName OVNRouter, policies ...OVNRouterPolicy) error
LogicalRouterPolicyApply removes any existing policies and applies the new policies to the specified router.
func (*NB) LogicalRouterPortAdd ¶
func (o *NB) LogicalRouterPortAdd(routerName OVNRouter, portName OVNRouterPort, mac net.HardwareAddr, gatewayMTU uint32, ipAddr []*net.IPNet, mayExist bool) error
LogicalRouterPortAdd adds a named logical router port to a logical router.
func (*NB) LogicalRouterPortDelete ¶
func (o *NB) LogicalRouterPortDelete(portName OVNRouterPort) error
LogicalRouterPortDelete deletes a named logical router port from a logical router.
func (*NB) LogicalRouterPortDeleteIPv6Advertisements ¶
func (o *NB) LogicalRouterPortDeleteIPv6Advertisements(portName OVNRouterPort) error
LogicalRouterPortDeleteIPv6Advertisements removes the IPv6 RA announcement settings from a router port.
func (*NB) LogicalRouterPortLinkChassisGroup ¶
func (o *NB) LogicalRouterPortLinkChassisGroup(portName OVNRouterPort, haChassisGroupName OVNChassisGroup) error
LogicalRouterPortLinkChassisGroup links a logical router port to a HA chassis group.
func (*NB) LogicalRouterPortSetIPv6Advertisements ¶
func (o *NB) LogicalRouterPortSetIPv6Advertisements(portName OVNRouterPort, opts *OVNIPv6RAOpts) error
LogicalRouterPortSetIPv6Advertisements sets the IPv6 router advertisement options on a router port.
func (*NB) LogicalRouterRouteAdd ¶
func (o *NB) LogicalRouterRouteAdd(routerName OVNRouter, mayExist bool, routes ...OVNRouterRoute) error
LogicalRouterRouteAdd adds a static route to the logical router.
func (*NB) LogicalRouterRouteDelete ¶
LogicalRouterRouteDelete deletes a static route from the logical router.
func (*NB) LogicalRouterRoutes ¶
func (o *NB) LogicalRouterRoutes(routerName OVNRouter) ([]OVNRouterRoute, error)
LogicalRouterRoutes returns a list of static routes in the main route table of the logical router.
func (*NB) LogicalRouterSNATAdd ¶
func (o *NB) LogicalRouterSNATAdd(routerName OVNRouter, intNet *net.IPNet, extIP net.IP, mayExist bool) error
LogicalRouterSNATAdd adds an SNAT rule to a logical router to translate packets from intNet to extIP.
func (*NB) LogicalRouterSNATDeleteAll ¶
LogicalRouterSNATDeleteAll deletes all SNAT rules from a logical router.
func (*NB) LogicalSwitchAdd ¶
LogicalSwitchAdd 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) LogicalSwitchDHCPOptionsDelete ¶
func (o *NB) LogicalSwitchDHCPOptionsDelete(switchName OVNSwitch, uuids ...OVNDHCPOptionsUUID) error
LogicalSwitchDHCPOptionsDelete deletes the specified DHCP options defined for a switch.
func (*NB) LogicalSwitchDHCPOptionsGet ¶
func (o *NB) LogicalSwitchDHCPOptionsGet(switchName OVNSwitch) ([]OVNDHCPOptsSet, error)
LogicalSwitchDHCPOptionsGet retrieves the existing DHCP options defined for a logical switch.
func (*NB) LogicalSwitchDHCPv4OptionsSet ¶
func (o *NB) LogicalSwitchDHCPv4OptionsSet(switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, opts *OVNDHCPv4Opts) error
LogicalSwitchDHCPv4OptionsSet 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) LogicalSwitchDHCPv4RevervationsGet ¶
LogicalSwitchDHCPv4RevervationsGet gets the DHCPv4 IP reservations.
func (*NB) LogicalSwitchDHCPv4RevervationsSet ¶
func (o *NB) LogicalSwitchDHCPv4RevervationsSet(switchName OVNSwitch, reservedIPs []iprange.Range) error
LogicalSwitchDHCPv4RevervationsSet sets the DHCPv4 IP reservations.
func (*NB) LogicalSwitchDHCPv6OptionsSet ¶
func (o *NB) LogicalSwitchDHCPv6OptionsSet(switchName OVNSwitch, uuid OVNDHCPOptionsUUID, subnet *net.IPNet, opts *OVNDHCPv6Opts) error
LogicalSwitchDHCPv6OptionsSet 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) LogicalSwitchDelete ¶
LogicalSwitchDelete deletes a named logical switch.
func (*NB) LogicalSwitchIPs ¶
LogicalSwitchIPs returns a list of IPs associated to each port connected to switch.
func (*NB) LogicalSwitchPortAdd ¶
func (o *NB) LogicalSwitchPortAdd(switchName OVNSwitch, portName OVNSwitchPort, opts *OVNSwitchPortOpts, mayExist bool) error
LogicalSwitchPortAdd 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) LogicalSwitchPortCleanup ¶
func (o *NB) LogicalSwitchPortCleanup(portName OVNSwitchPort, switchName OVNSwitch, switchPortGroupName OVNPortGroup, dnsUUID OVNDNSUUID) error
LogicalSwitchPortCleanup deletes the named logical switch port and its associated config.
func (*NB) LogicalSwitchPortDelete ¶
func (o *NB) LogicalSwitchPortDelete(portName OVNSwitchPort) error
LogicalSwitchPortDelete deletes a named logical switch port.
func (*NB) LogicalSwitchPortDeleteDNS ¶
func (o *NB) LogicalSwitchPortDeleteDNS(switchName OVNSwitch, dnsUUID OVNDNSUUID, destroyEntry bool) error
LogicalSwitchPortDeleteDNS 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) LogicalSwitchPortDynamicIPs ¶
func (o *NB) LogicalSwitchPortDynamicIPs(portName OVNSwitchPort) ([]net.IP, error)
LogicalSwitchPortDynamicIPs returns a list of dynamc IPs for a switch port.
func (*NB) LogicalSwitchPortGetDNS ¶
func (o *NB) LogicalSwitchPortGetDNS(portName OVNSwitchPort) (OVNDNSUUID, string, []net.IP, error)
LogicalSwitchPortGetDNS returns the logical switch port DNS info (UUID, name and IPs).
func (*NB) LogicalSwitchPortIPs ¶
func (o *NB) LogicalSwitchPortIPs(portName OVNSwitchPort) ([]net.IP, error)
LogicalSwitchPortIPs returns a list of IPs for a switch port.
func (*NB) LogicalSwitchPortLinkProviderNetwork ¶
func (o *NB) LogicalSwitchPortLinkProviderNetwork(switchPortName OVNSwitchPort, extNetworkName string) error
LogicalSwitchPortLinkProviderNetwork links a logical switch port to a provider network.
func (*NB) LogicalSwitchPortLinkRouter ¶
func (o *NB) LogicalSwitchPortLinkRouter(switchPortName OVNSwitchPort, routerPortName OVNRouterPort) error
LogicalSwitchPortLinkRouter links a logical switch port to a logical router port.
func (*NB) LogicalSwitchPortLocationGet ¶
func (o *NB) LogicalSwitchPortLocationGet(portName OVNSwitchPort) (string, error)
LogicalSwitchPortLocationGet returns the last set location of a logical switch port.
func (*NB) LogicalSwitchPortOptionsSet ¶
func (o *NB) LogicalSwitchPortOptionsSet(portName OVNSwitchPort, options map[string]string) error
LogicalSwitchPortOptionsSet sets the options for a logical switch port.
func (*NB) LogicalSwitchPortSetDNS ¶
func (o *NB) LogicalSwitchPortSetDNS(switchName OVNSwitch, portName OVNSwitchPort, dnsName string, dnsIPs []net.IP) (OVNDNSUUID, error)
LogicalSwitchPortSetDNS 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) LogicalSwitchPortUUID ¶
func (o *NB) LogicalSwitchPortUUID(portName OVNSwitchPort) (OVNSwitchPortUUID, error)
LogicalSwitchPortUUID returns the logical switch port UUID or empty string if port doesn't exist.
func (*NB) LogicalSwitchPorts ¶
func (o *NB) LogicalSwitchPorts(switchName OVNSwitch) (map[OVNSwitchPort]OVNSwitchPortUUID, error)
LogicalSwitchPorts returns a map of logical switch ports (name and UUID) for a switch. Includes non-instance ports, such as the router port.
func (*NB) LogicalSwitchSetACLRules ¶
func (o *NB) LogicalSwitchSetACLRules(switchName OVNSwitch, aclRules ...OVNACLRule) error
LogicalSwitchSetACLRules applies a set of rules to the specified logical switch. Any existing rules are removed.
func (*NB) LogicalSwitchSetIPAllocation ¶
func (o *NB) LogicalSwitchSetIPAllocation(switchName OVNSwitch, opts *OVNIPAllocationOpts) error
LogicalSwitchSetIPAllocation sets the IP allocation config on the logical switch.
func (*NB) PortGroupAdd ¶
func (o *NB) PortGroupAdd(projectID int64, portGroupName OVNPortGroup, associatedPortGroup OVNPortGroup, associatedSwitch OVNSwitch, initialPortMembers ...OVNSwitchPort) error
PortGroupAdd creates a new port group and optionally adds logical switch ports to the group.
func (*NB) PortGroupDelete ¶
func (o *NB) PortGroupDelete(portGroupNames ...OVNPortGroup) error
PortGroupDelete deletes port groups along with their ACL rules.
func (*NB) PortGroupInfo ¶
func (o *NB) PortGroupInfo(portGroupName OVNPortGroup) (OVNPortGroupUUID, bool, error)
PortGroupInfo 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) PortGroupListByProject ¶
func (o *NB) PortGroupListByProject(projectID int64) ([]OVNPortGroup, error)
PortGroupListByProject finds the port groups that are associated to the project ID.
func (*NB) PortGroupMemberChange ¶
func (o *NB) PortGroupMemberChange(addMembers map[OVNPortGroup][]OVNSwitchPortUUID, removeMembers map[OVNPortGroup][]OVNSwitchPortUUID) error
PortGroupMemberChange adds/removes logical switch ports (by UUID) to/from existing port groups.
func (*NB) PortGroupPortClearACLRules ¶
func (o *NB) PortGroupPortClearACLRules(portGroupName OVNPortGroup, portName OVNSwitchPort) error
PortGroupPortClearACLRules clears any rules assigned to the logical switch port in the specified port group.
func (*NB) PortGroupPortSetACLRules ¶
func (o *NB) PortGroupPortSetACLRules(portGroupName OVNPortGroup, portName OVNSwitchPort, aclRules ...OVNACLRule) error
PortGroupPortSetACLRules 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.
func (*NB) PortGroupSetACLRules ¶
func (o *NB) PortGroupSetACLRules(portGroupName OVNPortGroup, matchReplace map[string]string, aclRules ...OVNACLRule) error
PortGroupSetACLRules applies a set of rules to the specified port group. Any existing rules 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 }
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 OVNLoadBalancerTarget ¶
OVNLoadBalancerTarget represents an OVN load balancer Virtual IP target.
type OVNLoadBalancerVIP ¶
type OVNLoadBalancerVIP struct { 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. IPs []net.IP // Optional, if empty IPs will be set to dynamic. 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. }
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(ovnRouterPort OVNRouterPort) (string, error)
GetLogicalRouterPortActiveChassisHostname gets the hostname of the chassis managing the logical router port.