ovs

package
v1.9.20 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: 21 Imported by: 6

Documentation

Index

Constants

View Source
const (
	OvnNbCtl    = "ovn-nbctl"
	OvnSbCtl    = "ovn-sbctl"
	OVNIcNbCtl  = "ovn-ic-nbctl"
	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 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 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 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 PodNameToLocalnetName added in v1.7.0

func PodNameToLocalnetName(subnet string) string

func PodNameToPortName

func PodNameToPortName(pod, namespace, provider string) string

PodNameToPortName return the ovn port name for a given pod

func SetHtbQosPriority added in v1.9.0

func SetHtbQosPriority(podName, podNamespace, iface, ifName, priority string, qosIfaceUidMap, queueIfaceUidMap map[string]string) error

func SetHtbQosQueueRecord added in v1.9.0

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

func SetInterfaceBandwidth added in v1.7.0

func SetInterfaceBandwidth(podName, podNamespace, iface, ingress, egress, podPriority 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 SetPodQosPriority added in v1.9.0

func SetPodQosPriority(podName, podNamespace, ifaceID, priority string, qosIfaceUidMap, queueIfaceUidMap map[string]string) error

SetPodQosPriority set qos to this pod port.

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 LegacyClient added in v1.9.5

type LegacyClient struct {
	OvnNbAddress                  string
	OvnTimeout                    int
	OvnSbAddress                  string
	OVNIcNBAddress                string
	ClusterRouter                 string
	ClusterTcpLoadBalancer        string
	ClusterUdpLoadBalancer        string
	ClusterTcpSessionLoadBalancer string
	ClusterUdpSessionLoadBalancer string
	NodeSwitch                    string
	NodeSwitchCIDR                string
	ExternalGatewayType           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) AddLbToLogicalSwitch added in v1.9.5

func (c LegacyClient) AddLbToLogicalSwitch(tcpLb, tcpSessLb, udpLb, udpSessLb, ls 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) AddStaticRoute added in v1.9.5

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

AddStaticRoute add a static route rule in ovn

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) CombineEgressACLCmd added in v1.9.14

func (c LegacyClient) CombineEgressACLCmd(pgName, asEgressName, asExceptName, protocol string, npp []netv1.NetworkPolicyPort, portSvcName string, logEnable bool, aclCmds []string, index int) []string

func (LegacyClient) CombineIngressACLCmd added in v1.9.14

func (c LegacyClient) CombineIngressACLCmd(pgName, asIngressName, asExceptName, svcAsName, protocol string, npp []netv1.NetworkPolicyPort, logEnable bool, aclCmds []string, index int) []string

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(pgName, gateway, cidr string) error

func (LegacyClient) CreateGatewaySwitch added in v1.9.5

func (c LegacyClient) CreateGatewaySwitch(name, externalgatewaynet string, externalgatewayvlanid 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, 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) 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) DeleteChassis added in v1.9.5

func (c LegacyClient) DeleteChassis(node 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) 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) FindLoadbalancer added in v1.9.5

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

FindLoadbalancer find ovn loadbalancer uuid by name

func (LegacyClient) GetAllChassisHostname added in v1.9.5

func (c LegacyClient) GetAllChassisHostname() ([]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) 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) 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) 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) 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) 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) 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(tcpLb, tcpSessLb, udpLb, udpSessLb, ls 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) 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, 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) UpdateNatRule added in v1.9.5

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

func (LegacyClient) UpdateSgACL added in v1.9.5

func (c LegacyClient) UpdateSgACL(sg *kubeovnv1.SecurityGroup, direction AclDirection) 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, matchfield string, action ovnnb.LogicalRouterPolicyAction,
	opts map[string]string, extIDs map[string]string, priority int) error

func (OvnClient) AddSwitchRouterPort added in v1.9.8

func (c OvnClient) AddSwitchRouterPort(ls, lr string) 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) GetLogicalRouterRouteByExtIds added in v1.9.8

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

func (OvnClient) GetLogicalRouterRouteByOpts added in v1.9.6

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

func (OvnClient) GetLogicalSwitch added in v1.9.8

func (c OvnClient) GetLogicalSwitch(name string, ignoreNotFound bool) (*ovnnb.LogicalSwitch, 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) LogicalSwitchExists added in v1.9.8

func (c OvnClient) LogicalSwitchExists(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