summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorYury Kylulin <yury.kylulin@intel.com>2020-12-10 19:27:07 +0300
committerYury Kylulin <yury.kylulin@intel.com>2020-12-10 19:28:53 +0300
commit63eeeaf4c2b27db28a0c4fb0c5806978b0a5796d (patch)
tree8067369a8f5941992bca177cd2ee56719f615607 /VNFs/DPPD-PROX
parent919872a6ee1ddfd9105879175a1649c1444be8c3 (diff)
Fix for new config file structure
Fix subnet configuration for the dataplane interface. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: I612113a86a960284303915d5d003bf67a1b48a72
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid.pods3
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py12
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py7
3 files changed, 21 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.pods b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.pods
index 918125a..f690872 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.pods
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.pods
@@ -20,11 +20,14 @@ total_number_of_pods=3
[POD1]
nodeSelector_hostname=k8s-node1
dp_ip=192.168.30.11
+dp_subnet=24
[POD2]
nodeSelector_hostname=k8s-node2
dp_ip=192.168.30.12
+dp_subnet=24
[POD3]
nodeSelector_hostname=k8s-node2
dp_ip=192.168.30.13
+dp_subnet=24
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py
index 822ead5..2d88cd9 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py
@@ -115,9 +115,18 @@ class K8sDeployment:
else:
pod_dp_ip = None
+ # Search for POD dataplane subnet
+ if self._create_config.has_option("POD%d" % i,
+ "dp_subnet"):
+ pod_dp_subnet = self._create_config.get(
+ "POD%d" % i, "dp_subnet")
+ else:
+ pod_dp_subnet = "24"
+
pod = Pod(pod_name)
pod.set_nodeselector(pod_nodeselector_hostname)
pod.set_dp_ip(pod_dp_ip)
+ pod.set_dp_subnet(pod_dp_subnet)
pod.set_id(i)
# Add POD to the list of PODs which need to be created
@@ -181,7 +190,8 @@ class K8sDeployment:
self._runtime_config.set("M%d" % pod.get_id(),
"dp_pci_dev", pod.get_dp_pci_dev())
self._runtime_config.set("M%d" % pod.get_id(),
- "dp_ip1", pod.get_dp_ip())
+ "dp_ip1", pod.get_dp_ip() + "/" +
+ pod.get_dp_subnet())
# Section [Varia]
self._runtime_config.add_section("Varia")
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py
index b5fc815..d15fe7f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py
@@ -36,6 +36,7 @@ class Pod:
_id = None
_admin_ip = None
_dp_ip = None
+ _dp_subnet = None
_ssh_client = None
@@ -128,6 +129,9 @@ class Pod:
def get_dp_ip(self):
return self._dp_ip
+ def get_dp_subnet(self):
+ return self._dp_subnet
+
def get_dp_mac(self):
return self._sriov_vf_mac
@@ -189,6 +193,9 @@ class Pod:
def set_dp_ip(self, dp_ip):
self._dp_ip = dp_ip
+ def set_dp_subnet(self, dp_subnet):
+ self._dp_subnet = dp_subnet
+
def set_id(self, pod_id):
self._id = pod_id