Re: [pve-devel] [PATCH manager 1/3] add onlineonly and sharedonly to migrateall api call

2016-12-01 Thread Dietmar Maurer
> > +   sharedonly => {
> > +   description => "Migrate only those guests with only shared 
> > storage",
> > +   optional => 1,
> > +   type => 'boolean'
> > +   },
> > +   onlineonly => {
> > +   description => "Migrate only those guests with only shared 
> > storage",
> 
> description is wrong!
> 
> > +   optional => 1,
> > +   type => 'boolean'
> > +   },
> 
> I can imagine another scenario:
> 
> - Migrate only those guests which are offline
> 
> so it is maybe better to define some filter enum:
> 
> filter => {
> type => 'string-list'
> description => "Migrate only those guests which match the filter.",
> optional => 1,
> enum => ['running', 'stopped', 'shared'],
> }
> 
> So you can select to migrate all stopped VMs on shared 
> storage with "--filter 'stopped,shared'"

And maybe other filter like

'qemu' => only migrate qemu VMs
'lxc' => only migrate LXC container

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager 1/3] add onlineonly and sharedonly to migrateall api call

2016-12-01 Thread Dietmar Maurer
> @@ -1538,6 +1553,16 @@ __PACKAGE__->register_method ({
>  type => 'integer',
>  minimum => 1
>  },
> + sharedonly => {
> + description => "Migrate only those guests with only shared 
> storage",
> + optional => 1,
> + type => 'boolean'
> + },
> + onlineonly => {
> + description => "Migrate only those guests with only shared 
> storage",

description is wrong!

> + optional => 1,
> + type => 'boolean'
> + },

I can imagine another scenario:

- Migrate only those guests which are offline

so it is maybe better to define some filter enum:

filter => {
type => 'string-list'
description => "Migrate only those guests which match the filter.",
optional => 1,
enum => ['running', 'stopped', 'shared'],
}

So you can select to migrate all stopped VMs on shared 
storage with "--filter 'stopped,shared'"

?? 

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel