aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-06-05 11:37:06 -0400
committerParker Berberian <pberberian@iol.unh.edu>2019-06-05 11:37:06 -0400
commitd33f2e3439825bb90e3b902018a3030f9f12f307 (patch)
tree899d2662177bae0680abdddd7a11e206a4e0cdcf /src/dashboard
parent6b8115d7ac8412c9d0ba6899062969b636ed9149 (diff)
Adds Tests
Adds more complete tests and fixes some bugs found in those tests Change-Id: Icc0433215df511bc0b2bfa264bacf8796d6de86f Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/dashboard')
-rw-r--r--src/dashboard/testing_utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dashboard/testing_utils.py b/src/dashboard/testing_utils.py
index 1cca3e6..a96b6d0 100644
--- a/src/dashboard/testing_utils.py
+++ b/src/dashboard/testing_utils.py
@@ -80,7 +80,7 @@ def make_booking(owner=None, start=timezone.now(),
topology={}, installer=None, scenario=None):
grb, host_set = make_grb(topology, owner, lab)
- config_bundle = make_config_bundle(grb, owner, topology, host_set, installer, scenario)
+ config_bundle, opnfv_bundle = make_config_bundle(grb, owner, topology, host_set, installer, scenario)
resource = ResourceManager.getInstance().convertResourceBundle(grb, config=config_bundle)
if not resource:
raise Exception("Resource not created")
@@ -93,7 +93,8 @@ def make_booking(owner=None, start=timezone.now(),
owner=owner,
purpose=purpose,
project=project,
- lab=lab
+ lab=lab,
+ opnfv_config=opnfv_bundle
)
@@ -124,7 +125,7 @@ def make_config_bundle(grb, owner, topology={}, host_set={},
host_config=host_config,
opnfv_config=opnfv_config
)
- return cb
+ return cb, opnfv_config
def make_network(name, lab, grb, public):
@@ -230,7 +231,7 @@ def make_vlan_manager(vlans=None, block_size=20, allow_overlapping=False, reserv
)
-def make_lab(user=None, name="Test Lab Instance",
+def make_lab(user=None, name="Test_Lab_Instance",
status=LabStatus.UP, vlan_manager=None,
pub_net_count=5):
if not vlan_manager: