ovs

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 23 Imported by: 6

Documentation

Index

Constants

View Source
const (
	OvnNbCtl    = "ovn-nbctl"
	OvnSbCtl    = "ovn-sbctl"
	OVNIcNbCtl  = "ovn-ic-nbctl"
	OVNIcSbCtl  = "ovn-ic-sbctl"
	OvsVsCtl    = "ovs-vsctl"
	MayExist    = "--may-exist"
	IfExists    = "--if-exists"
	Policy      = "--policy"
	PolicyDstIP = "dst-ip"
	PolicySrcIP = "src-ip"

	OVSDBWaitTimeout = 0
)

Variables

View Source
var (
	ErrNoAddr   = errors.New("no address")
	ErrNotFound = errors.New("not found")
)

Functions

func BridgeExists added in v1.8.3

func BridgeExists(name string) (bool, error)

BridgeExists checks whether the bridge already exists

func Bridges added in v1.7.2

func Bridges() ([]string, error)

Bridges returns bridges created by Kube-OVN

func CheckAlive added in v1.7.0

func CheckAlive() error

CheckAlive check if kube-ovn-controller can access ovn-nb from nbctl-daemon

func CheckAndUpdateHtbQos added in v1.9.8

func CheckAndUpdateHtbQos(podName, podNamespace, ifaceID string, queueIfaceUidMap map[string]string) error

func CleanDuplicatePort added in v1.7.0

func CleanDuplicatePort(ifaceID, portName string)

Find and remove any existing OVS port with this iface-id. Pods can have multiple sandboxes if some are waiting for garbage collection, but only the latest one should have the iface-id set. See: https://github.com/ovn-org/ovn-kubernetes/pull/869

func CleanLostInterface

func CleanLostInterface()

CleanLostInterface will clean up related ovs port, interface and qos When reboot node, the ovs internal interface will be deleted.

func ClearHtbQosQueue added in v1.9.0

func ClearHtbQosQueue(podName, podNamespace, iface string) error

func ClearPodBandwidth

func ClearPodBandwidth(podName, podNamespace, ifaceID string) error

ClearPodBandwidth remove qos related to this pod.

func ClearPortQosBinding added in v1.9.0

func ClearPortQosBinding(ifaceID string) error

remove qos related to this port.

func ConfigInterfaceMirror added in v1.8.0

func ConfigInterfaceMirror(globalMirror bool, open string, iface string) error

config mirror for interface by pod annotations and install param

func ConstructWaitForNameNotExistsOperation added in v1.9.6

func ConstructWaitForNameNotExistsOperation(name string, table string) ovsdb.Operation

func ConstructWaitForUniqueOperation added in v1.9.6

func ConstructWaitForUniqueOperation(table string, column string, value interface{}) ovsdb.Operation

func Exec added in v1.7.0

func Exec(args ...string) (string, error)

func GetLocalnetName added in v1.11.0

func GetLocalnetName(subnet string) string

func GetQosList added in v1.9.0

func GetQosList(podName, podNamespace, ifaceID string) ([]string, error)

func GetResidualInternalPorts added in v1.7.2

func GetResidualInternalPorts() []string

func GetSgPortGroupName added in v1.8.0

func GetSgPortGroupName(sgName string) string

func GetSgV4AssociatedName added in v1.8.0

func GetSgV4AssociatedName(sgName string) string

func GetSgV6AssociatedName added in v1.8.0

func GetSgV6AssociatedName(sgName string) string

func IsHtbQos added in v1.9.0

func IsHtbQos(iface string) (bool, error)

func IsUserspaceDataPath added in v1.10.0

func IsUserspaceDataPath() (is bool, err error)

func ListExternalIds added in v1.9.0

func ListExternalIds(table string) (map[string]string, error)

func ListQosQueueIds added in v1.9.0

func ListQosQueueIds() (map[string]string, error)

func LogicalRouterPortName added in v1.9.6

func LogicalRouterPortName(lr, ls string) string

func LogicalSwitchPortName added in v1.9.6

func LogicalSwitchPortName(lr, ls string) string

func PodNameToPortName

func PodNameToPortName(pod, namespace, provider string) string

PodNameToPortName return the ovn port name for a given pod

func PortExists added in v1.10.0

func PortExists(name string) (bool, error)

PortExists checks whether the port already exists

func SetHtbQosQueueRecord added in v1.9.0

func SetHtbQosQueueRecord(podName, podNamespace, iface string, maxRateBPS int, queueIfaceUidMap map[string]string) (string, error)

func SetInterfaceBandwidth added in v1.7.0

func SetInterfaceBandwidth(podName, podNamespace, iface, ingress, egress string) error

