summaryrefslogtreecommitdiffstats
path: root/dashboard/src/resource_inventory
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-04-17 12:44:04 -0400
committerParker Berberian <pberberian@iol.unh.edu>2019-05-08 10:12:58 -0400
commitb906ab1a020858d99577bd4b6476c6aec965330b (patch)
tree246fc4bcb3f0aeb35a50f048f9e7a181f93088b3 /dashboard/src/resource_inventory
parent8d8f6a41e73e77178274a0fa26a084bf73bfc864 (diff)
Adds pdf and idf into api
The Pod Descriptor File (pdf) and Installer descriptor file (idf) are now hosted in the api. The url endpoint where the lab can retrieve them are now part of a software task. An OPNFV task also contains a new dictionary that describes how bridges should be configured on the jumphost. This information is not contained in the pdf/idf but is needed by the lab. Change-Id: I6971279979ba180725926035bd9db481aafb1073 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/resource_inventory')
-rw-r--r--dashboard/src/resource_inventory/idf_templater.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/dashboard/src/resource_inventory/idf_templater.py b/dashboard/src/resource_inventory/idf_templater.py
index 26307e3..bf6eda0 100644
--- a/dashboard/src/resource_inventory/idf_templater.py
+++ b/dashboard/src/resource_inventory/idf_templater.py
@@ -19,8 +19,15 @@ class IDFTemplater:
"""
Utility class to create a full IDF yaml file
"""
+ net_names = ["admin", "mgmt", "private", "public"]
+ bridge_names = {
+ "admin": "br-admin",
+ "mgmt": "br-mgmt",
+ "private": "br-private",
+ "public": "br-public"
+ }
+
def __init__(self):
- self.net_names = ["admin", "mgmt", "private", "public"]
self.networks = {}
for i, name in enumerate(self.net_names):
self.networks[name] = {
@@ -117,11 +124,7 @@ class IDFTemplater:
return fuel
def get_fuel_bridges(self):
- bridges = {}
- for net in self.net_names:
- bridges[net] = "br-" + net
-
- return bridges
+ return self.bridge_names
def get_fuel_nodes(self, booking):
jumphost = booking.opnfv_config.host_opnfv_config.get(