Skip to content
  • Christos Stavrakakis's avatar
    Add --filter-by option to *-list commands · 8d4176e5
    Christos Stavrakakis authored
    Add --filter-by option to server-list, network-list and flavor-list
    management commands. The value of this option is a comma-seperated list
    of key 'cond' val pairs and, when used, only the DB entries that satisfy all of
    the specified conditions are displayed.
    
    The exact keys that can be used are displayed in the help message. Also
    when a wrong key is used, all the available keys are displayed to the
    error message. No attempt is made to "sanitize" the keys.
    
    Examples:
    snf-manage server-list --filter-by "deleted=True,state=STARTED"
    snf-manage server-list --filter-by userid=cstavr@grnet.gr,flavor__cpu=2
    snf-manage flavor-list --filter-by "ram>=1024,disk<20"
    8d4176e5