diff options
author | George Paraskevopoulos <geopar@intracom-telecom.com> | 2016-09-01 16:27:44 +0300 |
---|---|---|
committer | George Paraskevopoulos <geopar@intracom-telecom.com> | 2016-09-01 16:27:44 +0300 |
commit | 1d01ece307a130bdd0c85ea811b3b72cc6d53156 (patch) | |
tree | c7c7f9f8e521bb113cca565f1bc4fff27ae7047f /utils | |
parent | 26f493bf3bb06a0ceb959294397ff653b92da202 (diff) |
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 <geopar@intracom-telecom.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/openstack_utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py index 21e00d9b..ff9b54a5 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) |