From 5f7c172ded958fedacf8b263391d2c347b3bad85 Mon Sep 17 00:00:00 2001 From: ssanthosh Date: Wed, 18 Oct 2023 11:07:25 -0700 Subject: [PATCH] fixed the issue related to user_profile being empty in zvmsdk.conf file Signed-off-by: ssanthosh --- zvmsdk/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zvmsdk/api.py b/zvmsdk/api.py index 65f7f7e08..91a7a3156 100755 --- a/zvmsdk/api.py +++ b/zvmsdk/api.py @@ -977,6 +977,11 @@ def guest_create(self, userid, vcpus, memory, disk_list=None, if not user_profile or len(user_profile) == 0: user_profile = CONF.zvm.user_profile + if not user_profile: + errmsg = ('Invalid "user_profile" input, user_profile ' + 'cannot be empty.') + LOG.error(errmsg) + raise exception.SDKInvalidInputFormat(msg=errmsg) action = "create guest '%s'" % userid with zvmutils.log_and_reraise_sdkbase_error(action):