2.71. hammer sc-param


操作智能类参数

Usage:
    hammer sc-param [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 add-matcher                   Create an override value for a specific smart class parameter
 info, show                    Show a smart class parameter
 list, index                   List all smart class parameters
 remove-matcher                Delete an override value for a specific smart class parameter
 update                        Update a smart class parameter

Options:
 -h, --help                    Print help

2.71.1. hammer sc-param add-matcher

为特定 smart class 参数创建覆盖值

Usage:
    hammer sc-param add-matcher [OPTIONS]

Options:
 --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
 --match MATCH                                       Override match
 --omit OMIT                                         Satellite will not send this parameter in classification output
                                                     One of true/false, yes/no, 1/0.
 --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
 --puppet-class PUPPET_CLASS_NAME                    Puppet class name
 --puppet-class-id PUPPET_CLASS_ID                   ID of Puppet class
 --smart-class-parameter SMART_CLASS_PARAMETER_NAME  Smart class parameter name
 --smart-class-parameter-id SMART_CLASS_PARAMETER_ID
 --value VALUE                                       Override value, required if omit is false
 -h, --help                                          Print help

2.71.2. hammer sc-param info

显示智能类参数

Usage:
    hammer sc-param <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                             Smart class parameter 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
 --puppet-class PUPPET_CLASS_NAME        Puppet class name
 --puppet-class-id PUPPET_CLASS_ID       ID of Puppet class
 --show-hidden SHOW_HIDDEN               Display hidden values
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

Predefined field sets:
  ------------------------------------|-----|--------
  FIELDS                              | ALL | DEFAULT
  ------------------------------------|-----|--------
  Id                                  | x   | x
  Parameter                           | x   | x
  Default value                       | x   | x
  Override                            | x   | x
  Puppet class                        | x   | x
  Class id                            | x   | x
  Description                         | x   | x
  Type                                | x   | x
  Hidden value?                       | x   | x
  Omit                                | x   | x
  Required                            | x   | x
  Validator/type                      | x   | x
  Validator/rule                      | x   | x
  Override values/merge overrides     | x   | x
  Override values/merge default value | x   | x
  Override values/avoid duplicates    | x   | x
  Override values/order               | x   | x
  Override values/values/id           | x   | x
  Override values/values/match        | x   | x
  Override values/values/value        | x   | x
  Override values/values/omit         | x   | x
  Environments/                       | x   | x
  Created at                          | x   | x
  Updated at                          | x   | x
  ------------------------------------|-----|--------

2.71.3. hammer sc-param list

列出所有智能类参数

Usage:
    hammer sc-param <list|index> [OPTIONS]

Options:
 --environment ENVIRONMENT_NAME                Environment name (--environment is deprecated: Use --puppet-environment[-id] instead)
 --environment-id ENVIRONMENT_ID               (--environment-id is deprecated: Use --puppet-environment[-id] instead)
 --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
 --host HOST_NAME                              Host name
 --host-id HOST_ID
 --hostgroup HOSTGROUP_NAME                    Hostgroup name
 --hostgroup-id HOSTGROUP_ID
 --hostgroup-title HOSTGROUP_TITLE             Hostgroup title
 --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
 --order ORDER                                 Sort field and order, eg. ‘id DESC’
 --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
 --page PAGE                                   Page number, starting at 1
 --per-page PER_PAGE                           Number of results per page to return, 'all' to return all results
 --puppet-class PUPPET_CLASS_NAME              Puppet class name
 --puppet-class-id PUPPET_CLASS_ID
 --puppet-environment PUPPET_ENVIRONMENT_NAME  Puppet environment name
 --puppet-environment-id PUPPET_ENVIRONMENT_ID
 --search SEARCH                               Filter results
 --show-hidden SHOW_HIDDEN                     Display hidden values
                                               One of true/false, yes/no, 1/0.
 -h, --help                                    Print help

Predefined field sets:
  --------------|-----|--------
  FIELDS        | ALL | DEFAULT
  --------------|-----|--------
  Id            | x   | x
  Parameter     | x   | x
  Default value | x   | x
  Override      | x   | x
  Puppet class  | x   | x
  Class id      | x   | x
  --------------|-----|--------

Search / Order fields:
  avoid_duplicates    Values: true, false
  environment         string
  key                 string
  merge_default       Values: true, false
  merge_overrides     Values: true, false
  override            Values: true, false
  parameter           string
  puppetclass         string
  puppetclass_name    string

2.71.4. hammer sc-param remove-matcher

删除特定智能类参数的覆盖值

Usage:
    hammer sc-param remove-matcher [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
 --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
 --puppet-class PUPPET_CLASS_NAME                    Puppet class name
 --puppet-class-id PUPPET_CLASS_ID                   ID of Puppet class
 --smart-class-parameter SMART_CLASS_PARAMETER_NAME  Smart class parameter name
 --smart-class-parameter-id SMART_CLASS_PARAMETER_ID
 -h, --help                                          Print help

2.71.5. hammer sc-param update

更新智能类参数

Usage:
    hammer sc-param update [OPTIONS]

Options:
 --avoid-duplicates AVOID_DUPLICATES         Remove duplicate values (only array type)
                                             One of true/false, yes/no, 1/0.
 --default-value VALUE                       Value to use when there is no match
 --description DESCRIPTION                   Description of smart class
 --hidden-value HIDDEN_VALUE                 When enabled the parameter is hidden in the UI
                                             One of true/false, yes/no, 1/0.
 --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
 --merge-default MERGE_DEFAULT               Include default value when merging all matching values
                                             One of true/false, yes/no, 1/0.
 --merge-overrides MERGE_OVERRIDES           Merge all matching values (only array/hash type)
                                             One of true/false, yes/no, 1/0.
 --name NAME                                 Smart class parameter name
 --omit OMIT                                 Satellite will not send this parameter in classification output. Puppet will use the value defined in the Puppet manifest for this parameter
                                             One of true/false, yes/no, 1/0.
 --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
 --override OVERRIDE                         Override this parameter
                                             One of true/false, yes/no, 1/0.
 --override-value-order OVERRIDE_VALUE_ORDER The order in which values are resolved
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --parameter-type PARAMETER_TYPE             Type of the parameter
                                             Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'
 --path PATH                                 The order in which values are resolved
 --puppet-class PUPPET_CLASS_NAME            Puppet class name
 --puppet-class-id PUPPET_CLASS_ID           ID of Puppet class
 --required REQUIRED                         This parameter is required
                                             One of true/false, yes/no, 1/0.
 --validator-rule VALIDATOR_RULE             Used to enforce certain values for the parameter values
 --validator-type VALIDATOR_TYPE             Type of the validator
                                             Possible value(s): 'regexp', 'list', ''
 -h, --help                                  Print help
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.