SetInterfaceBandwidth set ingress/egress qos for given pod, annotation values are for node/pod but ingress/egress parameters here are from the point of ovs port/interface view, so reverse input parameters when call func SetInterfaceBandwidth

func SetNetemQos added in v1.9.0

func SetNetemQos(podName, podNamespace, iface, latency, limit, loss string) error

The latency value expressed in us.

func SetPortTag added in v1.7.0

func SetPortTag(port, tag string) error

func SetQosQueueBinding added in v1.9.0

func SetQosQueueBinding(podName, podNamespace, ifName, iface, queueUid string, qosIfaceUidMap map[string]string) error

SetQosQueueBinding set qos related to queue record.

func StartOvnNbctlDaemon added in v1.7.0

func StartOvnNbctlDaemon(ovnNbAddr string) error

StartOvnNbctlDaemon start a daemon and set OVN_NB_DAEMON env

func Transact added in v1.9.5

func Transact(c client.Client, method string, operations []ovsdb.Operation, timeout time.Duration) error

func ValidatePortVendor added in v1.7.1

func ValidatePortVendor(port string) (bool, error)

ValidatePortVendor returns true if the port's external_ids:vendor=kube-ovn

Types

type AclDirection added in v1.8.0

type AclDirection string
const (
	SgAclIngressDirection AclDirection = "to-lport"
	SgAclEgressDirection  AclDirection = "from-lport"
)

type DHCPOptionsUUIDs added in v1.10.0

type DHCPOptionsUUIDs struct {
	DHCPv4OptionsUUID string
	DHCPv6OptionsUUID string
}

type LegacyClient added in v1.9.5

type LegacyClient struct {
	OvnNbAddress                  string
	OvnTimeout                    int
	OvnSbAddress                  string
	OvnICNbAddress                string
	OvnICSbAddress                string
	ClusterRouter                 string
	ClusterTcpLoadBalancer        string
	ClusterUdpLoadBalancer        string
	ClusterTcpSessionLoadBalancer string
	ClusterUdpSessionLoadBalancer string
	NodeSwitch                    string
	NodeSwitchCIDR                string
	ExternalGatewayType           string
	Version                       string
}

LegacyClient is the legacy ovn client

func NewLegacyClient added in v1.9.5

func NewLegacyClient(ovnNbAddr string, ovnNbTimeout int, ovnSbAddr, clusterRouter, clusterTcpLoadBalancer, clusterUdpLoadBalancer, clusterTcpSessionLoadBalancer, clusterUdpSessionLoadBalancer, nodeSwitch, nodeSwitchCIDR string) *LegacyClient

NewLegacyClient init a legacy ovn client

func (*LegacyClient) AclExists added in v1.9.5

func (c *LegacyClient) AclExists(priority, direction string) (bool, error)

func (LegacyClient) AddAddressSetAddresses added in v1.9.5

func (c LegacyClient) AddAddressSetAddresses(name string, address string) error

func (LegacyClient) AddFipRule added in v1.11.0

func (c LegacyClient) AddFipRule(router, eip, logicalIP, logicalMac, port string) error

func (LegacyClient) AddLbToLogicalSwitch added in v1.9.5

func (c LegacyClient) AddLbToLogicalSwitch(ls string, lbs ...string) error

func (LegacyClient) AddPolicyRoute added in v1.9.5

func (c LegacyClient) AddPolicyRoute(router string, priority int32, match, action, nextHop string, externalIDs map[string]string) error

AddPolicyRoute add a policy route rule in ovn

func (LegacyClient) AddSnatRule added in v1.11.0

func (c LegacyClient) AddSnatRule(router, eip, ipCidr string) error

func (LegacyClient) AddStaticRoute added in v1.9.5

func (c LegacyClient) AddStaticRoute(policy, cidr, nextHop, router string, routeType string) error

AddStaticRoute add a static route rule in ovn

func (LegacyClient) ChassisExist added in v1.11.0

func (c LegacyClient) ChassisExist(chassisName string) (bool, error)

func (LegacyClient) CheckPolicyRouteNexthopConsistent added in v1.9.5

func (c LegacyClient) CheckPolicyRouteNexthopConsistent(router, match, nexthop string, priority int32) (bool, error)

func (LegacyClient) CleanLogicalSwitchAcl added in v1.9.5

func (c LegacyClient) CleanLogicalSwitchAcl(ls string) error

CleanLogicalSwitchAcl clean acl of a switch

func (LegacyClient) CleanPolicyRoute added in v1.11.0

func (c LegacyClient) CleanPolicyRoute(router string) error

func (LegacyClient) CombineEgressACLCmd added in v1.9.14

func (c LegacyClient) CombineEgressACLCmd(pgName, asEgressName, asExceptName, protocol string, npp []netv1.NetworkPolicyPort, logEnable bool, aclCmds []string, index int, namedPortMap map[string]*util.NamedPortInfo) []string

func (LegacyClient) CombineIngressACLCmd added in v1.9.14

func (c LegacyClient) CombineIngressACLCmd(pgName, asIngressName, asExceptName, protocol string, npp []netv1.NetworkPolicyPort, logEnable bool, aclCmds []string, index int, namedPortMap map[string]*util.NamedPortInfo) []string

func (LegacyClient) ConnectRouterToExternal added in v1.11.0

func (c LegacyClient) ConnectRouterToExternal(externalNet, vpcRouter, lrpIpCidr, lrpMac string, chassises []string) error

func (LegacyClient) CreateACL added in v1.9.14

func (c LegacyClient) CreateACL(aclCmds []string) error

func (LegacyClient) CreateACLForNodePg added in v1.9.5

func (c LegacyClient) CreateACLForNodePg(pgName, nodeIpStr string) error

func (LegacyClient) CreateAddressSet added in v1.9.5

func (c LegacyClient) CreateAddressSet(name string) error

func (LegacyClient) CreateAddressSetWithAddresses added in v1.9.5

func (c LegacyClient) CreateAddressSetWithAddresses(name string, addresses ...string) error

func (LegacyClient) CreateGatewayACL added in v1.9.5

func (c LegacyClient) CreateGatewayACL(ls, pgName, gateway, cidr string) error

func (LegacyClient) CreateGatewaySwitch added in v1.9.5

func (c LegacyClient) CreateGatewaySwitch(name, network string, vlan int, ip, mac string, chassises []string) error

func (LegacyClient) CreateICLogicalRouterPort added in v1.9.5

func (c LegacyClient) CreateICLogicalRouterPort(az, mac, subnet string, chassises []string) error

func (LegacyClient) CreateLoadBalancer added in v1.9.5

func (c LegacyClient) CreateLoadBalancer(lb, protocol, selectFields string) error

CreateLoadBalancer create loadbalancer in ovn

func (LegacyClient) CreateLoadBalancerRule added in v1.9.5

func (c LegacyClient) CreateLoadBalancerRule(lb, vip, ips, protocol string) error

CreateLoadBalancerRule create loadbalancer rul in ovn

func (LegacyClient) CreateLocalnetPort added in v1.9.5

func (c LegacyClient) CreateLocalnetPort(ls, port, provider string, vlanID int) error

func (LegacyClient) CreateLogicalRouter added in v1.9.5

func (c LegacyClient) CreateLogicalRouter(lr string) error

CreateLogicalRouter delete logical router in ovn

func (LegacyClient) CreateLogicalSwitch added in v1.9.5

func (c LegacyClient) CreateLogicalSwitch(ls, lr, subnet, gateway string, needRouter bool) error

CreateLogicalSwitch create logical switch in ovn, connect it to router and apply tcp/udp lb rules

func (LegacyClient) CreateNpAddressSet added in v1.9.5

func (c LegacyClient) CreateNpAddressSet(asName, npNamespace, npName, direction string) error

func (LegacyClient) CreateNpPortGroup added in v1.9.5

func (c LegacyClient) CreateNpPortGroup(pgName, npNs, npName string) error

func (LegacyClient) CreatePeerRouterPort added in v1.9.6

func (c LegacyClient) CreatePeerRouterPort(localRouter, remoteRouter, localRouterPortIP string) error

func (LegacyClient) CreatePort added in v1.9.5

func (c LegacyClient) CreatePort(ls, port, ip, mac, pod, namespace string, portSecurity bool, securityGroups string, vips string, liveMigration bool, enableDHCP bool, dhcpOptions *DHCPOptionsUUIDs, hasUnknown bool) error

CreatePort create logical switch port in ovn

func (LegacyClient) CreateSgAssociatedAddressSet added in v1.9.5

func (c LegacyClient) CreateSgAssociatedAddressSet(sgName string) error

func (LegacyClient) CreateSgDenyAllACL added in v1.9.5

func (c LegacyClient) CreateSgDenyAllACL() error

func (LegacyClient) CreateSgPortGroup added in v1.9.5

func (c LegacyClient) CreateSgPortGroup(sgName string) error

func (LegacyClient) CreateVirtualPort added in v1.10.1

func (c LegacyClient) CreateVirtualPort(ls, ip string) error

CreateVirtualPort create virtual type logical switch port in ovn

func (LegacyClient) CustomFindEntity added in v1.9.5

func (c LegacyClient) CustomFindEntity(entity string, attris []string, args ...string) (result []map[string][]string, err error)

func (LegacyClient) DeleteACL added in v1.9.5

func (c LegacyClient) DeleteACL(pgName, direction string) (err error)

func (LegacyClient) DeleteAclForNodePg added in v1.9.5

func (c LegacyClient) DeleteAclForNodePg(pgName string) error

func (LegacyClient) DeleteAddressSet added in v1.9.5

func (c LegacyClient) DeleteAddressSet(name string) error

func (LegacyClient) DeleteChassisByName added in v1.11.0

func (c LegacyClient) DeleteChassisByName(chassisName string) error

func (LegacyClient) DeleteChassisByNode added in v1.11.0

func (c LegacyClient) DeleteChassisByNode(node string) error

func (*LegacyClient) DeleteDHCPOptions added in v1.10.1

func (c *LegacyClient) DeleteDHCPOptions(ls string, protocol string) error

func (*LegacyClient) DeleteDHCPOptionsByUUIDs added in v1.10.1

func (c *LegacyClient) DeleteDHCPOptionsByUUIDs(uuidList []string) (err error)

func (LegacyClient) DeleteFipRule added in v1.11.0

func (c LegacyClient) DeleteFipRule(router, eip, logicalIP string) error

func (LegacyClient) DeleteGatewaySwitch added in v1.9.5

func (c LegacyClient) DeleteGatewaySwitch(name string) error

func (LegacyClient) DeleteICLogicalRouterPort added in v1.9.5

func (c LegacyClient) DeleteICLogicalRouterPort(az string) error

func (LegacyClient) DeleteLoadBalancer added in v1.9.5

func (c LegacyClient) DeleteLoadBalancer(lbs ...string) error

DeleteLoadBalancer delete loadbalancer in ovn

func (LegacyClient) DeleteLoadBalancerVip added in v1.9.5

func (c LegacyClient) DeleteLoadBalancerVip(vip, lb string) error

DeleteLoadBalancerVip delete a vip rule from loadbalancer

func (LegacyClient) DeleteLogicalRouter added in v1.9.5

func (c LegacyClient) DeleteLogicalRouter(lr string) error

DeleteLogicalRouter create logical router in ovn

func (LegacyClient) DeleteLogicalRouterPort added in v1.9.5

func (c LegacyClient) DeleteLogicalRouterPort(port string) error

DeleteLogicalRouterPort delete logical switch port in ovn

func (LegacyClient) DeleteLogicalSwitch added in v1.9.5

func (c LegacyClient) DeleteLogicalSwitch(ls string) error

DeleteLogicalSwitch delete logical switch

func (LegacyClient) DeleteLogicalSwitchPort added in v1.9.5

func (c LegacyClient) DeleteLogicalSwitchPort(port string) error

DeleteLogicalSwitchPort delete logical switch port in ovn

func (LegacyClient) DeleteMatchedStaticRoute added in v1.9.5

func (c LegacyClient) DeleteMatchedStaticRoute(cidr, nexthop, router string) error

func (LegacyClient) DeleteNatRule added in v1.9.5

func (c LegacyClient) DeleteNatRule(logicalIP, router string) error

func (LegacyClient) DeletePolicyRoute added in v1.9.5

func (c LegacyClient) DeletePolicyRoute(router string, priority int32, match string) error

DeletePolicyRoute delete a policy route rule in ovn

func (LegacyClient) DeletePolicyRouteByNexthop added in v1.9.5

func (c LegacyClient) DeletePolicyRouteByNexthop(router string, priority int32, nexthop string) error

func (*LegacyClient) DeletePolicyRouteByUUID added in v1.9.19

func (c *LegacyClient) DeletePolicyRouteByUUID(router string, uuids []string) error

func (LegacyClient) DeletePortGroup added in v1.9.5

func (c LegacyClient) DeletePortGroup(pgName string) error

func (LegacyClient) DeleteSgPortGroup added in v1.9.5

func (c LegacyClient) DeleteSgPortGroup(sgName string) error

func (LegacyClient) DeleteSnatRule added in v1.11.0

func (c LegacyClient) DeleteSnatRule(router, eip, ipCidr string) error

func (LegacyClient) DeleteStaticRoute added in v1.9.5

func (c LegacyClient) DeleteStaticRoute(cidr, router string) error

DeleteStaticRoute delete a static route rule in ovn

func (LegacyClient) DeleteStaticRouteByNextHop added in v1.9.5

func (c LegacyClient) DeleteStaticRouteByNextHop(nextHop string) error

