Disable InsecureRequestWarning from requests library
Globally disable InsecureRequestWarning coming
from requests library for both pre 2.16.0 and
for >= 2.16.0 versions.
Change-Id: Ibf4e749086265e8726e90a2f8b4c1c9df3b2c55d
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Issue-ID: TEST-227
diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py
index c768aa8..bf6fcaf 100755
--- a/test/vcpe/vcpe.py
+++ b/test/vcpe/vcpe.py
@@ -13,7 +13,13 @@
import csar_parser
import config_sdnc_so
import json
+import urllib3
+# disable InsecureRequestWarning warning in requests < 2.16.0
+urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
+# disable InsecureRequestWarning warning in requests >= 2.16.0
+from requests.packages.urllib3.exceptions import InsecureRequestWarning
+requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
def config_sniro(vcpecommon, vgmux_svc_instance_uuid, vbrg_svc_instance_uuid):
logger = logging.getLogger(__name__)