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

hammer host list --per-page 0 returns "Error: Infinity"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Hammer
    • False
    • sat-rocket
    • None
    • None
    • None
    • Manual

      Description of problem:

      • When using hammer on Satellite 6.18.0 (presumably this affects any version using hammer), using 0 for the --per-page flag's value returns "Error: Infinity"
        [root@satellite ~]# hammer host list --per-page 0
        -----|-----------------
        NAME | OPERATING SYSTEM
        -----|-----------------
        Error: Infinity 
      • Using a value of 1 or greater returns output from hammer host list as expected (using --fields "name,operating system" for output brevity)
        [root@satellite ~]# hammer host list --fields "name,operating system" --per-page 1
        --------------------------------------|-----------------
        NAME                                  | OPERATING SYSTEM
        --------------------------------------|-----------------
        example-host1.fqdn-example.com        | RHEL 9.6        
        --------------------------------------|-----------------
        Page 1 of 4 (use --page and --per-page for navigation).

        How reproducible:

      Consistently

      Is this issue a regression from an earlier version:

      Unknown

      Expected behavior:
      Hammer should warn that 0 is an invalid value for --per-page 

       

              Unassigned Unassigned
              rhn-support-dsheets Daniel Sheets
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: