bheisig / i-doit-cli

Access your CMDB on the command line interface
GNU Affero General Public License v3.0
13 stars 1 forks source link

Create new log book entry for an object #15

Closed bheisig closed 5 years ago

bheisig commented 6 years ago
idoitcli log # interactive mode: ask for object, when open editor for message
idoitcli log 1000 # select object by its identifier; open editor for message
idoitcli log -m "Rebooted because of kernel updates" # interactive mode: ask for object
idoitcli log mylittleserver -m "Rebooted because of kernel updates" # select object by its title
bheisig commented 5 years ago

Feature has been implemented:

$ idoitcli log --help
Add entry to i-doit logbook

USAGE
    $ idoitcli log [OPTIONS] [OBJECT]

ARGUMENTS
    OBJECT              Object title or numeric identifier

COMMAND OPTIONS
    -m MESSAGE,         Add message text, otherwise type your message in
    --message=MESSAGE   your prefered editor based on environment
                        variable EDITOR
                        Your editor is: vim

COMMON OPTIONS
    -c FILE,            Include settings stored in a JSON-formatted
    --config=FILE       configuration file FILE; repeat option for more
                        than one FILE
    -s KEY=VALUE,       Add runtime setting KEY with its VALUE; separate
    --setting=KEY=VALUE nested keys with ".", for example "key1.key2=123";
                        repeat option for more than one KEY

    --no-colors         Do not print colored messages
    -q, --quiet         Do not output messages, only errors
    -v, --verbose       Be more verbose

    -h, --help          Print this help or information about a
                        specific command
    --version           Print version information

    -y, --yes           No user interaction required; answer questions
                        automatically with default values

EXAMPLES
    # Add entry to object identified by its title:
    $ idoitcli log host01.example.com -m "Reboot server for Kernel updates"

    # …or by its numeric identifier:
    $ idoitcli log 42 -m "Reboot server for Kernel updates"

    # If object or message is omitted you'll be asked for it:
    $ idoitcli log
    Object? host01.example.com
    # Based on environment variable EDITOR
    # type your message in your prefered editor…