Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Improve 'vcd search' #575

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Oct 5, 2022

  1. New feature for 'search' command. Allow to show only some fields.

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    deaf5e0 View commit details
    Browse the repository at this point in the history
  2. New feature for 'search' command.

    Allow to hide id with '--do-not-show-id'.
    Allow to call _search() function from other click commands.
    ( useful to implement 'vm list' )
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    87a9263 View commit details
    Browse the repository at this point in the history
  3. Rename 'search' option --do-not-show-id to --hide-id

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    be9ad5c View commit details
    Browse the repository at this point in the history
  4. Add sort options in search command.

    Add sort-asc and sort-desc to 'vcd search'.
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    8e7a978 View commit details
    Browse the repository at this point in the history
  5. [Fix] rename function _search by query.

    Rename function _search by query to be proprely called by other script
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    a401eba View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Allow to customize field name in search

    In --fields option, you can now specify custom name with 'as'.
    
    exemple:
    vcd search vm --fields 'name,ownerName as owner,isAutoNature as standalone'
    name          owner    standalone
    ------------  -------  ------------
    web1          johndoe  flase
    web2          johndoe  flase
    bdd           johndoe  true
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    1a477be View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2022

  1. [Fix] utils as_table when sort_headers=False

    AttributeError: 'dict_keys' object has no attribute 'remove'
    
    When sort_headers=False headers need to be a list to call remove()
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    6f1eb0b View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2022

  1. Search - respect the fields declaration order

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    26067a3 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2022

  1. Search - prevent error if a field has no value

    Init field with a default of None.
    
    For exemple query api 'vm' doesn't return ipAddress if the vm do not have newtork interface.
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    f5c0079 View commit details
    Browse the repository at this point in the history
  2. Search - sort on a 2nd field

    Add option --sort-next to add sort on a second field.
    This option must be used with --sort-asc or --sort-desc
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    ab00c7a View commit details
    Browse the repository at this point in the history
  3. Search - Change query function return

    Change in query():
    - Remove param show_id
    - Don't show the result but return it to the caller
    
    This add flexibility to the caller.
    
    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    81485c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. [Fix] Search launched without resource_type

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    63c8755 View commit details
    Browse the repository at this point in the history
  2. [Fix] Search when result is no found

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    c36727d View commit details
    Browse the repository at this point in the history
  3. [Fix] Search, relocate is not found check out of query function

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    ee2c561 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. Search - Unit tests

    Signed-off-by: Olivier DRAGHI <[email protected]>
    odraghi committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    09c311d View commit details
    Browse the repository at this point in the history