Feature #4811

Add match and filter arguments in listing commands (and others of similar functionality

Added by Stavros Sachtouris about 10 years ago. Updated about 10 years ago.

Status:New Start date:12/23/2013
Priority:Medium Due date:02/07/2014
Assignee:Stavros Sachtouris % Done:

0%

Category:kamaki Spent time: 1.00 hour
Target version:v0.13 Estimated time:6.00 hours

Description

Users may apply custom match filters on listing commands. An arbitrary number of match filters can be specified.

More details in this design document: https://code.grnet.gr/attachments/download/3490/match-filter-for-0.13.rst

Summary:

Implement filters and and fields for "all" kamaki commands. Starting from version 0.13,
replace the filtering mechanisms featured in individual commands.

Syntax:

--filter-by key[,key0[...]][=value]
--filter-like key[,key0[...]]=value
--field key1[,key2[...]]

Semantics through examples:

    List all servers named 'My server'
    $ kamaki server list --filter-by name='My server'

    List all servers with a name container the word 'server'
    $ kamaki server list --filter-like name=server

    List all servers containing the port 23
    $ kamaki server list --filter-by address=23

    List all servers whith flavor id 42
    $ kamaki server list --filter-by flavor,id=42

    List all servers with 'server' in their names and the port 23
    $ kamaki server list --filter-like name=server --address=23

    List the names and addresses of all servers with flavor 42
    $ kamaki server list --filter-by flavor,id=42 --field=name --field=addresses

    List the ids of all images and flavors used by my servers
    $ kamaki server list --field=image,id --field=flavor,id

Related issues

related to ./kamaki - Feature #5051: Semanticly clean up responses New 02/10/2014 02/14/2014

History

#1 Updated by Stavros Sachtouris about 10 years ago

  • Subject changed from Add match and filter arguments in listing commands to Add match and filter arguments in listing commands (and others of similar functionality
  • Due date changed from 01/18/2014 to 02/07/2014

Also available in: Atom PDF