Documentation ¶
Index ¶
- Constants
- Variables
- func BridgeExists(name string) (bool, error)
- func Bridges() ([]string, error)
- func CheckAlive() error
- func CheckAndUpdateHtbQos(podName, podNamespace, ifaceID string, queueIfaceUidMap map[string]string) error
- func CleanDuplicatePort(ifaceID string)
- func CleanLostInterface()
- func ClearHtbQosQueue(podName, podNamespace, iface string) error
- func ClearPodBandwidth(podName, podNamespace, ifaceID string) error
- func ClearPortQosBinding(ifaceID string) error
- func ConfigInterfaceMirror(globalMirror bool, open string, iface string) error
- func ConstructWaitForNameNotExistsOperation(name string, table string) ovsdb.Operation
- func ConstructWaitForUniqueOperation(table string, column string, value interface{}) ovsdb.Operation
- func Exec(args ...string) (string, error)
- func GetQosList(podName, podNamespace, ifaceID string) ([]string, error)
- func GetResidualInternalPorts() []string
- func GetSgPortGroupName(sgName string) string
- func GetSgV4AssociatedName(sgName string) string
- func GetSgV6AssociatedName(sgName string) string
- func IsHtbQos(iface string) (bool, error)
- func ListExternalIds(table string) (map[string]string, error)
- func ListQosQueueIds() (map[string]string, error)
- func LogicalRouterPortName(lr, ls string) string
- func LogicalSwitchPortName(lr, ls string) string
- func PodNameToLocalnetName(subnet string) string
- func PodNameToPortName(pod, namespace, provider string) string
- func SetHtbQosPriority(podName, podNamespace, iface, ifName, priority string, ...) error
- func SetHtbQosQueueRecord(podName, podNamespace, iface, priority string, maxRateBPS int, ...) (string, error)
- func SetInterfaceBandwidth(podName, podNamespace, iface, ingress, egress, podPriority string) error
- func SetNetemQos(podName, podNamespace, iface, latency, limit, loss string) error
- func SetPodQosPriority(podName, podNamespace, ifaceID, priority string, ...) error
- func SetPortTag(port, tag string) error
- func SetQosQueueBinding(podName, podNamespace, ifName, iface, queueUid string, ...) error
- func StartOvnNbctlDaemon(ovnNbAddr string) error
- func Transact(c client.Client, method string, operations []ovsdb.Operation, ...) error
- func ValidatePortVendor(port string) (bool, error)
- type AclDirection
- type LegacyClient
- func (c *LegacyClient) AclExists(priority, direction string) (bool, error)
- func (c LegacyClient) AddAddressSetAddresses(name string, address string) error
- func (c LegacyClient) AddLbToLogicalSwitch(tcpLb, tcpSessLb, udpLb, udpSessLb, ls string) error
- func (c LegacyClient) AddPolicyRoute(router string, priority int32, match, action, nextHop string, ...) error
- func (c LegacyClient) AddStaticRoute(policy, cidr, nextHop, router string, routeType string, isMigrate bool) error
- func (c LegacyClient) CheckPolicyRouteNexthopConsistent(router, match, nexthop string, priority int32) (bool, error)
- func (c LegacyClient) CleanLogicalSwitchAcl(ls string) error
- func (c LegacyClient) CombineEgressACLCmd(pgName, asEgressName, asExceptName, protocol string, ...) []string
- func (c LegacyClient) CombineIngressACLCmd(pgName, asIngressName, asExceptName, svcAsName, protocol string, ...) []string
- func (c LegacyClient) CreateACL(aclCmds []string) error
- func (c LegacyClient) CreateACLForNodePg(pgName, nodeIpStr string) error
- func (c LegacyClient) CreateAddressSet(name string) error
- func (c LegacyClient) CreateAddressSetWithAddresses(name string, addresses ...string) error
- func (c LegacyClient) CreateGatewayACL(pgName, gateway, cidr string) error
- func (c LegacyClient) CreateGatewaySwitch(name, externalgatewaynet string, externalgatewayvlanid int, ip, mac string, ...) error
- func (c LegacyClient) CreateICLogicalRouterPort(az, mac, subnet string, chassises []string) error
- func (c LegacyClient) CreateLoadBalancer(lb, protocol, selectFields string) error
- func (c LegacyClient) CreateLoadBalancerRule(lb, vip, ips, protocol string) error
- func (c LegacyClient) CreateLocalnetPort(ls, port, provider string, vlanID int) error
- func (c LegacyClient) CreateLogicalRouter(lr string) error
- func (c LegacyClient) CreateLogicalSwitch(ls, lr, subnet, gateway string, needRouter bool) error
- func (c LegacyClient) CreateNpAddressSet(asName, npNamespace, npName, direction string) error
- func (c LegacyClient) CreateNpPortGroup(pgName, npNs, npName string) error
- func (c LegacyClient) CreatePeerRouterPort(localRouter, remoteRouter, localRouterPortIP string) error
- func (c LegacyClient) CreatePort(ls, port, ip, mac, pod, namespace string, portSecurity bool, ...) error
- func (c LegacyClient) CreateSgAssociatedAddressSet(sgName string) error
- func (c LegacyClient) CreateSgDenyAllACL() error
- func (c LegacyClient) CreateSgPortGroup(sgName string) error
- func (c LegacyClient) CustomFindEntity(entity string, attris []string, args ...string) (result []map[string][]string, err error)
- func (c LegacyClient) DeleteACL(pgName, direction string) (err error)
- func (c LegacyClient) DeleteAclForNodePg(pgName string) error
- func (c LegacyClient) DeleteAddressSet(name string) error
- func (c LegacyClient) DeleteChassis(node string) error
- func (c LegacyClient) DeleteGatewaySwitch(name string) error
- func (c LegacyClient) DeleteICLogicalRouterPort(az string) error
- func (c LegacyClient) DeleteLoadBalancer(lbs ...string) error
- func (c LegacyClient) DeleteLoadBalancerVip(vip, lb string) error
- func (c LegacyClient) DeleteLogicalRouter(lr string) error
- func (c LegacyClient) DeleteLogicalRouterPort(port string) error
- func (c LegacyClient) DeleteLogicalSwitch(ls string) error
- func (c LegacyClient) DeleteLogicalSwitchPort(port string) error
- func (c LegacyClient) DeleteMatchedStaticRoute(cidr, nexthop, router string) error
- func (c LegacyClient) DeleteNatRule(logicalIP, router string) error
- func (c LegacyClient) DeletePolicyRoute(router string, priority int32, match string) error
- func (c LegacyClient) DeletePolicyRouteByNexthop(router string, priority int32, nexthop string) error
- func (c *LegacyClient) DeletePolicyRouteByUUID(router string, uuids []string) error
- func (c LegacyClient) DeletePortGroup(pgName string) error
- func (c LegacyClient) DeleteSgPortGroup(sgName string) error
- func (c LegacyClient) DeleteStaticRoute(cidr, router string) error
- func (c LegacyClient) DeleteStaticRouteByNextHop(nextHop string) error
- func (c LegacyClient) FindLoadbalancer(lb string) (string, error)
- func (c LegacyClient) GetAllChassisHostname() ([]string, error)
- func (c LegacyClient) GetChassis(node string) (string, error)
- func (c LegacyClient) GetEntityInfo(entity string, index string, attris []string) (result map[string]string, err error)
- func (c LegacyClient) GetLoadBalancerVips(lb string) (map[string]string, error)
- func (c LegacyClient) GetLogicalSwitchExcludeIPS(logicalSwitch string) ([]string, error)
- func (c LegacyClient) GetLogicalSwitchPortAddress(port string) ([]string, error)
- func (c LegacyClient) GetLogicalSwitchPortByLogicalSwitch(logicalSwitch string) ([]string, error)
- func (c LegacyClient) GetLogicalSwitchPortDynamicAddress(port string) ([]string, error)
- func (c LegacyClient) GetPolicyRouteList(router string) (routeList []*PolicyRoute, err error)
- func (c *LegacyClient) GetPolicyRouteParas(priority int32, match string) ([]string, map[string]string, error)
- func (c LegacyClient) GetPortAddr(port string) ([]string, error)
- func (c LegacyClient) GetStaticRouteList(router string) (routeList []*StaticRoute, err error)
- func (c LegacyClient) GetTsSubnet(ts string) (string, error)
- func (c LegacyClient) IsPolicyRouteExist(router string, priority int32, match string) (bool, error)
- func (c LegacyClient) ListAddressesByName(addressSetName string) ([]string, error)
- func (c LegacyClient) ListLoadBalancer() ([]string, error)
- func (c LegacyClient) ListLogicalEntity(entity string, args ...string) ([]string, error)
- func (c LegacyClient) ListLogicalRouter(needVendorFilter bool, args ...string) ([]string, error)
- func (c LegacyClient) ListLogicalSwitch(needVendorFilter bool, args ...string) ([]string, error)
- func (c LegacyClient) ListLogicalSwitchPort(needVendorFilter bool) ([]string, error)
- func (c LegacyClient) ListLspForNodePortgroup() (map[string]string, map[string]string, error)
- func (c LegacyClient) ListNpAddressSet(npNamespace, npName, direction string) ([]string, error)
- func (c LegacyClient) ListNpPortGroup() ([]portGroup, error)
- func (c LegacyClient) ListPgPorts(pgName string) ([]string, error)
- func (c LegacyClient) ListPgPortsForNodePortgroup() (map[string][]string, error)
- func (c LegacyClient) ListPodLogicalSwitchPorts(pod, namespace string) ([]string, error)
- func (c LegacyClient) ListRemoteLogicalSwitchPortAddress() ([]string, error)
- func (c LegacyClient) ListSgRuleAddressSet(sgName string, direction AclDirection) ([]string, error)
- func (c LegacyClient) ListStaticRoute() ([]StaticRoute, error)
- func (c LegacyClient) LogicalSwitchExists(logicalSwitch string, needVendorFilter bool, args ...string) (bool, error)
- func (c LegacyClient) LogicalSwitchPortExists(port string) (bool, error)
- func (c *LegacyClient) NatRuleExists(logicalIP string) (bool, error)
- func (c LegacyClient) OvnGet(table, record, column, key string) (string, error)
- func (c *LegacyClient) PolicyRouteExists(priority int32, match string) (bool, error)
- func (c *LegacyClient) PortGroupExists(pgName string) (bool, error)
- func (c LegacyClient) RemoveAddressSetAddresses(name string, address string) error
- func (c LegacyClient) RemoveLbFromLogicalSwitch(tcpLb, tcpSessLb, udpLb, udpSessLb, ls string) error
- func (c LegacyClient) RemoveRouterPort(ls, lr string) error
- func (c LegacyClient) ResetLogicalSwitchAcl(ls string) error
- func (c LegacyClient) SetAclLog(pgName string, logEnable, isIngress bool) error
- func (c LegacyClient) SetAddressesToAddressSet(addresses []string, as string) error
- func (c LegacyClient) SetAzName(azName string) error
- func (c LegacyClient) SetICAutoRoute(enable bool, blackList []string) error
- func (c *LegacyClient) SetLBCIDR(svccidr string) error
- func (c LegacyClient) SetLogicalSwitchConfig(ls, lr, protocol, subnet, gateway string, excludeIps []string, needRouter bool) error
- func (c LegacyClient) SetLogicalSwitchExcludeIPS(logicalSwitch string, excludeIPS []string) error
- func (c LegacyClient) SetLspExternalIds(name string, externalIDs map[string]string) error
- func (c LegacyClient) SetPolicyRouteExternalIds(priority int32, match string, nameIpMaps map[string]string) error
- func (c LegacyClient) SetPortAddress(port, mac, ip string) error
- func (c LegacyClient) SetPortExternalIds(port, key, value string) error
- func (c LegacyClient) SetPortSecurity(portSecurity bool, port, mac, ipStr, vips string) error
- func (c LegacyClient) SetPortTag(name string, vlanID int) error
- func (c LegacyClient) SetPortsToPortGroup(portGroup string, portNames []string) error
- func (c LegacyClient) SetPrivateLogicalSwitch(ls, cidr string, allow []string) error
- func (c LegacyClient) SetUseCtInvMatch() error
- func (c LegacyClient) UpdateNatRule(policy, logicalIP, externalIP, router, logicalMac, port string) error
- func (c LegacyClient) UpdateSgACL(sg *kubeovnv1.SecurityGroup, direction AclDirection) error
- type OvnClient
- func (c OvnClient) AddLogicalRouterPort(lr, name, mac, networks string) error
- func (c OvnClient) AddRouterPolicy(lr *ovnnb.LogicalRouter, matchfield string, ...) error
- func (c OvnClient) AddSwitchRouterPort(ls, lr string) error
- func (c OvnClient) CreatePortGroup(name string, externalIDs map[string]string) error
- func (c OvnClient) DeleteRouterPolicy(lr *ovnnb.LogicalRouter, uuid string) error
- func (c OvnClient) GetLogicalRouter(name string, ignoreNotFound bool) (*ovnnb.LogicalRouter, error)
- func (c OvnClient) GetLogicalRouterPoliciesByExtID(key, value string) ([]ovnnb.LogicalRouterPolicy, error)
- func (c OvnClient) GetLogicalRouterPort(name string, ignoreNotFound bool) (*ovnnb.LogicalRouterPort, error)
- func (c OvnClient) GetLogicalRouterRouteByExtIds(key string) ([]ovnnb.LogicalRouterStaticRoute, error)
- func (c OvnClient) GetLogicalRouterRouteByOpts(key, value string) ([]ovnnb.LogicalRouterStaticRoute, error)
- func (c OvnClient) GetLogicalSwitch(name string, ignoreNotFound bool) (*ovnnb.LogicalSwitch, error)
- func (c OvnClient) GetLogicalSwitchPort(name string, ignoreNotFound bool) (*ovnnb.LogicalSwitchPort, error)
- func (c OvnClient) GetPortGroup(name string, ignoreNotFound bool) (*ovnnb.PortGroup, error)
- func (c OvnClient) ListLogicalSwitchPorts(needVendorFilter bool, externalIDs map[string]string) ([]ovnnb.LogicalSwitchPort, error)
- func (c OvnClient) ListPodLogicalSwitchPorts(key string) ([]ovnnb.LogicalSwitchPort, error)
- func (c OvnClient) LogicalRouterExists(name string) (bool, error)
- func (c OvnClient) LogicalRouterPortExists(name string) (bool, error)
- func (c OvnClient) LogicalSwitchExists(name string) (bool, error)
- func (c OvnClient) LogicalSwitchPortExists(name string) (bool, error)
- func (c OvnClient) PortGroupAddPort(pgName, portName string) error
- func (c OvnClient) PortGroupRemovePort(pgName, portName string) error
- type PolicyRoute
- type StaticRoute
Constants ¶
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 ¶
var ( ErrNoAddr = errors.New("no address") ErrNotFound = errors.New("not found") )
Functions ¶
func BridgeExists ¶ added in v1.8.3
BridgeExists checks whether the bridge already exists
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 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 ClearPodBandwidth ¶
ClearPodBandwidth remove qos related to this pod.
func ClearPortQosBinding ¶ added in v1.9.0
remove qos related to this port.
func ConfigInterfaceMirror ¶ added in v1.8.0
config mirror for interface by pod annotations and install param
func ConstructWaitForNameNotExistsOperation ¶ added in v1.9.6
func ConstructWaitForUniqueOperation ¶ added in v1.9.6
func GetQosList ¶ added in v1.9.0
func GetResidualInternalPorts ¶ added in v1.7.2
func GetResidualInternalPorts() []string
func GetSgPortGroupName ¶ added in v1.8.0
func GetSgV4AssociatedName ¶ added in v1.8.0
func GetSgV6AssociatedName ¶ added in v1.8.0
func ListExternalIds ¶ added in v1.9.0
func ListQosQueueIds ¶ added in v1.9.0
func LogicalRouterPortName ¶ added in v1.9.6
func LogicalSwitchPortName ¶ added in v1.9.6
func PodNameToLocalnetName ¶ added in v1.7.0
func PodNameToPortName ¶
PodNameToPortName return the ovn port name for a given pod
func SetHtbQosPriority ¶ added in v1.9.0
func SetHtbQosQueueRecord ¶ added in v1.9.0
func SetInterfaceBandwidth ¶ added in v1.7.0
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
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 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
StartOvnNbctlDaemon start a daemon and set OVN_NB_DAEMON env
func ValidatePortVendor ¶ added in v1.7.1
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 (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 (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 (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 (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 (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 (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 (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 (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
TODO: support sb/ic-nb client
func (OvnClient) AddLogicalRouterPort ¶ added in v1.9.6
func (OvnClient) AddRouterPolicy ¶ added in v1.9.6
func (OvnClient) AddSwitchRouterPort ¶ added in v1.9.8
func (OvnClient) CreatePortGroup ¶ added in v1.9.5
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 (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 (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 (OvnClient) GetLogicalSwitchPort ¶ added in v1.9.5
func (OvnClient) GetPortGroup ¶ added in v1.9.5
func (OvnClient) ListLogicalSwitchPorts ¶ added in v1.9.5
func (OvnClient) ListPodLogicalSwitchPorts ¶ added in v1.9.5
func (c OvnClient) ListPodLogicalSwitchPorts(key string) ([]ovnnb.LogicalSwitchPort, error)