Bugfix: Task-handling.

This commit is contained in:
Denis Knauf 2021-06-16 14:02:48 +02:00
parent cf9093bafb
commit 1ec6b5c6d1

View file

@ -334,7 +334,7 @@ module Proxmox
def resize disk, size def resize disk, size
upid = rest_put "#{@rest_prefix}/resize", disk: disk, size: size upid = rest_put "#{@rest_prefix}/resize", disk: disk, size: size
Task.send :__new__, node: node, host: @temp, upid: upid Task.send :__new__, node: @node, host: self, upid: upid
end end
end end
@ -495,9 +495,10 @@ module Proxmox
swap: tmplt.swap, swap: tmplt.swap,
unprivileged: tmplt.unprivileged, unprivileged: tmplt.unprivileged,
}.delete_if {|k,v| v.nil? } }.delete_if {|k,v| v.nil? }
@temp = LXC.send :__new__, node: node, vmid: options[:vmid], name: name, hostname: options[:hostname]
temp = LXC.send :__new__, node: node, vmid: options[:vmid], name: name, hostname: options[:hostname]
upid = rest_post( "/nodes/%s/lxc" % node.node, **options) upid = rest_post( "/nodes/%s/lxc" % node.node, **options)
Task.send :__new__, node: node, host: @temp, upid: upid Task.send :__new__, node: node, host: temp, upid: upid
end end
end end