func (LegacyClient) DeleteSubnetACL added in v1.10.1

func (c LegacyClient) DeleteSubnetACL(ls string) error

func (LegacyClient) DestroyChassis added in v1.11.0

func (c LegacyClient) DestroyChassis(uuid string) error

func (LegacyClient) DestroyGateways added in v1.11.0

func (c LegacyClient) DestroyGateways(uuids []string)

func (LegacyClient) DestroyRoutes added in v1.11.0

func (c LegacyClient) DestroyRoutes(uuids []string)

func (LegacyClient) DestroyTableWithUUID added in v1.11.0

func (c LegacyClient) DestroyTableWithUUID(uuid, table string) error

func (LegacyClient) DisconnectRouterToExternal added in v1.11.0

func (c LegacyClient) DisconnectRouterToExternal(externalNet, vpcRouter string) error

func (LegacyClient) FindLoadbalancer added in v1.9.5

func (c LegacyClient) FindLoadbalancer(lb string) (string, error)

FindLoadbalancer find ovn loadbalancer uuid by name

func (LegacyClient) FindUUIDWithAttrInTable added in v1.11.0

func (c LegacyClient) FindUUIDWithAttrInTable(attribute, value, table string) ([]string, error)

func (*LegacyClient) FipRuleExists added in v1.11.0

func (c *LegacyClient) FipRuleExists(eip, logicalIP string) (bool, error)

func (LegacyClient) GetAllChassis added in v1.11.0

func (c LegacyClient) GetAllChassis() ([]string, error)

GetAllChassis get all chassis init by kube-ovn

func (LegacyClient) GetAzUUID added in v1.11.0

func (c LegacyClient) GetAzUUID(az string) (string, error)

func (LegacyClient) GetChassis added in v1.9.5

func (c LegacyClient) GetChassis(node string) (string, error)

func (LegacyClient) GetEntityInfo added in v1.9.5

func (c LegacyClient) GetEntityInfo(entity string, index string, attris []string) (result map[string]string, err error)

func (LegacyClient) GetGatewayUUIDsInOneAZ added in v1.11.0

func (c LegacyClient) GetGatewayUUIDsInOneAZ(uuid string) ([]string, error)

func (LegacyClient) GetLoadBalancerVips added in v1.9.5

func (c LegacyClient) GetLoadBalancerVips(lb string) (map[string]string, error)

GetLoadBalancerVips return vips of a loadbalancer

func (LegacyClient) GetLogicalSwitchExcludeIPS added in v1.9.5

func (c LegacyClient) GetLogicalSwitchExcludeIPS(logicalSwitch string) ([]string, error)

GetLogicalSwitchExcludeIPS get a logical switch exclude ips ovn-nbctl get logical_switch ovn-default other_config:exclude_ips => "10.17.0.1 10.17.0.2 10.17.0.3..10.17.0.5"

func (LegacyClient) GetLogicalSwitchPortAddress added in v1.9.5

func (c LegacyClient) GetLogicalSwitchPortAddress(port string) ([]string, error)

func (LegacyClient) GetLogicalSwitchPortByLogicalSwitch added in v1.9.5

func (c LegacyClient) GetLogicalSwitchPortByLogicalSwitch(logicalSwitch string) ([]string, error)

func (LegacyClient) GetLogicalSwitchPortDynamicAddress added in v1.9.5

func (c LegacyClient) GetLogicalSwitchPortDynamicAddress(port string) ([]string, error)

func (*LegacyClient) GetLspExternalIds added in v1.10.1

func (c *LegacyClient) GetLspExternalIds(lsp string) map[string]string

func (*LegacyClient) GetNatIPInfo added in v1.10.8

func (c *LegacyClient) GetNatIPInfo(uuid string) (string, error)

func (LegacyClient) GetPolicyRouteList added in v1.9.5

func (c LegacyClient) GetPolicyRouteList(router string) (routeList []*PolicyRoute, err error)

func (*LegacyClient) GetPolicyRouteParas added in v1.9.5

func (c *LegacyClient) GetPolicyRouteParas(priority int32, match string) ([]string, map[string]string, error)

func (LegacyClient) GetPortAddr added in v1.9.5

func (c LegacyClient) GetPortAddr(port string) ([]string, error)

GetPortAddr return port [mac, ip]

func (LegacyClient) GetRouteUUIDsInOneAZ added in v1.11.0

func (c LegacyClient) GetRouteUUIDsInOneAZ(uuid string) ([]string, error)

func (*LegacyClient) GetRouterNat added in v1.10.8

func (c *LegacyClient) GetRouterNat(routerName string) ([]string, error)

func (LegacyClient) GetStaticRouteList added in v1.9.5

func (c LegacyClient) GetStaticRouteList(router string) (routeList []*StaticRoute, err error)

func (LegacyClient) GetTsSubnet added in v1.9.5

func (c LegacyClient) GetTsSubnet(ts string) (string, error)

func (LegacyClient) GetVersion added in v1.11.0

func (c LegacyClient) GetVersion() (string, error)

func (LegacyClient) InitChassisNodeTag added in v1.11.0

func (c LegacyClient) InitChassisNodeTag(chassisName string, nodeName string) error

func (LegacyClient) IsPolicyRouteExist added in v1.9.5

func (c LegacyClient) IsPolicyRouteExist(router string, priority int32, match string) (bool, error)

func (LegacyClient) ListAddressesByName added in v1.9.5

func (c LegacyClient) ListAddressesByName(addressSetName string) ([]string, error)

func (LegacyClient) ListDHCPOptions added in v1.10.1

func (c LegacyClient) ListDHCPOptions(needVendorFilter bool, ls string, protocol string) ([]dhcpOptions, error)

func (LegacyClient) ListLoadBalancer added in v1.9.5

func (c LegacyClient) ListLoadBalancer() ([]string, error)

ListLoadBalancer list loadbalancer names

func (LegacyClient) ListLogicalEntity added in v1.9.5

func (c LegacyClient) ListLogicalEntity(entity string, args ...string) ([]string, error)

func (LegacyClient) ListLogicalRouter added in v1.9.5

func (c LegacyClient) ListLogicalRouter(needVendorFilter bool, args ...string) ([]string, error)

ListLogicalRouter list logical router names

func (LegacyClient) ListLogicalSwitch added in v1.9.5

func (c LegacyClient) ListLogicalSwitch(needVendorFilter bool, args ...string) ([]string, error)

ListLogicalSwitch list logical switch names

func (LegacyClient) ListLogicalSwitchPort added in v1.9.5

func (c LegacyClient) ListLogicalSwitchPort(needVendorFilter bool) ([]string, error)

func (LegacyClient) ListLspForNodePortgroup added in v1.9.5

func (c LegacyClient) ListLspForNodePortgroup() (map[string]string, map[string]string, error)

func (LegacyClient) ListNpAddressSet added in v1.9.5

func (c LegacyClient) ListNpAddressSet(npNamespace, npName, direction string) ([]string, error)

func (LegacyClient) ListNpPortGroup added in v1.9.5

func (c LegacyClient) ListNpPortGroup() ([]portGroup, error)

func (LegacyClient) ListPgPorts added in v1.9.5

func (c LegacyClient) ListPgPorts(pgName string) ([]string, error)

func (LegacyClient) ListPgPortsForNodePortgroup added in v1.9.5

func (c LegacyClient) ListPgPortsForNodePortgroup() (map[string][]string, error)

func (LegacyClient) ListPodLogicalSwitchPorts added in v1.9.5

func (c LegacyClient) ListPodLogicalSwitchPorts(pod, namespace string) ([]string, error)

func (LegacyClient) ListRemoteLogicalSwitchPortAddress added in v1.9.5

func (c LegacyClient) ListRemoteLogicalSwitchPortAddress() ([]string, error)

func (LegacyClient) ListSgRuleAddressSet added in v1.9.5

func (c LegacyClient) ListSgRuleAddressSet(sgName string, direction AclDirection) ([]string, error)

func (LegacyClient) ListStaticRoute added in v1.9.5

func (c LegacyClient) ListStaticRoute() ([]StaticRoute, error)

func (LegacyClient) ListVirtualPort added in v1.10.1

func (c LegacyClient) ListVirtualPort(ls string) ([]string, error)

func (LegacyClient) LogicalSwitchExists added in v1.9.5

func (c LegacyClient) LogicalSwitchExists(logicalSwitch string, needVendorFilter bool, args ...string) (bool, error)

func (LegacyClient) LogicalSwitchPortExists added in v1.9.5

func (c LegacyClient) LogicalSwitchPortExists(port string) (bool, error)

func (*LegacyClient) NatRuleExists added in v1.9.8

func (c *LegacyClient) NatRuleExists(logicalIP string) (bool, error)

func (LegacyClient) OvnGet added in v1.9.5

func (c LegacyClient) OvnGet(table, record, column, key string) (string, error)

func (*LegacyClient) PolicyRouteExists added in v1.9.5

func (c *LegacyClient) PolicyRouteExists(priority int32, match string) (bool, error)

func (*LegacyClient) PortGroupExists added in v1.9.5

