3.23. hammer 发现


操作发现的主机。

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

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

Subcommands:
 auto-provision                Auto provision a host
 delete, destroy               Delete a discovered host
 facts                         List all fact values
 info, show                    Show a discovered host
 list, index                   List all discovered hosts
 provision                     Provision a discovered host
 reboot                        Reboot a host
 refresh-facts                 Refresh the facts of a host

Options:
 -h, --help                    Print help

3.23.1. hammer discovery auto-provision

自动置备主机

Usage:
    hammer discovery auto-provision [OPTIONS]

Options:
 --all                         Auto provision all discovered hosts
 --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.23.2. hammer discovery delete

删除发现的主机

Usage:
    hammer discovery <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.23.3. Hammer 发现事实

列出所有事实值

Usage:
    hammer discovery facts [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
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --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 NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 --search VALUE                Filter results
 -h, --help                    Print help

Predefined field sets:
  -------|-----|--------
  FIELDS | ALL | DEFAULT
  -------|-----|--------
  Fact   | x   | x
  Value  | 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

Search / Order fields:
  fact                string
  fact_short_name     string
  facts               string
  host                string
  host.hostgroup      string
  host_id             integer
  location            string
  location_id         integer
  name                string
  organization        string
  organization_id     integer
  origin              string
  reported_at         datetime
  short_name          string
  type                string
  value               string

3.23.4. hammer 发现信息

显示发现的主机

Usage:
    hammer discovery <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
  Mac          | x   | x       |
  Cpus         | x   | x       |
  Memory       | x   | x       |
  Disk count   | x   | x       |
  Disks size   | x   | x       |
  Subnet       | x   | x       |
  Last report  | x   | x       |
  Ip           | x   | x       |
  Model        | x   | x       |
  Organization | x   | x       |
  Location     | 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.23.5. Hammer 发现列表

列出所有发现的主机

Usage:
    hammer discovery <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
  Mac         | x   | x       |
  Cpus        | x   | x       |
  Memory      | x   | x       |
  Disk count  | x   | x       |
  Disks size  | x   | x       |
  Subnet      | x   | x       |
  Last report | 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.23.6. hammer 发现置备

置备发现的主机

Usage:
    hammer discovery provision [OPTIONS]

Options:
 --architecture VALUE          Architecture name
 --architecture-id NUMBER      Required if host is managed and value is not inherited from host group
 --ask-root-password BOOLEAN
 --build BOOLEAN
 --capabilities VALUE
 --domain VALUE                Domain name
 --domain-id NUMBER            Required if host is managed and value is not inherited from host group
 --enabled BOOLEAN
 --hostgroup VALUE             Hostgroup name
 --hostgroup-id NUMBER
 --hostgroup-title VALUE       Hostgroup title
 --id VALUE
 --image VALUE                 Name to search by
 --image-id NUMBER
 --interface KEY_VALUE_LIST    Interface parameters
                               Can be specified multiple times.
 --ip VALUE                    Not required if using a subnet with DHCP Capsule
 --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
 --mac VALUE                   Not required if it's a virtual machine
 --managed BOOLEAN
 --medium VALUE                Medium name
 --medium-id VALUE             Required if not imaged based provisioning and host is managed and value is not
                               inherited from host group
 --model VALUE                 Model name
 --model-id NUMBER
 --name VALUE
 --new-name VALUE
 --operatingsystem VALUE       Operating system title
 --operatingsystem-id NUMBER   Required if host is managed and value is not inherited from host group
 --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
 --overwrite BOOLEAN
 --owner-id NUMBER
 --owner-type ENUM             Host's owner type
                               Possible value(s): 'User', 'Usergroup'
 --parameters KEY_VALUE_LIST   Host parameters
 --partition-table VALUE       Partition table name
 --partition-table-id NUMBER
 --progress-report-id VALUE    UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks
 --provision-method ENUM       Possible value(s): 'build', 'image'
 --pxe-loader ENUM             DHCP filename option (Grub2 or PXELinux by default)
                               Possible value(s): 'None', 'PXELinux BIOS', 'PXELinux UEFI', 'Grub UEFI', 'Grub2
                               BIOS', 'Grub2 ELF', 'Grub2 UEFI', 'Grub2 UEFI SecureBoot', 'Grub2 UEFI HTTP',
                               'Grub2 UEFI HTTPS', 'Grub2 UEFI HTTPS SecureBoot', 'iPXE Embedded', 'iPXE UEFI
                               HTTP', 'iPXE Chain BIOS', 'iPXE Chain UEFI'
 --root-password VALUE
 --sp-subnet-id NUMBER
 --subnet VALUE                Subnet name
 --subnet-id NUMBER            Required if host is managed and value is not inherited from host group
 -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.23.7. Hammer 发现重启

重启主机

Usage:
    hammer discovery reboot [OPTIONS]

Options:
 --all                         Reboot all discovered hosts
 --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.23.8. hammer discovery refresh-facts

刷新主机的事实

Usage:
    hammer discovery refresh-facts [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
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.