Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-29097

Improve the REGEX when doing a content host query

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Hosts - Content
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • Phoenix - Subscriptions

      Problem Statement

      The customer would like to implement some regex when doing a query. For example

       

      Printing all the servers with node in the name

      [root@satellite ~]# hammer --no-headers --csv host list --fields name --search 'name ~ node'
      node01.king.lab
      node02.king.lab
      node03.king.lab
      node04.king.lab
      node05.king.lab 

      Now, let's try to filter all the machines with node in the name, but filtering values between 0 and 2

      [root@satellite ~]# hammer --no-headers --csv host list --fields name --search 'name ~ node[0..2]'
      [root@satellite ~]# 
      
      [root@satellite ~]# hammer --no-headers --csv host list --fields name --search 'name ~ node[0-2]'
      [root@satellite ~]# 
      
      [root@satellite ~]# hammer --no-headers --csv host list --fields name --search 'name ~ node{0,2}'
      [root@satellite ~]# 

      As we can see above, the simple regex doesn't work when doing the query via hammer or webUI

       

      User Experience & Workflow

      The customer would like to create some regex to improve the filter.

       

      Requirements

      [A list of specific needs or objectives that a Feature must deliver to
      satisfy the Feature. Note: Any requirements that are not flagged as MVP,
      should be evaluated and considered for another feature.]

      Business Impact

      [What would happen if the inclusion of this feature wasn’t undertaken?
      Would any projects at Red Hat be negatively affected?]

              Unassigned Unassigned
              rhn-support-wpinheir Waldirio Pinheiro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: