qm/ct status shows only qms/cts, no nodes.

This commit is contained in:
Denis Knauf 2023-01-16 21:37:38 +01:00
parent 20db6bd9b2
commit 83211a817f
2 changed files with 2 additions and 4 deletions

View file

@ -11,8 +11,7 @@ def cli_ct
ct_cli.cmd( :status, "Lists CTs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil| ct_cli.cmd( :status, "Lists CTs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil|
hosting_table target: target, status: status, sort: sort, tags: tags do |push| hosting_table target: target, status: status, sort: sort, tags: tags do |push|
node_opt( node). node_opt( node).lazy.
each( &push).lazy.
map {|n| Thread.new n, &:lxc }. map {|n| Thread.new n, &:lxc }.
each {|n| n.value.each &push } each {|n| n.value.each &push }
end end

View file

@ -53,8 +53,7 @@ def cli_qm
qm_cli.cmd( :status, "Lists VMs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil| qm_cli.cmd( :status, "Lists VMs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil|
hosting_table target: target, status: status, sort: sort, tags: tags do |push| hosting_table target: target, status: status, sort: sort, tags: tags do |push|
node_opt( node). node_opt( node).lazy.
each( &push).lazy.
flat_map {|n| [ Thread.new( n, &:qemu) ] }. flat_map {|n| [ Thread.new( n, &:qemu) ] }.
each {|n| n.value.each &push } each {|n| n.value.each &push }
end end