Skip to content

Commit ac83b14

Browse files
authored
Merge pull request #379 from tsoenen/master
Error case for empty vim list.
2 parents c98816c + e399687 commit ac83b14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/son-mano-placement/son_mano_placement/placement.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,9 @@ def placement(self, dus, vls, vims, wims, eps, const, wghts=[], sng=False):
606606
if not isinstance(const['cu_constraint'], dict):
607607
return "Customer policies are not a dictionary", "ERROR"
608608

609+
if len(vims) < 1:
610+
return "No attached VIMs", "ERROR"
611+
609612
LOG.info("Placement calculation started")
610613

611614
# There are three types of decision vars: eps, dus and vls. They need

0 commit comments

Comments
 (0)