2.67. hammer report-template
操作报告模板
Usage: hammer report-template [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: clone Clone a template create Create a report template delete, destroy Delete a report template dump View report content generate Generate report import Import a report template info, show Show a report template list, index List all report templates report-data Downloads a generated report schedule Schedule generating of a report update Update a report template Options: -h, --help Print help
2.67.1. hammer report-template 克隆
克隆模板
Usage: hammer report-template clone [OPTIONS] Options: --id ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --new-name NEW_NAME --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request -h, --help Print help
2.67.2. hammer report-template create
创建报告模板
Usage: hammer report-template create [OPTIONS] Options: --audit-comment AUDIT_COMMENT --default DEFAULT Whether or not the template is added automatically to new organizations and locations One of true/false, yes/no, 1/0. --description DESCRIPTION --file LAYOUT Path to a file that contains the report template content --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --location-title LOCATION_TITLE Set the current location context for the request --location-titles LOCATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --locations LOCATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --locked LOCKED Whether or not the template is locked for editing One of true/false, yes/no, 1/0. --name NAME --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organization-title ORGANIZATION_TITLE Set the current organization context for the request --organization-titles ORGANIZATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --snippet SNIPPET One of true/false, yes/no, 1/0. -h, --help Print help -i, --interactive Open empty template in an $EDITOR. Upload the result
2.67.3. hammer report-template delete
删除报告模板
Usage: hammer report-template <delete|destroy> [OPTIONS] Options: --id ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request -h, --help Print help
2.67.4. hammer report-template dump
查看报告内容
Usage: hammer report-template dump [OPTIONS] Options: --fields FIELDS Show specified fields or predefined field sets only. (See below) Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --id ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request -h, --help Print help Predefined field sets: ------ FIELDS ------
2.67.5. hammer report-template generate
生成报告
Usage: hammer report-template generate [OPTIONS] Options: --gzip GZIP Compress the report uzing gzip One of true/false, yes/no, 1/0. --id ID --inputs INPUTS Specify inputs Comma-separated list of key=value. JSON is acceptable and preferred way for complex parameters --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request --path PATH Path to directory where downloaded content will be saved --report-format REPORT_FORMAT Report format, defaults to 'csv' Possible value(s): 'csv', 'json', 'yaml', 'html' -h, --help Print help
2.67.6. hammer report-template import
导入报告模板
Usage: hammer report-template import [OPTIONS] Options: --associate ASSOCIATE Determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata Possible value(s): 'new', 'always', 'never' --default DEFAULT Makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default) One of true/false, yes/no, 1/0. --file PATH Path to a file that contains the report template content including metadata --force FORCE Use if you want update locked templates One of true/false, yes/no, 1/0. --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --location-title LOCATION_TITLE Set the current location context for the request --location-titles LOCATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --locations LOCATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --lock LOCK Lock imported templates (false by default) One of true/false, yes/no, 1/0. --name NAME Template name --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organization-title ORGANIZATION_TITLE Set the current organization context for the request --organization-titles ORGANIZATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.67.7. hammer report-template info
显示报告模板
Usage: hammer report-template <info|show> [OPTIONS] Options: --fields FIELDS Show specified fields or predefined field sets only. (See below) Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --id ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request -h, --help Print help Predefined field sets: ----------------------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ----------------------------|-----|---------|----- Id | x | x | x Name | x | x | x Description | x | x | Locked | x | x | Default | x | x | Created at | x | x | Updated at | x | x | Locations/ | x | x | Organizations/ | x | x | Template inputs/id | x | x | Template inputs/name | x | x | Template inputs/description | x | x | Template inputs/required | x | x | Template inputs/options | x | x | ----------------------------|-----|---------|-----
2.67.8. hammer report-template list
列出所有报告模板
Usage: hammer report-template <list|index> [OPTIONS] Options: --fields FIELDS Show specified fields or predefined field sets only. (See below) Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Scope by locations --location-title LOCATION_TITLE Set the current location context for the request --order ORDER Sort field and order, eg. ‘id DESC’ --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Scope by organizations --organization-title ORGANIZATION_TITLE Set the current organization context for the request --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return, 'all' to return all results --search SEARCH Filter results -h, --help Print help Predefined field sets: -------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN -------|-----|---------|----- Id | x | x | x Name | x | x | x -------|-----|---------|----- Search / Order fields: default Values: true, false location string location_id integer locked Values: true, false name string organization string organization_id integer snippet Values: true, false template text
2.67.9. hammer report-template report-data
下载生成的报告
Usage: hammer report-template report-data [OPTIONS] Options: --id ID --job-id JOB_ID ID assigned to generating job by the schedule command --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request --path PATH Path to directory where downloaded content will be saved -h, --help Print help
2.67.10. hammer report-template 调度
计划生成报告的调度
Usage: hammer report-template schedule [OPTIONS] Options: --generate-at GENERATE_AT UTC time to generate report at --gzip GZIP Compress the report using gzip One of true/false, yes/no, 1/0. --id ID --inputs INPUTS Specify inputs Comma-separated list of key=value. JSON is acceptable and preferred way for complex parameters --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-title LOCATION_TITLE Set the current location context for the request --mail-to MAIL_TO If set, scheduled report will be delivered via e-mail. Use ',' to separate multiple email addresses. --name NAME Name to search by --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-title ORGANIZATION_TITLE Set the current organization context for the request --path PATH Path to directory where downloaded content will be saved. Only usable if wait is specified --report-format REPORT_FORMAT Report format, defaults to 'csv' Possible value(s): 'csv', 'json', 'yaml', 'html' --wait Turns a command to be active, wait for the result and download it right away -h, --help Print help
2.67.11. hammer report-template 更新
更新报告模板
Usage: hammer report-template update [OPTIONS] Options: --audit-comment AUDIT_COMMENT --default DEFAULT Whether or not the template is added automatically to new organizations and locations One of true/false, yes/no, 1/0. --description DESCRIPTION --file REPORT Path to a file that contains the report template content --id ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID Set the current location context for the request --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --location-title LOCATION_TITLE Set the current location context for the request --location-titles LOCATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --locations LOCATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --locked LOCKED Whether or not the template is locked for editing One of true/false, yes/no, 1/0. --name NAME Name to search by --new-name NEW_NAME --organization ORGANIZATION_NAME Set the current organization context for the request --organization-id ORGANIZATION_ID Set the current organization context for the request --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organization-title ORGANIZATION_TITLE Set the current organization context for the request --organization-titles ORGANIZATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --snippet SNIPPET One of true/false, yes/no, 1/0. -h, --help Print help -i, --interactive Dump existing template and open it in an $EDITOR. Update with the result