Skip to content
  • Hrvoje Ribicic's avatar
    Allow classic queries to use either names or UUIDs · 13ef1fa5
    Hrvoje Ribicic authored
    
    
    When UUIDs are used in CLI commands, such addressing of objects fails
    or succeeds inconsistently across object types. Worse yet, some calls
    do not fail, but simply return no result. This is due to the way the
    classical queries are handled in the Haskell code - a filter is built,
    checking if the names match. If the names do not match, but the object
    can still be retrieved through UUID, the query is successful, but there
    is nothing to return.
    
    This patch remedies the situation by extending the filter into an or
    clause checking for either name or uuid. For objects that have no uuid
    field, the name is reused, making the filter equivalent to the old one.
    
    Works towards resolving issue 703.
    
    Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    13ef1fa5