From 019f0a2acb8696c6a05646be3f0634c1d638ddee Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 24 Jan 2023 08:42:44 +0100 Subject: [PATCH] All ``AddCommand`` child classes return the new register UUID This patch fixes the return of two classes, ``HealthCheckAddCommand`` and ``GatewayChassisAddCommand``, that instead the new register UUID were returning the register ifself. NOTE: * ``HealthCheckAddCommand`` is only used in ``LbAddHealthCheckCommand`` (it has no IDL API method). It is tested in [1]. * ``GatewayChassisAddCommand`` is used in ``LrpAddCommand`` and ``LrpSetGatewayChassisCommand`` (it has no IDL API method). It is tested in [2] and [3]. [1]https://github.com/openstack/ovsdbapp/blob/96cf8d6288587423e65d5149016e07fb51430724/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py#L1731-L1762 [2]https://github.com/openstack/ovsdbapp/blob/96cf8d6288587423e65d5149016e07fb51430724/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py#L1531-L1552 [3]https://github.com/openstack/ovsdbapp/blob/96cf8d6288587423e65d5149016e07fb51430724/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py#L1505-L1516 Closes-Bug: #2004170 Change-Id: I48df608aedce3012a2ae7aa4de636fa837bd47aa --- ovsdbapp/schema/ovn_northbound/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovsdbapp/schema/ovn_northbound/commands.py b/ovsdbapp/schema/ovn_northbound/commands.py index af534797..6795996c 100644 --- a/ovsdbapp/schema/ovn_northbound/commands.py +++ b/ovsdbapp/schema/ovn_northbound/commands.py @@ -1459,7 +1459,7 @@ class HealthCheckAddCommand(cmd.AddCommand): hc = txn.insert(self.api.tables[self.table_name]) hc.vip = self.vip hc.options = self.options - self.result = hc + self.result = hc.uuid class HealthCheckSetOptionsCommand(cmd.BaseSetOptionsCommand): @@ -1749,7 +1749,7 @@ class GatewayChassisAddCommand(cmd.AddCommand): gwc.chassis_name = self.chassis_name gwc.priority = self.priority self.set_columns(gwc, **self.columns) - self.result = gwc + self.result = gwc.uuid class HAChassisGroupAddCommand(cmd.AddCommand):