Skip to content

Commit

Permalink
fix parsing of profile images within plan
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Apr 17, 2020
1 parent 72e0446 commit 77ee0b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kvirt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,10 @@ def plan(self, plan, ansible=False, url=None, path=None, autostart=False, contai
os.remove("%s.key" % plan)
if 'image' in profile:
for entry in self.list_profiles():
if entry[0] == profile['image']:
currentimage = profile['image']
profilename = entry[0]
clientprofile = "%s_%s" % (self.client, currentimage)
if profilename == currentimage or profilename == clientprofile:
profile['image'] = entry[4]
break
result = self.create_vm(name, profilename, overrides=overrides, customprofile=profile, k=z,
Expand Down

0 comments on commit 77ee0b8

Please sign in to comment.