aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils')
-rw-r--r--[-rwxr-xr-x]functest/utils/openstack_clean.py7
-rw-r--r--[-rwxr-xr-x]functest/utils/openstack_snapshot.py7
-rw-r--r--functest/utils/openstack_utils.py37
3 files changed, 2 insertions, 49 deletions
diff --git a/functest/utils/openstack_clean.py b/functest/utils/openstack_clean.py
index e88245d6..d7df8f84 100755..100644
--- a/functest/utils/openstack_clean.py
+++ b/functest/utils/openstack_clean.py
@@ -23,7 +23,6 @@
#
import logging
-import sys
import time
import yaml
@@ -382,6 +381,7 @@ def remove_tenants(keystone_client, default_tenants):
def main():
+ logging.basicConfig()
logger.info("Cleaning OpenStack resources...")
nova_client = os_utils.get_nova_client()
@@ -430,8 +430,3 @@ def main():
remove_tenants(keystone_client, default_tenants)
separator()
return 0
-
-
-if __name__ == '__main__':
- logging.basicConfig()
- sys.exit(main())
diff --git a/functest/utils/openstack_snapshot.py b/functest/utils/openstack_snapshot.py
index f4ef751c..3dc6f80c 100755..100644
--- a/functest/utils/openstack_snapshot.py
+++ b/functest/utils/openstack_snapshot.py
@@ -22,7 +22,6 @@
import logging
import yaml
-import sys
import functest.utils.openstack_utils as os_utils
from functest.utils.constants import CONST
@@ -131,6 +130,7 @@ def get_tenants(keystone_client):
def main():
+ logging.basicConfig()
logger.info("Generating OpenStack snapshot...")
nova_client = os_utils.get_nova_client()
@@ -163,8 +163,3 @@ def main():
logger.debug("NOTE: These objects will NOT be deleted after " +
"running the test.")
return 0
-
-
-if __name__ == '__main__':
- logging.basicConfig()
- sys.exit(main())
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index e7cdfc86..0ab63058 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -962,43 +962,6 @@ def create_shared_network_full(net_name, subnt_name, router_name, subnet_cidr):
return network_dic
-def create_bgpvpn(neutron_client, **kwargs):
- # route_distinguishers
- # route_targets
- json_body = {"bgpvpn": kwargs}
- return neutron_client.create_bgpvpn(json_body)
-
-
-def create_network_association(neutron_client, bgpvpn_id, neutron_network_id):
- json_body = {"network_association": {"network_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)
-
-
-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
# *********************************************