• P
    virsh: add support for virConnectListAllDomains and clean up cmdList · d62e51f8
    Peter Krempa 提交于
    This patch makes use of the newly added api virConnectListAllDomains()
    to list domains in virsh.
    
    Virsh now represents lists of domains using an internal structure
    vshDomainList. This structure contains the virDomainPtr list as provided
    by virConnectListAllDomains() and the count of domains in the list.
    
    For backwards compatibility, the function vshDomainListCollect was added
    that tries to enumerate the domains using the new API and if the API is
    not supported falls back to the older approach with the two list
    functions.  The helper function also simulates filtering by all
    currently supported flags added with virConnectListAllDomains().
    
    This patch also cleans up the "list" command handler to use the new
    helpers and adds new command line flags to make use of filtering.
    d62e51f8
virsh.pod 114.3 KB