ebb439
From 83a851eddce5ed189b6a145524c41ad817eb2ddf Mon Sep 17 00:00:00 2001
ebb439
From: Numan Siddique <numans@ovn.org>
ebb439
Date: Thu, 12 Nov 2020 17:27:59 +0530
ebb439
Subject: [PATCH 09/10] ovn-detrace: Add SB Load Balancer cookier handler.
ebb439
ebb439
Acked-by: Dumitru Ceara <dceara@redhat.com>
ebb439
Acked-by: Mark Michelson <mmichels@redhat.com>
ebb439
Signed-off-by: Numan Siddique <numans@ovn.org>
ebb439
ebb439
(cherry-picked from master commit 287605267f64daed845828d5f11b473f0cc98f33)
ebb439
---
ebb439
 utilities/ovn-detrace.in | 11 ++++++++++-
ebb439
 1 file changed, 10 insertions(+), 1 deletion(-)
ebb439
ebb439
diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
ebb439
index 1dd98df0a..af42b5fc4 100755
ebb439
--- a/utilities/ovn-detrace.in
ebb439
+++ b/utilities/ovn-detrace.in
ebb439
@@ -328,6 +328,14 @@ class ChassisHandler(CookieHandlerByUUUID):
ebb439
     def print_record(self, chassis):
ebb439
         print_p('Chassis: %s' % (chassis_str([chassis])))
ebb439
 
ebb439
+class SBLoadBalancerHandler(CookieHandlerByUUUID):
ebb439
+    def __init__(self, ovnsb_db):
ebb439
+        super(SBLoadBalancerHandler, self).__init__(ovnsb_db, 'Load_Balancer')
ebb439
+
ebb439
+    def print_record(self, lb):
ebb439
+        print_p('Load Balancer: %s protocol %s vips %s' % (
ebb439
+                    lb.name, lb.protocol, lb.vips))
ebb439
+
ebb439
 class OvsInterfaceHandler(CookieHandler):
ebb439
     def __init__(self, ovs_db):
ebb439
         super(OvsInterfaceHandler, self).__init__(ovs_db, 'Interface')
ebb439
@@ -452,7 +460,8 @@ def main():
ebb439
         PortBindingHandler(ovsdb_ovnsb),
ebb439
         MacBindingHandler(ovsdb_ovnsb),
ebb439
         MulticastGroupHandler(ovsdb_ovnsb),
ebb439
-        ChassisHandler(ovsdb_ovnsb)
ebb439
+        ChassisHandler(ovsdb_ovnsb),
ebb439
+        SBLoadBalancerHandler(ovsdb_ovnsb)
ebb439
     ]
ebb439
 
ebb439
     regex_cookie = re.compile(r'^.*cookie 0x([0-9a-fA-F]+)')
ebb439
-- 
ebb439
2.28.0
ebb439