From: Romanos Skiadas Date: Wed, 14 Sep 2016 07:36:50 +0000 (+0300) Subject: Add utils for getting bgpvpn information X-Git-Tag: danube.1.RC1~411 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F21093%2F1;p=functest.git Add utils for getting bgpvpn information Change-Id: I86f9e2afa6578dc60ea82fd163427a4f6e2f8526 Signed-off-by: Romanos Skiadas Co-Authored-By: George Paraskevopoulos --- diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py index 8c2e00cb1..5a4775d3a 100755 --- a/utils/openstack_utils.py +++ b/utils/openstack_utils.py @@ -727,6 +727,18 @@ def update_bgpvpn(neutron_client, bgpvpn_id, **kwargs): def delete_bgpvpn(neutron_client, bgpvpn_id): return neutron_client.delete_bgpvpn(bgpvpn_id) + +def get_bgpvpn(neutron_client, bgpvpn_id): + return neutron_client.show_bgpvpn(bgpvpn_id) + + +def get_bgpvpn_routers(neutron_client, bgpvpn_id): + return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['routers'] + + +def get_bgpvpn_networks(neutron_client, bgpvpn_id): + return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['networks'] + # ********************************************* # SEC GROUPS # *********************************************