2.59. hammer 产品


操作产品

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

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

Subcommands:
 create                        Create a product
 delete, destroy               Destroy a product
 info, show                    Show a product
 list, index                   List products
 remove-sync-plan              Delete assignment sync plan and product
 set-sync-plan                 Assign sync plan to product
 synchronize                   Sync all repositories for a product
 update                        Updates a product
 update-proxy                  Updates an HTTP Proxy for a product

Options:
 -h, --help                    Print help

2.59.1. hammer 产品创建

创建产品

Usage:
    hammer product create [OPTIONS]

Options:
 --description DESCRIPTION               Product description
 --gpg-key-id GPG_KEY_ID                 Identifier of the GPG key
 --label LABEL
 --name NAME                             Product name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       ID of the organization
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --ssl-ca-cert-id SSL_CA_CERT_ID         Idenifier of the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID Identifier of the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID   Identifier of the SSL Client Key
 --sync-plan SYNC_PLAN_NAME              Sync plan name to search by
 --sync-plan-id SYNC_PLAN_ID             Plan numeric identifier
 -h, --help                              Print help

2.59.2. hammer 产品删除

销毁产品

Usage:
    hammer product <delete|destroy> [OPTIONS]

Options:
 --id ID                                 Product numeric identifier
 --name NAME                             Product name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 -h, --help                              Print help

2.59.3. hammer 产品信息

显示产品

Usage:
    hammer product <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                                 Product numeric identifier
 --name NAME                             Product name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 -h, --help                              Print help

Predefined field sets:
  ---------------------|-----|---------|-----
  FIELDS               | ALL | DEFAULT | THIN
  ---------------------|-----|---------|-----
  Id                   | x   | x       | x
  Name                 | x   | x       | x
  Label                | x   | x       |
  Description          | x   | x       |
  Sync state (all)     | x   | x       |
  Sync state (last)    | x   | x       |
  Sync plan id         | x   | x       |
  Gpg/gpg key id       | x   | x       |
  Gpg/gpg key          | x   | x       |
  Organization         | x   | x       |
  Readonly             | x   | x       |
  Deletable            | x   | x       |
  Content/repo name    | x   | x       |
  Content/url          | x   | x       |
  Content/content type | x   | x       |
  ---------------------|-----|---------|-----

2.59.4. hammer 产品列表

列出产品

Usage:
    hammer product <list|index> [OPTIONS]

Options:
 --available-for AVAILABLE_FOR                         Interpret specified object to return only Products that can be associated with specified object.  Only 'sync_plan' is supported.
 --custom CUSTOM                                       Return custom products only
                                                       One of true/false, yes/no, 1/0.
 --enabled ENABLED                                     Return enabled products only
                                                       One of true/false, yes/no, 1/0.
 --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
 --full-result FULL_RESULT                             Whether or not to show all results
                                                       One of true/false, yes/no, 1/0.
 --include-available-content INCLUDE_AVAILABLE_CONTENT Whether to include available content attribute in results
                                                       One of true/false, yes/no, 1/0.
 --name NAME                                           Filter products by name
 --order ORDER                                         Sort field and order, eg. 'id DESC'
 --organization ORGANIZATION_NAME                      Organization name to search by
 --organization-id ORGANIZATION_ID                     Filter products by organization
 --organization-label ORGANIZATION_LABEL               Organization label to search by
 --organization-title ORGANIZATION_TITLE               Organization title
 --page PAGE                                           Page number, starting at 1
 --per-page PER_PAGE                                   Number of results per page to return
 --redhat-only REDHAT_ONLY                             Return Red Hat (non-custom) products only
                                                       One of true/false, yes/no, 1/0.
 --search SEARCH                                       Search string
 --subscription SUBSCRIPTION_NAME                      Subscription name to search by
 --subscription-id SUBSCRIPTION_ID                     Filter products by subscription
 --sync-plan SYNC_PLAN_NAME                            Sync plan name to search by
 --sync-plan-id SYNC_PLAN_ID                           Filter products by sync plan id
 -h, --help                                            Print help

Predefined field sets:
  -------------|-----|---------|-----
  FIELDS       | ALL | DEFAULT | THIN
  -------------|-----|---------|-----
  Id           | x   | x       | x
  Name         | x   | x       | x
  Description  | x   | x       |
  Organization | x   | x       |
  Repositories | x   | x       |
  Sync state   | x   | x       |
  -------------|-----|---------|-----

Search / Order fields:
  description         text
  label               string
  name                string
  organization_id     integer
  redhat              Values: true, false

2.59.5. hammer 产品 remove-sync-plan

删除分配同步计划和产品

Usage:
    hammer product remove-sync-plan [OPTIONS]

Options:
 --description DESCRIPTION               Product description
 --gpg-key-id GPG_KEY_ID                 Identifier of the GPG key
 --id ID                                 Product numeric identifier
 --name NAME                             Product name to search by
 --new-name NEW_NAME                     Product name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --ssl-ca-cert-id SSL_CA_CERT_ID         Idenifier of the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID Identifier of the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID   Identifier of the SSL Client Key
 -h, --help                              Print help

2.59.6. hammer product set-sync-plan

为产品分配同步计划

Usage:
    hammer product set-sync-plan [OPTIONS]

Options:
 --id ID                                 Product numeric identifier
 --name NAME                             Product name to search by
 --new-name NEW_NAME                     Product name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --ssl-ca-cert-id SSL_CA_CERT_ID         Idenifier of the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID Identifier of the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID   Identifier of the SSL Client Key
 --sync-plan SYNC_PLAN_NAME              Sync plan name to search by
 --sync-plan-id SYNC_PLAN_ID             Plan numeric identifier
 -h, --help                              Print help

2.59.7. hammer 产品同步

同步产品的所有软件仓库

Usage:
    hammer product synchronize [OPTIONS]

Options:
 --async                                 Do not wait for the task
 --id ID                                 Product ID
 --name NAME                             Product name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 -h, --help                              Print help

2.59.8. hammer 产品更新

更新产品

Usage:
    hammer product update [OPTIONS]

Options:
 --description DESCRIPTION               Product description
 --gpg-key-id GPG_KEY_ID                 Identifier of the GPG key
 --id ID                                 Product numeric identifier
 --name NAME                             Product name to search by
 --new-name NEW_NAME                     Product name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --ssl-ca-cert-id SSL_CA_CERT_ID         Idenifier of the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID Identifier of the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID   Identifier of the SSL Client Key
 --sync-plan SYNC_PLAN_NAME              Sync plan name to search by
 --sync-plan-id SYNC_PLAN_ID             Plan numeric identifier
 -h, --help                              Print help

2.59.9. hammer 产品 update-proxy

为产品更新 HTTP 代理

Usage:
    hammer product update-proxy [OPTIONS]

Options:
 --http-proxy HTTP_PROXY_NAME          Name to search by
 --http-proxy-id HTTP_PROXY_ID         HTTP Proxy identifier to associated
 --http-proxy-policy HTTP_PROXY_POLICY Policy for HTTP Proxy for content sync
                                       Possible value(s): 'global_default_http_proxy', 'none', 'use_selected_http_proxy'
 --ids IDS                             List of product 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
 -h, --help                            Print help
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.