Fix delete of Logical_Switch for the "referential integrity violation" failure.
Currently the Logical_Switch delete is failing with "referential integrity violation" error as listed below
2020-04-13T05:27:36,854 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | HWVTEP transaction operation failed referential integrity violation cannot delete Logical_Switch row
7392ce5a-1bf6-4951-a22e-
740ac78aaa60 because of 9 remaining reference(s)
2020-04-13T05:27:36,855 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | Failed transaction delete from Logical_Switchdelete from Ucast_Macs_Remotedelete from Ucast_Macs_Localdelete from Mcast_Macs_Remotedelete from Mcast_Macs_Local
2020-04-13T05:27:36,856 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | Failed on second attempt too aborting the transaction org.opendaylight.ovsdb.hwvtepsouthbound.transact.LogicalSwitchRemoveCommand$1@
575aaf7c
2020-04-13T05:27:36,857 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | HWVTEP transaction operation failed referential integrity violation cannot delete Logical_Switch row
064cc69b-cce8-4f08-9478-
9b82c6059cac because of 9 remaining reference(s)
2020-04-13T05:27:36,858 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | Failed transaction delete from Logical_Switchdelete from Ucast_Macs_Remotedelete from Ucast_Macs_Localdelete from Mcast_Macs_Remotedelete from Mcast_Macs_Local
2020-04-13T05:27:36,858 | ERROR | hwvtep-waiting-job-0 | TransactInvokerImpl | 403 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.11.0.SNAPSHOT | Failed on second attempt too aborting the transaction org.opendaylight.ovsdb.hwvtepsouthbound.transact.LogicalSwitchRemoveCommand$1@
569e133b
The Logical_Switch reference will be present in other tables like Ucast_Macs_Remote, Pysical_Port and Ucast_Macs_Remote etc.
These should be deleted first when the Logical_Switch is going to be deleted.
Signed-off-by: Chandra Shekar S <chandra.shekar.s@ericsson.com>
Change-Id: Ic2b101368bd50f6494e357fa49ccf53e641a09a3