The external networks use ``HA_Chassis_Group`` to bind the port to a
chassis. The gateway ``Logical_Router_Port`` registers use
``Gateway_Chassis``. In order to route the external ports traffic
through a router gateway port, it is needed that both the external port
and the gateway port are collocated in the same chassis.
This patch detects when a network (private interface in a router) is
connected to a router and if this network has external ports. In this
case, the Neutron API changes the external ports ``HA_Chassis_Group`` to
match the set of ``Gateway_Chassis`` used in the gateway port.
The mechanism used to detect any port addition or deletion to a router
is the OVN event ``LogicalRouterPortEvent``, loaded by the OVN L3
plugin.
NOTE: along with this patch it is needed a mechanism to permanently sync
any change in the ``Logical_Router`` ``Gateway_Chassis`` set and the
associated ``HA_Chassis_Group`` of the networks connected to this
router. This will be done in a follow up patch in order to submit
smaller and better reviewable patches.
Related-Bug: #2125553
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I125d87ffbb33541ff3a4bb2a90915d20d0a171ad