[pve-devel] [PATCH manager 2/2] add star/stop/migrateall commands to pvenode

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 20 07:56:08 CEST 2018


On 6/19/18 2:27 PM, Dominik Csapak wrote:
> under pvenode guests bulkstart/stop/migrate
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/CLI/pvenode.pm | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/PVE/CLI/pvenode.pm b/PVE/CLI/pvenode.pm
> index e3bc884e..2ae20ca0 100644
> --- a/PVE/CLI/pvenode.pm
> +++ b/PVE/CLI/pvenode.pm
> @@ -7,6 +7,7 @@ use PVE::API2::ACME;
>  use PVE::API2::ACMEAccount;
>  use PVE::API2::Certificates;
>  use PVE::API2::NodeConfig;
> +use PVE::API2::Nodes;
>  
>  use PVE::CertHelpers;
>  use PVE::Certificate;
> @@ -165,6 +166,12 @@ our $cmddef = {
>          set => [ 'PVE::API2::NodeConfig', 'set_options', [], { node => $nodename } ],
>      },
>  
> +    guests => {
> +	bulkstart => [ 'PVE::API2::Nodes::Nodeinfo', 'startall', [], { node => $nodename } ],
> +	bulkstop => [ 'PVE::API2::Nodes::Nodeinfo', 'stopall', [], { node => $nodename } ],
> +	bulkmigrate => [ 'PVE::API2::Nodes::Nodeinfo', 'migrateall', [ 'target' ], { node => $nodename } ],
> +    },
> +
>      cert => {
>  	info => [ 'PVE::API2::Certificates', 'info', [], { node => $nodename }, sub {
>  	    my ($res) = @_;
> 

I'm not sure if I would even make the guest indirection?

Why not just a startall, stopall, migrateall command on toplevel?
If we do not allow to pass a set of wanted guests anyhow?




More information about the pve-devel mailing list