From patchwork Fri May 7 04:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1475338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FbxmM3NZbz9sPf for ; Fri, 7 May 2021 14:09:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B4AB460E5C; Fri, 7 May 2021 04:09:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FhOGlueSmnxf; Fri, 7 May 2021 04:09:34 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTP id 0A79961629; Fri, 7 May 2021 04:08:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E2E5AC000E; Fri, 7 May 2021 04:08:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1CEA4C0011 for ; Fri, 7 May 2021 04:08:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7DC1C83D69 for ; Fri, 7 May 2021 04:07:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2WeqB3u3UlBl for ; Fri, 7 May 2021 04:07:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.osuosl.org (Postfix) with ESMTPS id 136CA83EE4 for ; Fri, 7 May 2021 04:07:42 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3A634C0006; Fri, 7 May 2021 04:07:39 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 6 May 2021 21:06:53 -0700 Message-Id: <20210507040659.26830-22-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210507040659.26830-1-blp@ovn.org> References: <20210507040659.26830-1-blp@ovn.org> MIME-Version: 1.0 Cc: Leonid Ryzhyk , Ben Pfaff Subject: [ovs-dev] [PATCH ovn v3 21/27] ovn-northd-ddlog: Eliminate remaining Ref's. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Leonid Ryzhyk Change all remaining occurrences of `Ref` to `Intern` throughout the DDlog code base. Signed-off-by: Leonid Ryzhyk Signed-off-by: Ben Pfaff --- northd/helpers.dl | 36 +++++++++++++------------- northd/lrouter.dl | 22 ++++++++-------- northd/lswitch.dl | 61 ++++++++++++++++++++++++-------------------- northd/multicast.dl | 49 ++++++++++++++++++++--------------- northd/ovn_northd.dl | 8 +++--- 5 files changed, 95 insertions(+), 81 deletions(-) diff --git a/northd/helpers.dl b/northd/helpers.dl index 32a5526d59d5..49281fcafc9a 100644 --- a/northd/helpers.dl +++ b/northd/helpers.dl @@ -21,40 +21,40 @@ import ovn output relation Warning[string] /* ACLRef: reference to nb::ACL */ -relation &ACLRef[nb::ACL] -&ACLRef[acl] :- nb::ACL[acl]. +relation ACLRef[Intern] +ACLRef[acl.intern()] :- nb::ACL[acl]. /* DHCP_Options: reference to nb::DHCP_Options */ -relation &DHCP_OptionsRef[nb::DHCP_Options] -&DHCP_OptionsRef[options] :- nb::DHCP_Options[options]. +relation DHCP_OptionsRef[Intern] +DHCP_OptionsRef[options.intern()] :- nb::DHCP_Options[options]. /* QoS: reference to nb::QoS */ -relation &QoSRef[nb::QoS] -&QoSRef[qos] :- nb::QoS[qos]. +relation QoSRef[Intern] +QoSRef[qos.intern()] :- nb::QoS[qos]. /* LoadBalancerRef: reference to nb::Load_Balancer */ -relation &LoadBalancerRef[nb::Load_Balancer] -&LoadBalancerRef[lb] :- nb::Load_Balancer[lb]. +relation LoadBalancerRef[Intern] +LoadBalancerRef[lb.intern()] :- nb::Load_Balancer[lb]. /* LoadBalancerHealthCheckRef: reference to nb::Load_Balancer_Health_Check */ -relation &LoadBalancerHealthCheckRef[nb::Load_Balancer_Health_Check] -&LoadBalancerHealthCheckRef[lbhc] :- nb::Load_Balancer_Health_Check[lbhc]. +relation LoadBalancerHealthCheckRef[Intern] +LoadBalancerHealthCheckRef[lbhc.intern()] :- nb::Load_Balancer_Health_Check[lbhc]. /* MeterRef: reference to nb::Meter*/ -relation &MeterRef[nb::Meter] -&MeterRef[meter] :- nb::Meter[meter]. +relation MeterRef[Intern] +MeterRef[meter.intern()] :- nb::Meter[meter]. /* NATRef: reference to nb::NAT*/ -relation &NATRef[nb::NAT] -&NATRef[nat] :- nb::NAT[nat]. +relation NATRef[Intern] +NATRef[nat.intern()] :- nb::NAT[nat]. /* AddressSetRef: reference to nb::Address_Set */ -relation &AddressSetRef[nb::Address_Set] -&AddressSetRef[__as] :- nb::Address_Set[__as]. +relation AddressSetRef[Intern] +AddressSetRef[__as.intern()] :- nb::Address_Set[__as]. /* ServiceMonitor: reference to sb::Service_Monitor */ -relation &ServiceMonitorRef[sb::Service_Monitor] -&ServiceMonitorRef[sm] :- sb::Service_Monitor[sm]. +relation ServiceMonitorRef[Intern] +ServiceMonitorRef[sm.intern()] :- sb::Service_Monitor[sm]. /* Switch-to-router logical port connections */ relation SwitchRouterPeer(lsp: uuid, lsp_name: string, lrp: uuid) diff --git a/northd/lrouter.dl b/northd/lrouter.dl index 68df41d02a80..1b892f8c2e02 100644 --- a/northd/lrouter.dl +++ b/northd/lrouter.dl @@ -263,11 +263,11 @@ LogicalRouterRedirectPort(lr, None) :- nb::Logical_Router(._uuid = lr), not DistributedGatewayPort(_, lr). -typedef ExceptionalExtIps = AllowedExtIps{ips: Ref} - | ExemptedExtIps{ips: Ref} +typedef ExceptionalExtIps = AllowedExtIps{ips: Intern} + | ExemptedExtIps{ips: Intern} typedef NAT = NAT{ - nat: Ref, + nat: Intern, external_ip: v46_ip, external_mac: Option, exceptional_ext_ips: Option @@ -275,7 +275,7 @@ typedef NAT = NAT{ relation LogicalRouterNAT0( lr: uuid, - nat: Ref, + nat: Intern, external_ip: v46_ip, external_mac: Option) LogicalRouterNAT0(lr, nat, external_ip, external_mac) :- @@ -409,14 +409,14 @@ LogicalRouterSnatIPs(lr._uuid, map_empty()) :- lr in nb::Logical_Router(), not LogicalRouterSnatIP(.lr = lr._uuid). -relation LogicalRouterLB(lr: uuid, nat: Ref) +relation LogicalRouterLB(lr: uuid, nat: Intern) LogicalRouterLB(lr, lb) :- nb::Logical_Router(._uuid = lr, .load_balancer = lbs), var lb_uuid = FlatMap(lbs), lb in &LoadBalancerRef[nb::Load_Balancer{._uuid = lb_uuid}]. -relation LogicalRouterLBs(lr: uuid, nat: Vec>) +relation LogicalRouterLBs(lr: uuid, nat: Vec>) LogicalRouterLBs(lr, lbs) :- LogicalRouterLB(lr, lb), @@ -458,8 +458,8 @@ typedef Router = Router { is_gateway: bool, nats: Vec, snat_ips: Map>, - lbs: Vec>, - mcast_cfg: Ref, + lbs: Vec>, + mcast_cfg: Intern, learn_from_arp_request: bool, force_lb_snat: bool, } @@ -501,7 +501,7 @@ Router[Router{ var force_lb_snat = lb_force_snat_router_ip(lr.options). /* RouterLB: many-to-many relation between logical routers and nb::LB */ -relation RouterLB(router: Intern, lb: Ref) +relation RouterLB(router: Intern, lb: Intern) RouterLB(router, lb) :- router in &Router(.lbs = lbs), @@ -510,7 +510,7 @@ RouterLB(router, lb) :- /* Load balancer VIPs associated with routers */ relation RouterLBVIP( router: Intern, - lb: Ref, + lb: Intern, vip: string, backends: string) @@ -592,7 +592,7 @@ typedef RouterPort = RouterPort { router: Intern, is_redirect: bool, peer: RouterPeer, - mcast_cfg: Ref, + mcast_cfg: Intern, sb_options: Map, has_bfd: bool } diff --git a/northd/lswitch.dl b/northd/lswitch.dl index eeeb968d5d97..0008c84bbd54 100644 --- a/northd/lswitch.dl +++ b/northd/lswitch.dl @@ -201,7 +201,7 @@ typedef Switch = Switch { localnet_ports: Vec<(uuid, string)>, // UUID and name of each localnet port. subnet: Option<(in_addr/*subnet*/, in_addr/*mask*/, bit<32>/*start_ipv4*/, bit<32>/*total_ipv4s*/)>, ipv6_prefix: Option, - mcast_cfg: Ref, + mcast_cfg: Intern, is_vlan_transparent: bool, /* Does this switch have at least one port with type != "router"? */ @@ -276,14 +276,14 @@ Switch[Switch{ var is_vlan_transparent = ls.other_config.get_bool_def("vlan-passthru", false). /* SwitchLB: many-to-many relation between logical switches and nb::LB */ -relation SwitchLB(sw_uuid: uuid, lb: Ref) +relation SwitchLB(sw_uuid: uuid, lb: Intern) SwitchLB(sw_uuid, lb) :- nb::Logical_Switch(._uuid = sw_uuid, .load_balancer = lb_ids), var lb_id = FlatMap(lb_ids), lb in &LoadBalancerRef[nb::Load_Balancer{._uuid = lb_id}]. /* Load balancer VIPs associated with switch */ -relation SwitchLBVIP(sw_uuid: uuid, lb: Ref, vip: string, backends: string) +relation SwitchLBVIP(sw_uuid: uuid, lb: Intern, vip: string, backends: string) SwitchLBVIP(sw_uuid, lb, vip, backends) :- SwitchLB(sw_uuid, lb@(&nb::Load_Balancer{.vips = vips})), var kv = FlatMap(vips), @@ -304,10 +304,10 @@ LogicalSwitchHasLBVIP(sw_uuid, false) :- * - LBVIP parses the IP address and port (and drops VIPs where those are invalid). */ relation LBVIP0( - lb: Ref, + lb: Intern, vip_key: string, backend_ips: string, - health_check: Ref) + health_check: Intern) LBVIP0(lb, vip_key, backend_ips, health_check) :- LoadBalancerRef[lb], var vip = FlatMap(lb.vips), @@ -316,10 +316,10 @@ LBVIP0(lb, vip_key, backend_ips, health_check) :- lb.health_check.contains(health_check._uuid). relation LBVIP1( - lb: Ref, + lb: Intern, vip_key: string, backend_ips: string, - health_check: Option>) + health_check: Option>) LBVIP1(lb, vip_key, backend_ips, Some{health_check}) :- LBVIP0(lb, vip_key, backend_ips, health_check). LBVIP1(lb, vip_key, backend_ips, None) :- @@ -328,15 +328,19 @@ LBVIP1(lb, vip_key, backend_ips, None) :- (var vip_key, var backend_ips) = vip, not LBVIP0(lb, vip_key, backend_ips, _). -relation &LBVIP( - lb: Ref, +typedef LBVIP = LBVIP { + lb: Intern, vip_key: string, backend_ips: string, - health_check: Option>, + health_check: Option>, vip_addr: v46_ip, vip_port: bit<16>, - backends: Vec) -&LBVIP(lb, vip_key, backend_ips, health_check, vip_addr, vip_port, backends) :- + backends: Vec +} + +relation LBVIP[Intern] + +LBVIP[LBVIP{lb, vip_key, backend_ips, health_check, vip_addr, vip_port, backends}.intern()] :- LBVIP1(lb, vip_key, backend_ips, health_check), Some{(var vip_addr, var vip_port)} = ip_address_and_port_from_lb_key(vip_key), var backends = backend_ips.split(",").filter_map( @@ -398,17 +402,20 @@ function default_protocol(protocol: Option): string = { } } -relation &LBVIPWithStatus( - lb: Ref, +typedef LBVIPWithStatus = LBVIPWithStatus { + lb: Intern, vip_key: string, backend_ips: string, - health_check: Option>, + health_check: Option>, vip_addr: v46_ip, vip_port: bit<16>, - backends: Map) -&LBVIPWithStatus(lb, vip_key, backend_ips, health_check, vip_addr, vip_port, map_empty()) :- + backends: Map +} +relation LBVIPWithStatus[Intern] + +LBVIPWithStatus[LBVIPWithStatus{lb, vip_key, backend_ips, health_check, vip_addr, vip_port, map_empty()}.intern()] :- &LBVIP(lb, vip_key, backend_ips, health_check, vip_addr, vip_port, vec_empty()). -&LBVIPWithStatus(lb, vip_key, backend_ips, health_check, vip_addr, vip_port, backends_with_status) :- +LBVIPWithStatus[LBVIPWithStatus{lb, vip_key, backend_ips, health_check, vip_addr, vip_port, backends_with_status}.intern()] :- &LBVIP(lb, vip_key, backend_ips, health_check, vip_addr, vip_port, backends), var backend = FlatMap(backends), LBVIPBackendStatus(lbvip, backend, up), @@ -420,7 +427,7 @@ relation &LBVIPWithStatus( * Only some backends have health checking enabled. The ones that don't * are always considered to be up. */ relation LBVIPBackendStatus0( - lbvip: Ref, + lbvip: Intern, backend: lb_vip_backend, up: bool) LBVIPBackendStatus0(lbvip, backend, is_online(sm.status)) :- @@ -433,7 +440,7 @@ LBVIPBackendStatus0(lbvip, backend, is_online(sm.status)) :- default_protocol(lb.protocol) == default_protocol(sm.protocol). relation LBVIPBackendStatus( - lbvip: Ref, + lbvip: Intern, backend: lb_vip_backend, up: bool) LBVIPBackendStatus(lbvip, backend, up) :- LBVIPBackendStatus0(lbvip, backend, up). @@ -445,7 +452,7 @@ LBVIPBackendStatus(lbvip, backend, true) :- /* SwitchPortDHCPv4Options: many-to-one relation between logical switches and DHCPv4 options */ relation SwitchPortDHCPv4Options( port: Intern, - dhcpv4_options: Ref) + dhcpv4_options: Intern) SwitchPortDHCPv4Options(port, options) :- port in &SwitchPort(.lsp = lsp), @@ -456,7 +463,7 @@ SwitchPortDHCPv4Options(port, options) :- /* SwitchPortDHCPv6Options: many-to-one relation between logical switches and DHCPv4 options */ relation SwitchPortDHCPv6Options( port: Intern, - dhcpv6_options: Ref) + dhcpv6_options: Intern) SwitchPortDHCPv6Options(port, options) :- port in &SwitchPort(.lsp = lsp), @@ -465,7 +472,7 @@ SwitchPortDHCPv6Options(port, options) :- options in &DHCP_OptionsRef[nb::DHCP_Options{._uuid = dhcpv6_uuid}]. /* SwitchQoS: many-to-one relation between logical switches and nb::QoS */ -relation SwitchQoS(sw: Intern, qos: Ref) +relation SwitchQoS(sw: Intern, qos: Intern) SwitchQoS(sw, qos) :- sw in &Switch(), @@ -478,7 +485,7 @@ SwitchQoS(sw, qos) :- * that isn't a fair meter. (The latter case has two subcases: the * case where the meter that the ACL names corresponds to an nb::Meter * with that name, and the case where it doesn't.) */ -relation ACLHasFairMeter(acl: Ref, has_fair_meter: bool) +relation ACLHasFairMeter(acl: Intern, has_fair_meter: bool) ACLHasFairMeter(acl, true) :- ACLWithFairMeter(acl, _). ACLHasFairMeter(acl, false) :- @@ -486,14 +493,14 @@ ACLHasFairMeter(acl, false) :- not ACLWithFairMeter(acl, _). /* All the ACLs associated with a fair meter, with their fair meters. */ -relation ACLWithFairMeter(acl: Ref, meter: Ref) +relation ACLWithFairMeter(acl: Intern, meter: Intern) ACLWithFairMeter(acl, meter) :- acl in &ACLRef[nb::ACL{.meter = Some{meter_name}}], meter in &MeterRef[nb::Meter{.name = meter_name, .fair = Some{true}}]. /* SwitchACL: many-to-many relation between logical switches and ACLs */ relation &SwitchACL(sw: Intern, - acl: Ref, + acl: Intern, has_fair_meter: bool) &SwitchACL(.sw = sw, .acl = acl, .has_fair_meter = has_fair_meter) :- @@ -568,7 +575,7 @@ typedef SwitchPort = SwitchPort { needs_dynamic_ipv6address: bool, needs_dynamic_tag: bool, up: bool, - mcast_cfg: Ref, + mcast_cfg: Intern, hac_group_uuid: Option } diff --git a/northd/multicast.dl b/northd/multicast.dl index 5a14a90da1cd..9e3c13a3fde0 100644 --- a/northd/multicast.dl +++ b/northd/multicast.dl @@ -31,7 +31,7 @@ function mCAST_QUERY_INTERVAL_S_RANGE(): (integer, integer) = (1, 3600) function mCAST_DEFAULT_QUERY_MAX_RESPONSE_S(): integer = 1 /* IP Multicast per switch configuration. */ -relation &McastSwitchCfg( +typedef McastSwitchCfg = McastSwitchCfg { datapath : uuid, enabled : bool, querier : bool, @@ -43,24 +43,27 @@ relation &McastSwitchCfg( idle_timeout : integer, query_interval: integer, query_max_resp: integer -) +} + +relation McastSwitchCfg[Intern] /* FIXME: Right now table_size is enforced only in ovn-controller but in * the ovn-northd C version we enforce it on the aggregate groups too. */ -&McastSwitchCfg( - .datapath = ls_uuid, - .enabled = other_config.get_bool_def("mcast_snoop", false), - .querier = other_config.get_bool_def("mcast_querier", true), - .flood_unreg = other_config.get_bool_def("mcast_flood_unregistered", false), - .eth_src = other_config.get("mcast_eth_src").unwrap_or(""), - .ip4_src = other_config.get("mcast_ip4_src").unwrap_or(""), - .ip6_src = other_config.get("mcast_ip6_src").unwrap_or(""), - .table_size = other_config.get_int_def("mcast_table_size", mCAST_DEFAULT_MAX_ENTRIES()), - .idle_timeout = idle_timeout, - .query_interval = query_interval, - .query_max_resp = query_max_resp) :- +McastSwitchCfg[McastSwitchCfg { + .datapath = ls_uuid, + .enabled = other_config.get_bool_def("mcast_snoop", false), + .querier = other_config.get_bool_def("mcast_querier", true), + .flood_unreg = other_config.get_bool_def("mcast_flood_unregistered", false), + .eth_src = other_config.get("mcast_eth_src").unwrap_or(""), + .ip4_src = other_config.get("mcast_ip4_src").unwrap_or(""), + .ip6_src = other_config.get("mcast_ip6_src").unwrap_or(""), + .table_size = other_config.get_int_def("mcast_table_size", mCAST_DEFAULT_MAX_ENTRIES()), + .idle_timeout = idle_timeout, + .query_interval = query_interval, + .query_max_resp = query_max_resp + }.intern()] :- nb::Logical_Switch(._uuid = ls_uuid, .other_config = other_config), var idle_timeout = other_config.get_int_def("mcast_idle_timeout", mCAST_DEFAULT_IDLE_TIMEOUT_S()) @@ -71,29 +74,33 @@ relation &McastSwitchCfg( mCAST_DEFAULT_QUERY_MAX_RESPONSE_S()). /* IP Multicast per router configuration. */ -relation &McastRouterCfg( +typedef McastRouterCfg = McastRouterCfg { datapath: uuid, relay : bool -) +} -&McastRouterCfg(lr_uuid, mcast_relay) :- +relation McastRouterCfg[Intern] + +McastRouterCfg[McastRouterCfg{lr_uuid, mcast_relay}.intern()] :- nb::Logical_Router(._uuid = lr_uuid, .options = options), var mcast_relay = options.get_bool_def("mcast_relay", false). /* IP Multicast port configuration. */ -relation &McastPortCfg( +typedef McastPortCfg = McastPortCfg { port : uuid, router_port : bool, flood : bool, flood_reports : bool -) +} + +relation McastPortCfg[Intern] -&McastPortCfg(lsp_uuid, false, flood, flood_reports) :- +McastPortCfg[McastPortCfg{lsp_uuid, false, flood, flood_reports}.intern()] :- nb::Logical_Switch_Port(._uuid = lsp_uuid, .options = options), var flood = options.get_bool_def("mcast_flood", false), var flood_reports = options.get_bool_def("mcast_flood_reports", false). -&McastPortCfg(lrp_uuid, true, flood, flood) :- +McastPortCfg[McastPortCfg{lrp_uuid, true, flood, flood}.intern()] :- nb::Logical_Router_Port(._uuid = lrp_uuid, .options = options), var flood = options.get_bool_def("mcast_flood", false). diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl index 25d34b3611bc..f33d832a4d13 100644 --- a/northd/ovn_northd.dl +++ b/northd/ovn_northd.dl @@ -303,7 +303,7 @@ function get_router_load_balancer_ips(router: Intern) : var all_ips_v4 = set_empty(); var all_ips_v6 = set_empty(); for (lb in router.lbs) { - for (kv in deref(lb).vips) { + for (kv in lb.vips) { (var vip, _) = kv; /* node->key contains IP:port or just IP. */ match (ip_address_and_port_from_lb_key(vip)) { @@ -2007,7 +2007,7 @@ HasEventElbMeter(false) :- not nb::Meter(.name = "event-elb"). /* Empty LoadBalancer Controller event */ -function build_empty_lb_event_flow(key: string, lb: Ref, +function build_empty_lb_event_flow(key: string, lb: Intern, meter: bool): Option<(string, string)> { (var ip, var port) = match (ip_address_and_port_from_lb_key(key)) { Some{(ip, port)} -> (ip, port), @@ -2052,7 +2052,7 @@ function build_empty_lb_event_flow(key: string, lb: Ref, * The deprecated way is to set nb::NB_Global options:controller_event=true, * which enables events for every load balancer. */ -relation LoadBalancerEmptyEvents(lb: Ref) +relation LoadBalancerEmptyEvents(lb: Intern) LoadBalancerEmptyEvents(lb) :- nb::NB_Global(.options = global_options), var global_events = global_options.get_bool_def("controller_event", false), @@ -2885,7 +2885,7 @@ function ct_lb(backends: string, "ct_lb(" ++ args.join("; ") ++ ");" } -function build_lb_vip_actions(lbvip: Ref, +function build_lb_vip_actions(lbvip: Intern, stage: Stage, actions0: string): string { var up_backends = set_empty();