func (c *LegacyClient) PortGroupExists(pgName string) (bool, error)

func (LegacyClient) RemoveAddressSetAddresses added in v1.9.5

func (c LegacyClient) RemoveAddressSetAddresses(name string, address string) error

func (LegacyClient) RemoveLbFromLogicalSwitch added in v1.9.5

func (c LegacyClient) RemoveLbFromLogicalSwitch(ls string, lbs ...string) error

func (LegacyClient) RemoveRouterPort added in v1.9.5

func (c LegacyClient) RemoveRouterPort(ls, lr string) error

func (LegacyClient) ResetLogicalSwitchAcl added in v1.9.5

func (c LegacyClient) ResetLogicalSwitchAcl(ls string) error

ResetLogicalSwitchAcl reset acl of a switch

func (LegacyClient) SetAclLog added in v1.9.5

func (c LegacyClient) SetAclLog(pgName string, logEnable, isIngress bool) error

func (LegacyClient) SetAddressesToAddressSet added in v1.9.5

func (c LegacyClient) SetAddressesToAddressSet(addresses []string, as string) error

func (LegacyClient) SetAzName added in v1.9.5

func (c LegacyClient) SetAzName(azName string) error

func (LegacyClient) SetICAutoRoute added in v1.9.5

func (c LegacyClient) SetICAutoRoute(enable bool, blackList []string) error

func (*LegacyClient) SetLBCIDR added in v1.9.5

func (c *LegacyClient) SetLBCIDR(svccidr string) error

func (LegacyClient) SetLogicalSwitchConfig added in v1.9.5

func (c LegacyClient) SetLogicalSwitchConfig(ls, lr, protocol, subnet, gateway string, excludeIps []string, needRouter bool) error

func (LegacyClient) SetLogicalSwitchExcludeIPS added in v1.9.5

func (c LegacyClient) SetLogicalSwitchExcludeIPS(logicalSwitch string, excludeIPS []string) error

SetLogicalSwitchExcludeIPS set a logical switch exclude ips ovn-nbctl set logical_switch ovn-default other_config:exclude_ips="10.17.0.2 10.17.0.1"

func (LegacyClient) SetLsDnatModDlDst added in v1.10.2

func (c LegacyClient) SetLsDnatModDlDst(enabled bool) error

func (LegacyClient) SetLspExternalIds added in v1.9.5

func (c LegacyClient) SetLspExternalIds(name string, externalIDs map[string]string) error

func (LegacyClient) SetPolicyRouteExternalIds added in v1.9.5

func (c LegacyClient) SetPolicyRouteExternalIds(priority int32, match string, nameIpMaps map[string]string) error

func (LegacyClient) SetPortAddress added in v1.9.5

func (c LegacyClient) SetPortAddress(port, mac, ip string) error

func (LegacyClient) SetPortExternalIds added in v1.9.5

func (c LegacyClient) SetPortExternalIds(port, key, value string) error

func (LegacyClient) SetPortSecurity added in v1.9.5

func (c LegacyClient) SetPortSecurity(portSecurity bool, ls, port, mac, ipStr, vips string) error

func (LegacyClient) SetPortTag added in v1.9.5

func (c LegacyClient) SetPortTag(name string, vlanID int) error

func (LegacyClient) SetPortsToPortGroup added in v1.9.5

func (c LegacyClient) SetPortsToPortGroup(portGroup string, portNames []string) error

func (LegacyClient) SetPrivateLogicalSwitch added in v1.9.5

func (c LegacyClient) SetPrivateLogicalSwitch(ls, cidr string, allow []string) error

SetPrivateLogicalSwitch will drop all ingress traffic except allow subnets

func (LegacyClient) SetUseCtInvMatch added in v1.9.5

func (c LegacyClient) SetUseCtInvMatch() error

func (LegacyClient) SetVirtualParents added in v1.10.1

func (c LegacyClient) SetVirtualParents(ls, ip, parents string) error

func (*LegacyClient) SnatRuleExists added in v1.11.0

func (c *LegacyClient) SnatRuleExists(eip, ipCidr string) (bool, error)

func (*LegacyClient) UpdateDHCPOptions added in v1.10.1

func (c *LegacyClient) UpdateDHCPOptions(ls, cidrBlock, gateway, dhcpV4OptionsStr, dhcpV6OptionsStr string, enableDHCP bool) (dhcpOptionsUUIDs *DHCPOptionsUUIDs, err error)

func (LegacyClient) UpdateNatRule added in v1.9.5

func (c LegacyClient) UpdateNatRule(policy, logicalIP, externalIP, router, logicalMac, port string) error

