Gandi / gandi.cli

⚠ ARCHIVED - Command line interface to Gandi.net products using the public API
http://cli.gandi.net/
GNU General Public License v3.0
347 stars 62 forks source link

Add filter on disk list for attach/detach element #184

Closed aegiap closed 8 years ago

aegiap commented 8 years ago

Current

Running the cli 0.18, I notice there is no filter in the disk list command to only see disk attached to VMs or disk fully detached.

The list method for IP have these filter and it is usefull:

$ gandi ip list --help | grep tach ; 
  --attached                      Only display attached ip.
  --detached                      Only display detached ip.

The current help for disk list command:

$ gandi disk list --help
Usage: gandi disk list [OPTIONS]

  List disks.

Options:
  --only-data                     Only display data disks.
  --only-snapshot                 Only display snapshots.
  --type                          Display types.
  --id                            Display ids.
  --vm                            Display vms.
  --snapshotprofile               Display snapshot profile.
  --datacenter [FR-SD2|US-BA1|LU-BI1|FR|US|LU]
                                  Filter results by datacenter.
  --limit INTEGER                 Limit number of results.  [default: 100]
  --help                          Show this message and exit.

What I like to have

$ gandi disk list --help  | grep tach
  --attached                       Only display attached disks to VM.
  --detached                      Only display detached disks.
sayoun commented 8 years ago

Will be available in next release