From f43a97038c712de33129786df56bbc569dfa1fdb Mon Sep 17 00:00:00 2001 From: George Paraskevopoulos Date: Thu, 1 Sep 2016 16:27:44 +0300 Subject: Add router association utility function Add function to create an association between a router and a bgpvpn Change-Id: I23449a0363f9d8f3c77ea3be1e104586d3c111d1 Signed-off-by: George Paraskevopoulos (cherry picked from commit 1d01ece307a130bdd0c85ea811b3b72cc6d53156) --- utils/openstack_utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils') diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py index 21e00d9b9..ff9b54a58 100755 --- a/utils/openstack_utils.py +++ b/utils/openstack_utils.py @@ -705,6 +705,11 @@ def create_network_association(neutron_client, bgpvpn_id, neutron_network_id): return neutron_client.create_network_association(bgpvpn_id, json_body) +def create_router_association(neutron_client, bgpvpn_id, router_id): + json_body = {"router_association": {"router_id": router_id}} + return neutron_client.create_router_association(bgpvpn_id, json_body) + + def update_bgpvpn(neutron_client, bgpvpn_id, **kwargs): json_body = {"bgpvpn": kwargs} return neutron_client.update_bgpvpn(bgpvpn_id, json_body) -- cgit 1.2.3-korg