Skip to content

Commit

Permalink
Read the VMi object before adding pbf rules
Browse files Browse the repository at this point in the history
It is possible that vmi->RI links have changed. If we don't refresh, we may not
add the pbf rule if it is already present in the stale copy.

Change-Id: Ia72436aff6abdf654f05a5ec7e50ba06bb887dc3
Closes-Bug: 1509063
  • Loading branch information
Sachin Bansal committed Oct 22, 2015
1 parent f9fa0b1 commit 2ece200
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config/schema-transformer/to_bgp.py
Expand Up @@ -1877,6 +1877,7 @@ def _create(self, si_info):
def add_pbf_rule(self, vmi, ri1, ri2, ip_address, vlan):
if vmi.service_interface_type not in ["left", "right"]:
return
vmi.obj = _vnc_lib.virtual_machine_interface_read(id=vmi.uuid)
refs = vmi.obj.get_routing_instance_refs() or []
ri_refs = [ref['to'] for ref in refs]

Expand Down

0 comments on commit 2ece200

Please sign in to comment.