func (*LegacyClient) UpdateRouterPortIPv6RA added in v1.10.1

func (c *LegacyClient) UpdateRouterPortIPv6RA(ls, lr, cidrBlock, gateway, ipv6RAConfigsStr string, enableIPv6RA bool) error

func (LegacyClient) UpdateSgACL added in v1.9.5

func (c LegacyClient) UpdateSgACL(sg *kubeovnv1.SecurityGroup, direction AclDirection) error

func (LegacyClient) UpdateSubnetACL added in v1.10.1

func (c LegacyClient) UpdateSubnetACL(ls string, acls []kubeovnv1.Acl) error

func (*LegacyClient) VpcHasPolicyRoute added in v1.11.0

func (c *LegacyClient) VpcHasPolicyRoute(vpc string, nextHops []string, priority int32) (bool, error)

type OvnClient added in v1.9.5

type OvnClient struct {
	// contains filtered or unexported fields
}

func NewOvnClient added in v1.9.5

func NewOvnClient(ovnNbAddr string, ovnNbTimeout int) (*OvnClient, error)

TODO: support sb/ic-nb client

func (OvnClient) AddLogicalRouterPort added in v1.9.6

func (c OvnClient) AddLogicalRouterPort(lr, name, mac, networks string) error

func (OvnClient) AddRouterPolicy added in v1.9.6

func (c OvnClient) AddRouterPolicy(lr *ovnnb.LogicalRouter, match string, action ovnnb.LogicalRouterPolicyAction,
	opts map[string]string, extIDs map[string]string, priority int) error

func (OvnClient) CreatePortGroup added in v1.9.5

func (c OvnClient) CreatePortGroup(name string, externalIDs map[string]string) error

func (OvnClient) DeleteRouterPolicy added in v1.9.6

func (c OvnClient) DeleteRouterPolicy(lr *ovnnb.LogicalRouter, uuid string) error

func (OvnClient) GetLogicalRouter added in v1.9.6

func (c OvnClient) GetLogicalRouter(name string, ignoreNotFound bool) (*ovnnb.LogicalRouter, error)

func (OvnClient) GetLogicalRouterPoliciesByExtID added in v1.9.6

func (c OvnClient) GetLogicalRouterPoliciesByExtID(key, value string) ([]ovnnb.LogicalRouterPolicy, error)

func (OvnClient) GetLogicalRouterPort added in v1.9.6

func (c OvnClient) GetLogicalRouterPort(name string, ignoreNotFound bool) (*ovnnb.LogicalRouterPort, error)

func (OvnClient) GetLogicalRouterRouteByOpts added in v1.9.6

func (c OvnClient) GetLogicalRouterRouteByOpts(key, value string) ([]ovnnb.LogicalRouterStaticRoute, error)

func (OvnClient) GetLogicalSwitchPort added in v1.9.5

func (c OvnClient) GetLogicalSwitchPort(name string, ignoreNotFound bool) (*ovnnb.LogicalSwitchPort, error)

func (OvnClient) GetPortGroup added in v1.9.5

func (c OvnClient) GetPortGroup(name string, ignoreNotFound bool) (*ovnnb.PortGroup, error)

func (OvnClient) ListLogicalSwitchPorts added in v1.9.5

func (c OvnClient) ListLogicalSwitchPorts(needVendorFilter bool, externalIDs map[string]string) ([]ovnnb.LogicalSwitchPort, error)

func (OvnClient) ListPodLogicalSwitchPorts added in v1.9.5

func (c OvnClient) ListPodLogicalSwitchPorts(key string) ([]ovnnb.LogicalSwitchPort, error)

func (OvnClient) LogicalRouterExists added in v1.9.6

func (c OvnClient) LogicalRouterExists(name string) (bool, error)

func (OvnClient) LogicalRouterPortExists added in v1.9.6

func (c OvnClient) LogicalRouterPortExists(name string) (bool, error)

func (OvnClient) LogicalSwitchPortExists added in v1.9.5

func (c OvnClient) LogicalSwitchPortExists(name string) (bool, error)

func (OvnClient) PortGroupAddPort added in v1.9.5

func (c OvnClient) PortGroupAddPort(pgName, portName string) error

func (OvnClient) PortGroupRemovePort added in v1.9.5

func (c OvnClient) PortGroupRemovePort(pgName, portName string) error

type PolicyRoute added in v1.9.0

type PolicyRoute struct {
	Priority  int32
	Match     string
	Action    string
	NextHopIP string
}

type StaticRoute added in v1.7.0

type StaticRoute struct {
	Policy  string
	CIDR    string
	NextHop string
}

Jump to

Keyboard shortcuts

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