Skip to content

Commit

Permalink
fix rhevm.mark_as_template, need Vm not VmService (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshriver authored and izapolsk committed May 24, 2018
1 parent 7f9e72b commit 7fee2f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wrapanapi/rhevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ def mark_as_template(self, vm_name, delete=True, temporary_name=None,

if create_new_template:
self.stop_vm(vm_name)
vm = self._get_vm_service(vm_name)
actual_cluster = self._get_cluster(cluster) if cluster else vm.get_cluster()
vm = self._get_vm(vm_name)
actual_cluster = self._get_cluster(cluster) if cluster else vm.cluster
new_template = types.Template(
name=temp_template_name, vm=vm, cluster=actual_cluster)
self.api.system_service().templates_service().add(new_template)
Expand Down

0 comments on commit 7fee2f2

Please sign in to comment.