Verify validate_tier0 gets tier0 to produce the right error

Change-Id: I129dd9ff0eea64a39431aebc1e1bc84278e4b53e
This commit is contained in:
Adit Sarfaty 2019-02-14 13:41:57 +02:00
parent b48b84b19b
commit 4b91eba9f5

View File

@ -46,6 +46,10 @@ class RouterLib(object):
def validate_tier0(self, tier0_groups_dict, tier0_uuid):
err_msg = None
if not tier0_uuid:
err_msg = _("validate_tier0 should be called with tier0 uuid")
raise exceptions.NsxLibInvalidInput(error_message=err_msg)
try:
lrouter = self._router_client.get(tier0_uuid)
except exceptions.ResourceNotFound: