3.24. hammer discovery-rule


操作发现的规则。

Usage:
    hammer discovery-rule [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 create                        Create a discovery rule
 delete, destroy               Delete a rule
 info, show                    Show a discovery rule
 list, index                   List all discovery rules
 update                        Update a rule

Options:
 -h, --help                    Print help

3.24.1. hammer discovery-rule create

创建发现规则

Usage:
    hammer discovery-rule create [OPTIONS]

Options:
 --enabled BOOLEAN             Flag is used for temporary shutdown of rules
 --hostgroup VALUE             Hostgroup name
 --hostgroup-id NUMBER         The hostgroup that is used to auto provision a host
 --hostgroup-title VALUE       Hostgroup title
 --hostname VALUE              Defines a pattern to assign human-readable hostnames to the matching hosts
 --hosts-limit VALUE           Enables to limit maximum amount of provisioned hosts per rule
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-ids LIST           Location ID for provisioned hosts
 --location-title VALUE        Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --name VALUE                  Represents rule name shown to the users
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-ids LIST       Organization ID for provisioned hosts
 --organization-title VALUE    Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 --priority NUMBER             Puts the rules in order, low numbers go first. Must be greater then zero
 --search VALUE                Query to match discovered hosts for the particular rule
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.24.2. hammer discovery-rule delete

删除规则

Usage:
    hammer discovery-rule <delete|destroy> [OPTIONS]

Options:
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.24.3. hammer discovery-rule info

显示发现规则

Usage:
    hammer discovery-rule <info|show> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    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
  Priority          | x   | x       |
  Search            | x   | x       |
  Host group        | x   | x       |
  Hosts limit       | x   | x       |
  Enabled           | x   | x       |
  Hostname template | x   | x       |
  Hosts/            | x   | x       |
  Locations/        | x   | x       |
  Organizations/    | x   | x       |
  ------------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.24.4. hammer discovery-rule list

列出所有发现规则

Usage:
    hammer discovery-rule <list|index> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --order VALUE                 Sort results
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --page VALUE                  Paginate results
 --per-page VALUE              Number of entries per request
 --search VALUE                Filter results
 -h, --help                    Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       | x
  Name        | x   | x       | x
  Priority    | x   | x       |
  Search      | x   | x       |
  Host group  | x   | x       |
  Hosts limit | x   | x       |
  Enabled     | x   | x       |
  ------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.24.5. hammer discovery-rule 更新

更新规则

Usage:
    hammer discovery-rule update [OPTIONS]

Options:
 --enabled BOOLEAN             Flag is used for temporary shutdown of rules
 --hostgroup VALUE             Hostgroup name
 --hostgroup-id NUMBER         The hostgroup that is used to auto provision a host
 --hostgroup-title VALUE       Hostgroup title
 --hostname VALUE              Defines a pattern to assign human-readable hostnames to the matching hosts
 --hosts-limit VALUE           Enables to limit maximum amount of provisioned hosts per rule
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-ids LIST           Location ID for provisioned hosts
 --location-title VALUE        Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --name VALUE                  Represents rule name shown to the users
 --new-name VALUE              Represents rule name shown to the users
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-ids LIST       Organization ID for provisioned hosts
 --organization-title VALUE    Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 --priority NUMBER             Puts the rules in order, low numbers go first. Must be greater then zero
 --search VALUE                Query to match discovered hosts for the particular rule
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.