提交 93a346d3 编写于 作者: O Osier Yang

list: Use virConnectListAllStoragePools in virsh

tools/virsh-pool.c:
  * vshStoragePoolSorter to sort the pool list by pool name.

  * struct vshStoragePoolList to present the pool list, pool info
    is collected by list->poolinfo if 'details' is specified by
    user.

  * vshStoragePoolListFree to free the pool list

  * vshStoragePoolListCollect to collect the pool list, new API
    virStorageListAllPools is tried first, if it's not supported,
    fall back to older APIs.

  * New options --persistent, --transient, --autostart, --no-autostart
    and --type for pool-list. --persistent or --transient is to filter
    the returned pool list by whether the pool is persistent or not.
    --autostart or --no-autostart is to filter the returned pool list
    by whether the pool is autostarting or not. --type is to filter
    the pools by pool types. E.g.

    % virsh pool-list --all --persistent --type dir,disk

tools/virsh.pod:
   * Add documentations for the new options.
上级 fc122e1a
此差异已折叠。
......@@ -2186,13 +2186,33 @@ variables, and defaults to C<vi>.
Returns basic information about the I<pool> object.
=item B<pool-list> [I<--inactive> | I<--all>] [I<--details>]
=item B<pool-list> [I<--inactive>] [I<--all>]
[I<--persistent>] [I<--transient>]
[I<--autostart>] [I<--no-autostart>]
[[I<--details>] [<type>]
List pool objects known to libvirt. By default, only active pools
are listed; I<--inactive> lists just the inactive pools, and I<--all>
lists all pools. The I<--details> option instructs virsh to additionally
lists all pools.
Except the default, I<--inactive>, and I<--all>, you may want to specify more
filtering flags. I<--persistent> is to list the persistent pools, I<--transient>
is to list the transient pools. I<--autostart> is to list the autostarting pools,
I<--no-autostart> is to list the pools with autostarting disabled.
You may also want to list pools with specified types using I<type>, the
pool types must be separated by comma, e.g. --type dir,disk. The valid pool
types include 'dir', 'fs', 'netfs', 'logical', 'disk', 'iscsi', 'scsi',
'mpath', 'rbd', and 'sheepdog'.
The I<--details> option instructs virsh to additionally
display pool persistence and capacity related information where available.
NOTE: When talking to older servers, this command is forced to use a series of
API calls with an inherent race, where a pool might not be listed or might appear
more than once if it changed state between calls while the list was being
collected. Newer servers do not have this problem.
=item B<pool-name> I<uuid>
Convert the I<uuid> to a pool name.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册