Skip to content

Commit

Permalink
fixed the issue related to user_profile being empty in zvmsdk.conf file
Browse files Browse the repository at this point in the history
Signed-off-by: ssanthosh <[email protected]>
  • Loading branch information
ssanthosh committed Oct 18, 2023
1 parent 1ec44c8 commit 5f7c172
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zvmsdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5f7c172

Please sign in to comment.