Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3136

cf-remote help output should indicate valid commands

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.15.0, 3.15.0b1
    • Component/s: contrib: cf-remote
    • Labels:
      None

      Description

      > $ cf-remote -H $(hostname)
      cf-remote: Invalid or missing command
      

      What is a valid command? I don't see any listed in the help output.

      > $ cf-remote -h
      usage: cf-remote [-h] [--hosts HOSTS] [--clients CLIENTS] [--hub HUB]
                       [--bootstrap BOOTSTRAP] [--package PACKAGE]
                       [--hub-package HUB_PACKAGE] [--client-package CLIENT_PACKAGE]
                       [--log-level LOG_LEVEL] [--demo] [--call-collect]
                       [--version [VERSION]]
                       [command] [args [args ...]]
      
      Spooky CFEngine at a distance
      
      positional arguments:
        command               Action to perform (default: None)
        args                  Arguments (default: None)
      
      optional arguments:
        -h, --help            show this help message and exit
        --hosts HOSTS, -H HOSTS
                              Which hosts to connect to (ssh) (default: None)
        --clients CLIENTS, -c CLIENTS
                              Where to install client package (default: None)
        --hub HUB             Where to install hub package (default: None)
        --bootstrap BOOTSTRAP, -B BOOTSTRAP
                              cf-agent --bootstrap argument (default: None)
        --package PACKAGE     Local path to package for transfer and install
                              (default: None)
        --hub-package HUB_PACKAGE
                              Local path to package for --hub (default: None)
        --client-package CLIENT_PACKAGE
                              Local path to package for --clients (default: None)
        --log-level LOG_LEVEL
                              Specify detail of logging (default: WARNING)
        --demo                Use defaults to make demos smoother (NOT secure)
                              (default: False)
        --call-collect        Enable call collect in --demo def.json (default:
                              False)
        --version [VERSION], -V [VERSION]
                              Print or specify version (default: None)
      
      

      Looking at the code I see

      • info
      • install
      • packages
      • run
      • sudo
      • scp

      Ideally, the help output would indicate valid commands:

      positional arguments:
        command               Action to perform (info|install|packages|run|sudo|scp) (default: None)
        args                  Arguments (default: None)
      

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel