- if item not in ("tenants", "networks"):
- raise OpenmanoBadParamsException("Unknown value for item '{}', must be 'tenants' or 'nets'".format(str(item)))
-
+ if item not in ("tenants", "networks", "images"):
+ raise OpenmanoBadParamsException("Unknown value for item '{}', must be 'tenants', 'nets' or "
+ "images".format(str(item)))
+
+ image_actions = ['list','get','show','delete']
+ if item == "images" and action not in image_actions:
+ raise OpenmanoBadParamsException("Only available actions for item '{}' are {}\n"
+ "Requested action was '{}'".format(item, ', '.join(image_actions), action))