Hook
Name
hypercloud hook
- manages HyperCloud hooks
Synopsis
hypercloud hook <command> [<args>] [<options>]
Options
--adjust x,y,z Adjust size to not truncate selected columns
--admin lock admin actions
--all lock all actions
-a, --append Append new attributes to the current template
--csv Write table in csv format
--csv-del del Set delimiter for csv output
-d, --delay x Sets the delay in seconds for top command
--describe Describe list columns
--dry Just print the template
--endpoint endpoint URL of HyperCloud xmlrpc frontend
--error Show only fail executions
-e, --execution exeid execution ID
--expand [x=prop,y=prop] Expands the columns size to fill the terminal.
For example: $hypercloud hook list --expand
name=0.4,group=0.6 will expand name 40% and
group 60%. $hypercloud hook list --expand name,group will
expand name and group based on its size. $hypercloud hook
list --expand will expand all columns.
--extended Show info extended (it only works with xml
output)
-f, --filter x,y,z Filter data. An array is specified with
column=value pairs. Valid operators
=,!=,<,<=,>,>=,~ e.g. NAME=test (match name with
test) NAME~test (match every NAME containing the
substring 'test')
-h, --help Show this message
--hook-id id Hook ID to check logs
-j, --json Show the resource in JSON format
-l, --list x,y,z Selects columns to display with list command
-c, --listconf conf Selects a predefined column list
--manage lock manage actions
--no-expand Disable expand
--no-header Hides the header of the table
--no-pager Disable pagination
-n, --numeric Do not translate user and group IDs
--operator operator Logical operator used on filters: AND, OR.
Default: AND.
--password password Password to authenticate with HyperCloud
--since date First date to take logs
-s, --size x=size,y=size Change the size of selected columns. For example:
$ hypercloud hook list --size "name=20" will make column
name size 20.
--success Show only success executions
--until date Last date to take logs
--use lock use actions
--user name User name used to connect to HyperCloud
-v, --verbose Verbose mode
-V, --version Show version and copyright information
-x, --xml Show the resource in xml format
-y, --yaml Show the resource in YAML format
Commands
create <file>
Creates a new Hook from the given description.
Example
Using a Hook description file:
hypercloud hook create hook.tmpl
- Valid options:
dry
delete <range|hookid_list>
Deletes the given Hook.
-
delete <range|hookid_list>
Deletes the given Hook. -
list [<filterflag>]
Lists Hooks in the pool- Valid options:
adjust
csv
csv_del
delay
describe
expand
filter
json
list
listconf
no_expand
no_header
no_pager
numeric
operator
size
xml
yaml
- Valid options:
-
lock <range|hookid_list>
Locks a Hook to prevent certain actions defined by different levels. The show action will never be locked.- Valid states are: All.
- Levels:
- [Use]: locks Admin, Manage and Use actions.
- [Manage]: locks Manage and Use actions.
- [Admin]: locks only Admin actions.
- Valid options:
admin
all
manage
use
log
Get logs about hook executions.
Examples
~ $ hypercloud hook log --since 09/19/19 # returns all logs since that date
~ $ hypercloud hook log --error # returns all failing execs logs
~ $ hypercloud hook log --hook-id 0 # returns all logs from hook 0
- Valid options:
error
hook_id
since
success
until
xml
-
rename <hookid> <name>
Renames the Hook. -
retry <hookid> <execid>
Retry a previous hook execution. -
show <hookid>
Shows information for the given Hook. An execution ID can be given to obtain detailed information of a given hook execution- Valid options:
execution
extended
json
xml
yaml
- Valid options:
-
top [<filterflag>]
Lists Hooks continuously- Valid options:
adjust
csv
csv_del
delay
describe
expand
filter
json
list
listconf
no_expand
no_header
no_pager
numeric
operator
size
xml
yaml
- Valid options:
-
unlock <range|hookid_list>
Unlocks a Hook for unlock any actions with this Hook.- Valid states are: All.
-
update <hookid> [<file>]
Update the Hook contents. If a path is not provided the editor will be launched to modify the current content.- Valid options:
append
- Valid options:
Argument Formats
-
file
Path to a file. -
hookid
HyperCloud HOOK name or ID. -
hookid_list
Comma-separated list of HyperCloud HOOK names or IDs. -
range
List of id's in the form 1,8..15. -
text
String.
Version
HyperCloud Orchestrator 6.4.0.1
Copyright © SoftIron