summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py4
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py (renamed from VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py)14
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py (renamed from VNFs/DPPD-PROX/helper-scripts/rapid/pod.py)4
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_sshclient.py (renamed from VNFs/DPPD-PROX/helper-scripts/rapid/sshclient.py)2
4 files changed, 11 insertions, 13 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py
index 4285584d..c4667f1f 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/env python3
##
## Copyright (c) 2019 Intel Corporation
@@ -17,7 +17,7 @@
##
import argparse
-from k8sdeployment import K8sDeployment
+from rapid_k8s_deployment import K8sDeployment
# Config file name for deployment creation
CREATE_CONFIG_FILE_NAME = "rapid.pods"
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py
index 5e921d46..822ead51 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python2.7
-
##
## Copyright (c) 2019-2020 Intel Corporation
##
@@ -18,11 +16,15 @@
import sys
from kubernetes import client, config
-import ConfigParser
+try:
+ import configparser
+except ImportError:
+ # Python 2.x fallback
+ import ConfigParser as configparser
import logging
from logging import handlers
-from pod import Pod
+from rapid_k8s_pod import Pod
class K8sDeployment:
"""Deployment class to create containers for test execution in Kubernetes
@@ -69,7 +71,7 @@ class K8sDeployment:
"""Read and parse configuration file for the test environment.
"""
self._log.info("Loading configuration file %s", config_file_name)
- self._create_config = ConfigParser.RawConfigParser()
+ self._create_config = configparser.RawConfigParser()
try:
self._create_config.read(config_file_name)
except Exception as e:
@@ -146,7 +148,7 @@ class K8sDeployment:
def save_runtime_config(self, config_file_name):
self._log.info("Saving config %s for runrapid script...",
config_file_name)
- self._runtime_config = ConfigParser.RawConfigParser()
+ self._runtime_config = configparser.RawConfigParser()
# Section [DEFAULT]
# self._runtime_config.set("DEFAULT",
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/pod.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py
index f663c9df..b5fc8158 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/pod.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python2.7
-
##
## Copyright (c) 2019 Intel Corporation
##
@@ -21,7 +19,7 @@ import time, yaml
import logging
from kubernetes import client, config
-from sshclient import SSHClient
+from rapid_sshclient import SSHClient
class Pod:
"""Class which represents test pods.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/sshclient.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_sshclient.py
index c781271e..e9fe134c 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/sshclient.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_sshclient.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python2.7
-
##
## Copyright (c) 2019 Intel Corporation
##