API 指南


Red Hat Satellite 6.2

使用 Satellite 的 Representational State Transfer (REST) API 的参考文档

1.0 版

Red Hat Satellite Documentation Team

摘要

Red Hat Satellite 6.2 Representational State Transfer (REST) API 指南解释了 REST API 背后的概念,并提供各种请求的示例用法。这为管理员和开发人员提供了编写自定义脚本并将 Red Hat Satellite 与第三方应用程序集成的基础。

第 1 章 Red Hat Satellite API 简介

Red Hat Satellite 是一个系统管理解决方案,允许组织在物理、虚拟和云环境中部署、配置和维护其系统。它可通过单一的集中工具对多个 Red Hat Enterprise Linux 部署进行调配、远程管理和监控。Red Hat Satellite Server 同步红帽客户门户网站中的内容,并提供具体生命周期管理、用户和组基于角色的访问控制、集成订阅管理以及高级 GUI、CLI 或 API 访问等功能。

1.1. Red Hat Satellite API

Red Hat Satellite 提供了一个 Representational State Transfer (REST) API。API 为软件开发人员和系统管理员提供在标准 Web 界面之外控制其 Red Hat Satellite 环境。REST API 对于旨在将 Red Hat Satellite 功能与通过 HTTP 访问 API 的自定义脚本或外部应用程序集成在一起的开发人员和管理员很有用。
注意
Satellite 服务器上提供了完整的 API 参考 https://satellite6.example.com/apidoc/v2.html (将 satellite6.example.com 替换为 Satellite 服务器的主机名)。请注意,即使 Satellite 6 API 版本 1 和 2 可用,但红帽只支持版本 2。
REST API 的优点包括:
  • 广泛的客户端支持 :任何支持 HTTP 协议的编程语言、框架或系统都可以使用 API;
  • 自我描述性 :客户端应用程序需要最少了解 Red Hat Satellite 基础架构,因为在运行时发现很多详细信息;
  • 基于资源的模型 :基于资源的 REST 模型提供了管理虚拟化平台的自然方法。
这为开发人员和管理员提供了以下功能:
  • 与企业 IT 系统集成;
  • 与第三方应用程序集成;
  • 执行自动维护或错误检查任务;
  • 使用脚本自动执行重复性任务。

1.2. Representational State Transfer

Representational State Transfer (REST)是一种软件设计架构,侧重于特定服务的资源及其表示。资源表示是与服务器上的一个特定受管元素对应的一个关键信息抽象。客户端将请求发送到位于统一资源标识符(URI)的服务器元素,并使用标准 HTTP 方法(如 GETPOSTPUTDELETE )执行操作。这在客户端和服务器之间提供了无状态通信,每个请求都独立于任何其他请求,并包含完成请求所需的所有信息。

1.3. Satellite API 与 Hammer CLI 工具的比较

对于许多任务,Hammer 和 Satellite API 都同样适用。Hammer 可用作 Satellite API 的人友好界面,例如在脚本中应用 API 调用前测试对 API 调用的响应(使用 -d 选项检查 Hammer 发布的 API 调用,如 hammer -d 机构列表)。API 中的更改会自动反映在 Hammer 中,而使用 API 的脚本必须直接手动更新。
在后台,每个 Hammer 命令首先建立到 API 的绑定,然后发送请求。这在按顺序执行大量 Hammer 命令时可能会有性能影响。相反,与 API 直接通信的脚本只建立一次绑定。如需更多信息,请参阅 Hammer CLI 指南

第 2 章 API 参考

Satellite 服务器上提供了完整的 API 参考 https://satellite6.example.com/apidoc/v2.html (将 satellite6.example.com 替换为 Satellite 服务器的主机名)。请注意,即使 Satellite 6 API 版本 1 和 2 可用,但红帽只支持版本 2。

2.1. 了解 API 语法

内置 API 引用显示 API 路由或路径,前面带有 HTTP 动词:
HTTP_VERB API_ROUTE
Copy to Clipboard Toggle word wrap
API 使用的 HTTP 动词为 GET、POST、PUT 和 DELETE。有关一些示例,请参见位于 http://satellite6.example.com/apidoc/v2/hosts.html 的 API 参考文档的 HOSTS 部分。如果您已熟悉 API 语法,并且 curl 命令您可以跳过本节。
要使用 API,请使用参考文档中的 API 路由和命令语法中的 API 路由构建命令。例如: curl 手册页显示以下基本语法:
curl [options] [URL...]
Copy to Clipboard Toggle word wrap
本指南中使用的选项包括:-- X、--request 命令,其中 command 是 HTTP 动词。
使用 GET HTTP Verb
GET HTTP 动词用于从 API 获取现有条目或资源的数据。
将 API HOSTS 部分中的示例(如 GET /api/hostscurl 语法)相结合:
curl -X GET https://satellite6.example.com/api/hosts
Copy to Clipboard Toggle word wrap
Satellite 只支持连接到 API 的 HTTPS,并且需要某种形式的身份验证。
对于可用的示例,我们必须至少添加带有 the -u 选项的用户名,并使用 -k 选项跳过 SSL 对等证书验证检查:
$ curl -X GET -k -u sat_username https://satellite6.example.com/api/hosts
Enter host password for user 'sat_username':
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results":
	output truncated
Copy to Clipboard Toggle word wrap
上述 API 响应表明总计有两个结果,在下面返回两个结果,这是结果的第一个页面,每个页面的最大结果设置为 20。这在 第 2.2 节 “了解 JSON 响应格式” 中更为详细地解释。
API 引用中的一些示例包括以 :参数 形式前面以冒号开头的术语。例如:
GET /api/hosts/:id
Copy to Clipboard Toggle word wrap
这些是 API 路由参数,且必须替换为适当的值。路由参数以冒号开头,并以 id 结尾。
注意
在 Satellite 6 中,API 的版本 2 是默认值。因此,在 API 调用的 URL 中不需要使用 v2
使用 POST HTTP Verb
POST HTTP 动词用于将数据提交到 API,以创建新条目或资源。数据必须采用 JSON 格式,并可使用 -d, --data 选项包含内联,后跟带引号的 JSON 格式的数据(用大括号 {} 括起)。或者,未加引号的 JSON 格式的数据可以包含在文件中,并使用 curl 命令的 @ 选项指定。例如,-d @file.json
将外部文件用于 JSON 格式的数据的优点包括较少的问题:引用和转义,可以使用您喜欢的编辑器,以帮助查找和避免错误,以及外部工具检查 JSON 数据的有效性或重新格式化它。例如,ya jl 软件包包含 json_verify 工具和 json_reformat 工具。
使用 json_verify 工具,您可以检查 JSON 文件的有效性,如下所示:
$ json_verify < test_file.json
Copy to Clipboard Toggle word wrap
API 调用返回的无结构 JSON 数据可以通过 python 模块 json.tool 传送:
curl API_call | python -m json.tool
Copy to Clipboard Toggle word wrap
Alternately,使用 json_reformat 工具:
curl API_call | json_reformat
Copy to Clipboard Toggle word wrap
输出格式在 第 2.2 节 “了解 JSON 响应格式” 中解释。
API 参考在 Activation keys 部分中包括以下内容:
POST /katello/api/activation_keys
Copy to Clipboard Toggle word wrap
这是 POST /katello/api/activation_keys 命令的可能格式:
curl -X POST -k -u sat_username:sat_password \
-d @file_of_json-formatted_data \
https://satellite6.example.com/katello/api/activation_keys
Copy to Clipboard Toggle word wrap
要查看 POST HTTP 动词如何工作,请创建一个测试文件,如 activation-key.json,其内容如下:
{"organization_id":1, "name":"TestKey", "description":"Just for testing"}
Copy to Clipboard Toggle word wrap
以下示例将通过应用刚才创建的文件中的数据来创建新的激活码:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_username:sat_password -k \
-d @activation-key.json \
https://satellite6.example.com/katello/api/activation_keys | json_reformat
{
    "id": 2,
    "name": "TestKey",
    "description": "Just for testing",
    "unlimited_hosts": true,
    "auto_attach": true,
    "content_view_id": null,
    "environment_id": null,
    "usage_count": 0,
    "user_id": 3,
    "max_hosts": null,
    "release_version": null,
    "service_level": null,
    "content_overrides": [

    ],
    "organization": {
        "name": "Default Organization",
        "label": "Default_Organization",
        "id": 1
    },
    "created_at": "2017-02-16 12:37:47 UTC",
    "updated_at": "2017-02-16 12:37:48 UTC",
    "content_view": null,
    "environment": null,
    "products": null,
    "host_collections": [

    ],
    "permissions": {
        "view_activation_keys": true,
        "edit_activation_keys": true,
        "destroy_activation_keys": true
    }
}
Copy to Clipboard Toggle word wrap
要在 Web UI 中查看此条目,请导航到 ContentActivation keys。记住在任何更改后重新加载页面。
使用 PUT HTTP Verb
PUT HTTP 动词用于将数据提交到 API,以更新现有条目或资源。与 POST API 调用类似,数据必须采用 JSON 格式,并可使用 -d, --data 选项加上带引号的 JSON 格式的数据(用大括号 {} 括起)。或者,未加引号的 JSON 格式的数据可以包含在文件中,并使用 curl 命令的 @ 选项指定。例如,-d @file.json
若要更改现有值或附加到现有资源,可使用 PUT HTTP 动词。API 引用有以下条目可用于更新激活码:
PUT /katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
要更新现有的激活码,请使用以下格式的命令:
curl -X PUT -k -u sat_username:sat_password \
-d @file_of_json-formatted_data \
https://satellite6.example.com/katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
使用要更新的激活码的 ID 替换 :id。将 PUT 命令与相同值一起使用多次 不会创建 多个条目。
例如,可以通过编辑之前创建的文件来更新上例中创建的 test Activation 密钥,如下所示:
{"organization_id":1, "name":"TestKey", "description":"Just for testing","max_hosts":"10" }
Copy to Clipboard Toggle word wrap
按如下所示使用命令在 JSON 文件中应用更改:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-u sat_username:sat_password -k \
-d @activation-key.json \
https://satellite6.example.com/katello/api/activation_keys/2
{
    "id": 2,
    "name": "TestKey",
    "description": "Just for testing",
    "unlimited_hosts": false,
    "auto_attach": true,
    "content_view_id": null,
    "environment_id": null,
    "usage_count": 0,
    "user_id": 3,
"max_hosts": 10,
    "release_version": null,
    "service_level": null,
    "content_overrides": [

    ],
    "organization": {
        "name": "Default Organization",
        "label": "Default_Organization",
        "id": 1
    },
    "created_at": "2017-02-16 12:37:47 UTC",
    "updated_at": "2017-02-16 12:46:17 UTC",
    "content_view": null,
    "environment": null,
    "products": null,
    "host_collections": [

    ],
    "permissions": {
        "view_activation_keys": true,
        "edit_activation_keys": true,
        "destroy_activation_keys": true
    }
}

Copy to Clipboard Toggle word wrap
使用 DELETE HTTP Verb
要删除资源,请将 DELETE 动词与包含要删除的资源的 ID 的 API 路由一起使用。
要删除现有的激活码,请使用以下格式的命令:
curl -X DELETE -k -u sat_username:sat_password \
https://satellite6.example.com/katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
使用要删除的激活码的 ID 替换 :id。例如:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X DELETE \
-u admin:RedHat1! -k \
https://satellite6.example.com/katello/api/activation_keys/2 | json_reformat
output omitted
    "started_at": "2017-02-16 12:58:17 UTC",
    "ended_at": "2017-02-16 12:58:18 UTC",
    "state": "stopped",
    "result": "success",
    "progress": 1.0,
    "input": {
        "activation_key": {
            "id": 2,
            "name": "TestKey"
output truncated
Copy to Clipboard Toggle word wrap
与 API 参考相关的 API 错误消息
API 使用 RAILs 格式来指示错误:
Nested_Resource.Attribute_Name
Copy to Clipboard Toggle word wrap
这会转换为 API 引用中使用的以下格式:
Resource[Nested_Resource_attributes][Attribute_Name_id]
Copy to Clipboard Toggle word wrap

2.2. 了解 JSON 响应格式

使用 GET 调用 API 将以 JSON 格式返回结果。通过 Python json.tool 模块传递输出会带来更人类可读的格式。
Collections 的 JSON 响应格式
集合是对象列表,如主机和域。集合 JSON 响应的格式由 metadata 字段部分组成,后跟 results 部分。以下是使用 API 路由 GET /api/domains 时用于域列表的集合 JSON 响应的格式示例。输出通过 json.tool 传送,以便更轻松地阅读结果部分。
$ curl -X GET -k -u admin:password https://satellite6.example.com/api/domains | python -m json.tool
{
    "total": 3,
    "subtotal": 3,
    "page": 1,
    "per_page": 20,
    "search": null,
    "sort": {
        "by": null,
        "order": null
    },
    "results": [
        {
            "id": 23,
            "name": "qa.lab.example.com",
            "fullname": "QA",
            "dns_id": 10,
            "created_at": "2013-08-13T09:02:31Z",
            "updated_at": "2013-08-13T09:02:31Z"
        },
        {
            "id": 25,
            "name": "sat.lab.example.com",
            "fullname": "SATLAB",
            "dns_id": 8,
            "created_at": "2013-08-13T08:32:48Z",
            "updated_at": "2013-08-14T07:04:03Z"
        },
        {
            "id": 32,
            "name": "hr.lab.example.com",
            "fullname": "HR",
            "dns_id": 8,
            "created_at": "2013-08-16T08:32:48Z",
            "updated_at": "2013-08-16T07:04:03Z"
        }
    ]
}
Copy to Clipboard Toggle word wrap
响应元数据字段如下所述:
  • total - 没有搜索参数的对象总数。
  • Subtotal- 使用给定搜索参数返回的对象数量(如果没有搜索,则 subtotal 等于 total)。
  • page - 页面号。
  • per_page - 每个页面返回的最大对象数。
  • Limit - 在集合响应中返回指定数量的对象。
  • offset - 返回集合前跳过的对象数量。
  • search - 基于 scoped_scoped 语法的搜索字符串。
  • 排序
    • - 集合排序的字段。
    • 顺序 -排序顺序,可以是升序的 ASC 或 DESC (降序)。
  • results - 对象集合。
单个对象的 JSON 响应格式
单对象 JSON 响应用于显示单个对象。GET 请求需要对象的唯一标识符 :id:name。请注意,:name 不能始终用作唯一标识符,但 :id 始终可以被使用。单对象 JSON 响应的格式仅由对象的属性组成。
以下是使用 API 路由 GET /api/domains/23GET /api/domains/qa.lab.example.com 时,单对象 JSON 响应的格式示例。
$ curl -X GET -k -u admin:password https://satellite6.example.com/api/domains/23 | python -m json.tool
{
    "id": 23,
    "name": "qa.lab.example.com",
    "fullname": "QA",
    "dns_id": 10,
    "created_at": "2013-08-13T09:02:31Z",
    "updated_at": "2013-08-13T09:02:31Z"
}
Copy to Clipboard Toggle word wrap

第 3 章 身份验证 API 调用

与 Satellite API 交互需要身份验证。您可以将 Satellite 服务器 CA 证书下载到本地主机,以便在每个 API 请求中使用以提供 SSL 身份验证。每个 API 请求都需要有效的用户名和密码。在以下部分中讨论每个选项。

3.1. 使用 SSL 身份验证

Red Hat Satellite 使用 HTTPS,在与 Red Hat Satellite Server 通信时提供一定程度的加密和身份验证。Satellite 6 不支持非 SSL 通信。
每个 Red Hat Satellite 服务器都使用自签名证书。此证书同时充当服务器证书,以验证加密密钥和证书颁发机构(CA)以信任 Satellite 服务器的身份。以下步骤演示了如何为 Satellite 服务器设置 SSL 身份验证(本例中为 satellite6.example.com):
  1. 使用以下选项之一从您要与之通信的Satellite服务器获取证书:
    1. 要使用 SSH 获取证书,请运行以下命令:
      $ scp root@satellite6.example.com:/var/www/html/pub/katello-server-ca.crt ./
      Copy to Clipboard Toggle word wrap
    2. 如果您直接在 Satellite 服务器上执行命令,请运行以下命令从本地可用副本获取证书:
      $ cp /var/www/html/pub/katello-server-ca.crt ./
      Copy to Clipboard Toggle word wrap
    3. 要使用 HTTP 获取证书,请运行以下命令:
      $ curl -O http://satellite6.example.com/pub/katello-server-ca.crt
      Copy to Clipboard Toggle word wrap
      警告
      使用未加密的 HTTP 连接检索证书可能会存在安全风险。
  2. 使用客户端中的证书作为证书颁发机构来验证 Satellite 服务器的身份:
    $ curl -X GET -u sat_username:sat_password \
    -H "Accept:application/json" --cacert katello-server-ca.crt \
    https://satellite6.example.com/katello/api/organizations
    Copy to Clipboard Toggle word wrap
    GET 是默认操作,因此此处可以省略 so -X GET 属性。
  3. 创建网络安全服务(NSS)数据库来存储证书:
    $ certutil -N -d sql:$HOME/.pki/nssdb
    Enter a password which will be used to encrypt your keys.
    The password should be at least 8 characters long,
    and should contain at least one non-alphabetic character.
    
    Enter new password:
    Re-enter password:
    Copy to Clipboard Toggle word wrap
    如果 NSS 数据库已存在,系统将提示您输入密码,如下所示:
    Enter Password or Pin for "NSS Certificate DB":
    Copy to Clipboard Toggle word wrap
  4. 使用以下命令,将证书永久包含在 NSS 数据库中:
    $ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "Red Hat Satellite" \
    -i katello-server-ca.crt
    Copy to Clipboard Toggle word wrap
    这会将证书导入到 NSS 数据库中,这意味着您可以省略每个请求的- cacert 选项。您可以按照以下方式测试它:
    $ curl -X GET -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts
    {
        "total": 2,
        ...,
        "results": [
            ...
        ]
    }
    output omitted
    Copy to Clipboard Toggle word wrap

3.2. 使用 HTTP 身份验证

对 Satellite API 的所有请求都需要合适的用户名和密码。API 使用 HTTP 基本身份验证 [1] 对这些凭证进行编码,然后添加到 Authorization 标头中。如果请求没有包括适当的 Authorization 标头,API 会返回 401 Authorization Required 错误。
重要
基本身份验证涉及潜在的敏感信息,如密码,以纯文本形式发送。REST API 需要 HTTPS 进行纯文本请求的传输级别加密。
有些 base64 库将编码的凭据分成多行,并使用换行符终止每行。这会使标头无效,并导致请求出现故障。授权标头要求编码的凭据位于标头中的一行中。

3.3. 使用 OAuth 身份验证

作为基本身份验证的替代选择,API 中支持有限的 OAuth 1.0 身份验证(有时在协议 1.0 中称为 1leged OAuth)。

3.3.1. 配置 OAuth

OAuth 在 Satellite 6.2 中默认启用。配置设置存储在 /etc/foreman/settings.yaml 配置文件中,并可通过 管理SettingsAuth 在 Web UI 中查看。OAuth consumer 密钥 是所有 OAuth 客户端要使用的令牌。Web UI 中的某些值无法更改。这些值只能通过使用新选项再次运行 satellite-installer 脚本来更改。请注意,升级时会丢失对该文件的任何手动更改。输入以下命令查看所有 OAuth 相关的安装程序选项:
# satellite-installer --full-help | grep oauth
Copy to Clipboard Toggle word wrap
如果您希望使用 OAuth 进行的所有 API 请求作为内置匿名 API 管理员帐户授权,请在 /etc/foreman/settings.yaml 文件中将 OAuth 映射用户 设置为 false。如果要指定发出请求的用户,请将此配置选项更改为 true。这允许客户端发送带有现有 Foreman 用户登录的 FOREMAN-USER 标头。
重要
标头没有在 OAuth 请求中签名,因此可以伪造。具有有效消费者密钥的任何人都可以模拟任何 Foreman 用户。

3.3.2. 发出 OAuth 请求

通常,OAuth 客户端库用于生成请求。此处显示了使用 curl 的 OAuth 请求示例,以帮助了解它的工作原理。

例 3.1. 使用 curl 的 OAuth 请求示例

$ curl 'https://satellite6.example.com/api/architectures' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json,version=2' \
-H 'FOREMAN-USER: User1' \
-H 'Authorization: OAuth oauth_version="1.0",oauth_consumer_key="secretkey",oauth_signature_method="hmac-sha1",oauth_timestamp=1321473112,oauth_signature=Il8hR8/ogj/XVuOqMPB9qNjSy6E='
Copy to Clipboard Toggle word wrap
在上例中,使用 OAuth 进行身份验证来列出上述架构。以具有登录用户 1 的用户的身份尝试该请求。如果在 Foreman 设置中启用映射,则结果将仅包含用户 User1 可以看到的架构。请注意,签名是手动构建的,这应该会随任何 oauth_timestamp 更改而改变。另外,签名也会反映每个参数、HTTP 方法和 URI 更改。因此,建议您使用 OAuth 客户端库来构造所有 OAuth 参数。

第 4 章 Red Hat Satellite API 入门

本章提供了如何使用 Red Hat Satellite API 执行不同任务的示例。这些示例侧重于将 HTTPS 用于端口 443 的 Satellite 服务器。您还可以通过 Satellite Capsule 访问 API,但您需要使用端口 8443 或 API 调用会失败。
您可以在脚本本身中满足这些不同的端口要求。例如,在 Ruby 中,您可以指定 Satellite 和 Capsule URL,如下所示:
url = 'https://satellite6.example.com/api/v2/'
capsule_url = 'https://capsule.example.com:8443/api/v2/'
katello_url = 'https://satellite6.example.com/katello/api/v2/'
Copy to Clipboard Toggle word wrap
如果主机订阅了 Satellite 服务器或 Capsule 服务器,您可以在 [server] 部分的 port 条目中确定从 /etc/rhsm/rhsm.conf 文件访问 API 所需的正确端口。您可以使用这些值来完全自动化脚本,无需验证要使用的端口。

4.1. 使用 Curl 的 API 示例

本节论述了如何使用 curl 使用 Satellite API 执行各种任务。

4.1.1. 执行简单查询

以下示例演示了如何使用 curl 搜索 Satellite 部署的信息。这些示例包括实际命令和一些示例输出,以及用户名和密码的示例值。每个部署都有不同的结果。这些示例也使用 python -m json.tool 命令格式化输出。
注意
Red Hat Satellite 需要使用 HTTPS,默认是主机识别的证书。如果您还没有添加 Satellite 服务器证书,如 第 3.1 节 “使用 SSL 身份验证” 所述,您可以使用 -k (不安全)选项绕过证书检查。
对于用户身份验证,您可以使用表单 -u 用户名:password 或者如果没有包含密码,命令会提示您输入它。红帽建议不要将密码包含在命令中,因为它会成为 shell 历史记录的一部分,并可能会存在安全风险。这些示例仅包含简单性的密码。
请注意,如果您在 curl 中使用 the -s (silent)选项,则不会看到进度计量或任何错误消息。

检索资源列表

以下是返回资源列表的基本查询。此类请求返回嵌套在元数据中的数据列表,而其他请求类型则仅返回实际对象。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts | python -m json.tool

{
       "total" => 2,
    "subtotal" => 2,
        "page" => 1,
    "per_page" => 1000,
      "search" => nil,
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
      ...
}
Copy to Clipboard Toggle word wrap

例 4.1. 列出用户

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/users
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"firstname":"Admin","lastname":"User","mail":"root@example.com","admin":true,"auth_source_id":1,"auth_source_name":"Internal","timezone":null,"locale":null,"last_login_on":"2017-02-08 23:25:51 UTC","created_at":"2017-01-09 12:10:02 UTC","updated_at":"2017-02-08 23:25:51 UTC","id":3,"login":"admin","default_location":null,"locations":[],"default_organization":{"id":1,"name":"Default Organization","title":"Default Organization","description":null},"organizations":[]}]
}
Copy to Clipboard Toggle word wrap

运行通用主机查询

以下查询返回主机 satellite6.example.com 的信息:

$  curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts/satellite6.example.com | python -m json.tool
{
    "all_puppetclasses": [],
    "architecture_id": 1,
    "architecture_name": "x86_64",
    "build": false,
    "capabilities": [
        "build"
    ],
    "certname": "satellite6.example.com",
    "comment": null,
    "compute_profile_id": null,
    ...
}
Copy to Clipboard Toggle word wrap

为特定主机搜索事实

以下查询返回主机 satellite6.example.com 的所有事实:

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts/satellite6.example.com/facts | python -m json.tool
{
...
    "results": {
        "satellite6.example.com": {
            "augeasversion": "1.0.0",
            "bios_release_date": "01/01/2007",
            "bios_version": "0.5.1",
            "blockdevice_sr0_size": "1073741312",
            "facterversion": "1.7.6",
            ...
}
Copy to Clipboard Toggle word wrap

搜索所有主机匹配模式

以下查询返回与模式 "example" 匹配的所有主机:

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=example | python -m json.tool
{
    ...
    "results": [
        {
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "example",
    ...
}
Copy to Clipboard Toggle word wrap

搜索特定环境中的所有主机

以下查询返回 "production" 环境中的所有主机:

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=environment=production | python -m json.tool
{
    ...
    "results": [
        {
            "environment_name": "production",
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "environment=production",
    ...
}
Copy to Clipboard Toggle word wrap

使用特定事实值搜索所有主机

以下查询返回带有模型名称"RHEV Hypervisor"的所有主机:

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=model=\"RHEV+Hypervisor\" | python -m json.tool
{
    ...
    "results": [
        {
            "model_id": 1,
            "model_name": "RHEV Hypervisor",
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "model=\"RHEV Hypervisor\"",
    ...
}
Copy to Clipboard Toggle word wrap

4.1.2. 创建和修改资源

您可以使用 Satellite API 来操作 Satellite 服务器上的资源。这些 API 调用要求您在要查询的简单用户名、密码和 URI 之外传递各种参数。例如,若要将内容上传到 Satellite 服务器,或修改 Satellite 资源,您需要在构建请求时在标头中包含额外信息。
您可以在标头中指定 API 的版本,如以下示例中所述,或作为 URL 的一部分。例如: https://satellite6.example.com/api/v2/architectures 等同于在请求标头中使用 Accept:version=2。URL 规格具有优先权。
以下是 POST 请求的基本语法:
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X POST \
       -u username:password -k \
       -d json-formatted-data https://satellite6.example.com
Copy to Clipboard Toggle word wrap
例如,要创建新架构,您可以使用以下示例请求:
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X POST -u sat_username:sat_password \
       -k -d "{\"architecture\":{\"name\":\"i686\"}}" \
       https://satellite6.example.com/api/architectures
Copy to Clipboard Toggle word wrap
这会返回类似如下的输出:
{"name":"i686","id":3,"created_at":"2015-10-29T13:21:09Z","updated_at":"2015-10-29T13:21:09Z","operatingsystems":[],"images":[]}
Copy to Clipboard Toggle word wrap
您可以使用以下命令来验证架构是否已创建:
$ curl -X GET -u sat_username:sat_password -k https://satellite6.example.com/api/v2/architectures | python -m json.tool
  {
      "page": 1,
      "per_page": 20,
      "results": [
          {
              "created_at": "2015-04-02T05:29:46Z",
              "id": 2,
              "name": "i386",
              "updated_at": "2015-04-02T05:29:46Z"
          },
          {
              "created_at": "2015-04-02T05:29:46Z",
              "id": 1,
              "name": "x86_64",
              "updated_at": "2015-04-02T05:29:46Z"
          },
          {
              "created_at": "2015-11-04T19:40:15Z",
              "id": 3,
              "name": "i686",
              "updated_at": "2015-11-04T19:40:15Z"
          }
      ],
      "search": null,
      "sort": {
          "by": null,
          "order": null
      },
      "subtotal": 3,
      "total": 3
  }
Copy to Clipboard Toggle word wrap
您还可以使用 Satellite 服务器上的 hammer 来验证结果:
$ hammer -u sat_username -p sat_password architecture list
---|-------
ID | NAME
---|-------
2  | i386
1  | x86_64
3  | i686
---|-------
Copy to Clipboard Toggle word wrap

例 4.2. 创建新用户

$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_username:sat_password -k \
-d "{\"firstname\":\"Test\",\"lastname\":\"API-User\",\"mail\":\"test@example.com\",\"login\":\"test_api\",\"password\":\"123456\",\"auth_source_id\":1}" \
https://satellite6.example.com/api/users
Copy to Clipboard Toggle word wrap
4.1.2.1. 将内容上传到 Satellite 服务器
本节论述了如何将 curl 与 Satellite 6 API 搭配使用,将大型文件上传到 Satellite 服务器。这个过程涉及四个步骤:
  1. 创建上传请求。
  2. 上传内容。
  3. 导入内容。
  4. 删除上传请求。
您可以上传的最大文件大小大约为 30 MB。要上传更大的内容,请参阅 例 4.3 “上传内容大概超过 30 MB”

过程 4.1. 将内容上传到 Satellite 服务器

  1. 创建上传请求。确保修改示例参数以适合您的部署:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X POST \
           -u sat_username:sat_password -k -d "{}" \
           https://satellite6.example.com/katello/api/repositories/3/content_uploads
    Copy to Clipboard Toggle word wrap
    这个命令返回类似如下的 upload_id
    {"upload_id":"0be156b1-f373-4cad-89d0-924f8f4491d2","_href":"/pulp/api/v2/content/uploads/0be156b1-f373-4cad-89d0-924f8f4491d2/"}
    Copy to Clipboard Toggle word wrap
  2. 上传您的内容。确保在上传数据时使用正确的 MIME 类型。"application/json" MIME 类型用于大多数对 Satellite 6 的请求。组合 upload_id、MIME 类型和其他参数以上传内容:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@/home/sat6user/rpmbuild/RPMS/noarch/python-scripttest-1.1.1-1.fc21.noarch.rpm" \
           --data-urlencode offset=0 \
           https://satellite6.example.com/katello/api/repositories/3/content_uploads/0be156b1-f373-4cad-89d0-924f8f4491d2
    Copy to Clipboard Toggle word wrap
  3. 将内容上传到 Satellite 服务器后,您需要将它导入到适当的存储库中。在完成此步骤前,Satellite 服务器不会了解新内容:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X PUT \
           -u sat_username:sat_password \
           -k -d "{\"upload_ids\":[\"0be156b1-f373-4cad-89d0-924f8f4491d2\"]}" \
           https://satellite6.example.com/katello/api/repositories/3/import_uploads
    Copy to Clipboard Toggle word wrap
  4. 成功上传并导入内容后,您可以删除上传请求。这会释放上传过程中使用的任何临时磁盘空间:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X DELETE -d "{}" \
           -u sat_username:sat_password \
           -k https://satellite6.example.com/katello/api/repositories/3/content_uploads/0be156b1-f373-4cad-89d0-924f8f4491d2
    Copy to Clipboard Toggle word wrap

例 4.3. 上传内容大概超过 30 MB

以下示例演示了如何将大型文件分成块,创建上传请求,上传单个文件,将它们导入到 Satellite,然后删除上传请求。请注意,本示例使用示例内容、主机名、用户名和文件名。
  1. 下载示例模块:
    $ wget https://forgeapi.puppetlabs.com/v3/files/theforeman-foreman-5.0.1.tar.gz?_ga=1.267255502.1792403825.1430297670 -O theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    将模块分成 50,000 字节块:
    $ split --bytes 50000 --numeric-suffixes --suffix-length=1 theforeman-foreman-5.0.1.tar.gz foreman_module.
    
    Copy to Clipboard Toggle word wrap
    查看生成的文件:
    $ ls -la theforeman-foreman-5.0.1.tar.gz foreman_module.*
    -rw-r--r--. 1 root root 50000 Nov  4 04:42 foreman_module.0
    -rw-r--r--. 1 root root 32928 Nov  4 04:42 foreman_module.1
    -rw-r--r--. 1 root root 82928 Nov  4 04:41 theforeman-foreman-5.0.1.tar.gz
    Copy to Clipboard Toggle word wrap
  2. 创建新的上传请求(这等同于 Satellite 服务器上的 cat )。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X POST \
           -u sat_username:sat_password -k -d "{}" \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads
    
    Copy to Clipboard Toggle word wrap
    以上命令返回一个上传 ID:
    {"upload_id":"9585528f-07ad-4bb1-9c80-ccece249b2b7","_href":"/pulp/api/v2/content/uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7/"}
    Copy to Clipboard Toggle word wrap
  3. 上传您在第 1 步中创建的文件块。请注意,在本示例中使用 offset 参数,以及如何与文件大小相关:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@foreman_module.0" \
           --data-urlencode offset=0 \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    
    Copy to Clipboard Toggle word wrap
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@foreman_module.1" \
           --data-urlencode offset=50000 \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    Copy to Clipboard Toggle word wrap
  4. 将完整上传到存储库:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X PUT \
           -u sat_username:sat_password \
           -k -d "{\"upload_ids\":[\"9585528f-07ad-4bb1-9c80-ccece249b2b7\"]}" \
           https://ibm-vm01.example.com/katello/api/repositories/2/import_uploads
    Copy to Clipboard Toggle word wrap
  5. 删除上传请求:
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X DELETE -d "{}" \
           -u sat_username:sat_password \
           -k https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    Copy to Clipboard Toggle word wrap
  6. 登录到 Satellite 服务器,检查该文件是否已正确传输:
    $ ls -la /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz
    -rw-r--r--. 1 apache apache 82928 Nov  4 04:55 /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    比较文件:
    $ cmp /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    $ echo $?
    0
    
    Copy to Clipboard Toggle word wrap

4.1.3. 覆盖智能类参数

您可以使用 API 搜索智能参数,并提供值来覆盖类中的智能参数。有关可修改的属性的完整列表,请访问 https://satellite6.example.com/apidoc/v2/smart_class_parameters/update.html 的内置 API 参考。
例如,若要列出所有智能类参数,API 路由显示为 GET /api/smart_class_parameters。使用 curl,命令如下:
$ curl -X GET -s -k -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters
Copy to Clipboard Toggle word wrap
如果您知道 Puppet 类 ID,如 5,您可以限制范围,如下所示:
$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/puppetclasses/5/smart_class_parameters
Copy to Clipboard Toggle word wrap
这两个调用都接受 search 参数。在搜索输入框中的 Web UI 中可以看到可搜索字段的完整列表。导航到 ConfigureSmart variables,再单击搜索查询框中以显示字段列表。
两个特别有用的搜索参数是 puppetclass_name,供您搜索特定参数。例如,使用 -d, --data 选项传递 URL 编码数据:
$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/smart_class_parameters -d 'search=puppetclass_name = access_insights_client and key = authmethod'
Copy to Clipboard Toggle word wrap
支持标准 scoped-search 语法。
找到参数的 ID 后,您可以继续列出包括当前覆盖值在内的完整详情。例如,对于 ID 63,API 路由为 GET /api/smart_class_parameters/63。使用 curl,命令将是:
$ curl -X GET -s -k -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
现在,您可以使用 PUT 调用启用覆盖参数值:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-s -k -u sat_username:sat_password \
-d '{"smart_class_parameter":{"override":true}}' \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
请注意,无法手动创建或删除参数。用户只能修改其属性。只有在从代理导入类时,才会创建和删除参数。
启用覆盖后,您可以添加自定义覆盖匹配器:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-s -k -u sat_username:sat_password \
-d '{"smart_class_parameter":{"override_value":{"match":"hostgroup=Test","value":"2.4.6"}}}' \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
有关 API 调用的所有参数的详情,请参考:https://satellite6.example.com/apidoc/v2/override_values.html。
要删除覆盖值,请使用如下命令:
$ curl -X DELETE -s -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters/63/override_values/3
Copy to Clipboard Toggle word wrap
4.1.3.1. 使用外部文件修改智能类参数
使用外部文件简化了使用 JSON 数据的过程。使用具有语法高亮显示功能的编辑器可帮助您避免和查找错误。

过程 4.2. 使用外部文件修改智能类参数

在本例中,我们将使用 MOTD Puppet 清单。
  1. 按名称搜索 Puppet 类,本例中为 motd
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" -X GET \
    -u sat_user:sat_passwd -k \
    "https://satellite6.example.com/api/smart_class_parameters?search=puppetclass_name=motd” \
    | python -m json.tool
    {
    "page": 1,
    "per_page": 20,
    "results": [
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": "",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-07 13:08:42 UTC",
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    },
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": true,
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 1,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,"parameter": "dynamic_motd",
    "parameter_type": "boolean",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-06 15:21:06 UTC",
    "use_puppet_default": null,
    "validator_rule": null,
    "validator_type": null
    },
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": "",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 2,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "template",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-06 15:21:06 UTC",
    "use_puppet_default": null,
    "validator_rule": null,
    "validator_type": null
    }
    ],
    "search": "puppetclass_name=motd",
    "sort": {
    "by": null,
    "order": null
    },
    "subtotal": 3,
    "total": 66
    }
    Copy to Clipboard Toggle word wrap
    每个智能类参数都有一个 ID,对于同一 Satellite 实例是全局的。motd 类的 content 参数在此 Satellite 服务器中具有 id=3。不要将此功能与 Puppet 类名称前面出现的 Puppet 类 ID 混淆。
  2. 使用参数 ID 3 获取特定于 motd 参数的信息,并将输出重定向到文件,如 output_file.json
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" -X GET \
    -u sat_user:sat_passwd -k \
    "https://satellite6.example.com/api/smart_class_parameters/3 \
    | python -m json.tool > output_file.json
    Copy to Clipboard Toggle word wrap
  3. 将上一步中创建的文件复制到新文件以进行编辑,例如 changed_file.json。在编辑器中打开 文件,并修改所需的值。在本例中,我们希望将 motd 模块的 content 参数更改为 true,这需要 将覆盖 选项从 false 改为 true
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC", # This line must be removed.
    "default_value": "", # A new value should be supplied here.
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": false, # The override value must be set to true.
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values": [], # This line must be removed.
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-07 11:56:55 UTC", # This line must be removed.
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    }
    Copy to Clipboard Toggle word wrap
  4. 编辑该文件后,验证是否如下所示,然后保存更改:
    {
    "avoid_duplicates": false,
    "default_value": "No Unauthorized Access Allowed",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": true,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    }
    Copy to Clipboard Toggle word wrap
  5. 按如下所示使用 PUT 命令,将更改应用到 Satellite 服务器:
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" \
    -X PUT -u $user:$passwd \
    -d @changed_file.json \
    -k "https://satellite6.example.com/api/smart_class_parameters/3
    Copy to Clipboard Toggle word wrap

4.1.4. 将勘误应用到主机或主机集合

您可以将 curl 与 PUT 命令一起使用,以将勘误表应用到主机、主机组或主机集合。以下是 PUT 请求的基本语法:
$ curl -H "Accept:application/json,version=2" \
                   -H "Content-Type:application/json" -X PUT \
                   -u sat_username:sat_password -k \
                   -d json-formatted-data https://satellite6.example.com
Copy to Clipboard Toggle word wrap
您可以浏览内置的 API 文档(https://satellite6.example.com/apidoc/v2.html),以查找用于应用勘误的 URL。您可以使用 Satellite Web UI 来帮助发现搜索查询的格式。导航到 HostsHost Collections,再选择主机集合。前往 Collection ActionsErrata Installation,并注意搜索查询框内容。例如,对于名为 my-collection 的 Host Collection,搜索框包含 host_collection="my-collection"。这将在以下示例中为 Host Collections 使用。

例 4.4. 将勘误应用到主机

在这个示例中,使用批量操作的 API URL /katello/api/hosts/bulk/install_content 来显示简单搜索所需的格式。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X PUT \
       -u sat_username:sat_password -k \
       -d "{\"organization_id\":1,\"included\":{\"search\":\"my-host\"},\"content_type\":\"errata\",\"content\":[\"RHBA-2016:1981\"]}" https://satellite6.example.com/api/v2/hosts/bulk/install_content
Copy to Clipboard Toggle word wrap

例 4.5. 将勘误应用到主机集合

在本例中,请注意传递搜索字符串 host_collection="my-collection" 所需的转义级别,如 Satellite web UI 中所示。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X PUT \
       -u sat_username:sat_password -k \
       -d "{\"organization_id\":1,\"included\":{\"search\":\"host_collection=\\\"my-collection\\\"\"},\"content_type\":\"errata\",\"content\":[\"RHBA-2016:1981\"]}" https://satellite6.example.com/api/v2/hosts/bulk/install_content
Copy to Clipboard Toggle word wrap

4.2. 使用 Ruby 的 API 示例

以下示例演示了如何使用 Ruby 执行各种任务来与 Satellite API 通信。
重要
这些是示例脚本和命令。在使用之前,请确定您仔细查看这些脚本,并替换任何变量、用户名、密码和其他信息,以适应您自己的部署。

4.2.1. 使用 Ruby 创建对象

以下脚本连接到 Red Hat Satellite 6 API 并创建一个新机构,然后在新组织中创建三个环境。如果机构已存在,该脚本将使用该组织。如果组织中已存在任何环境,该脚本将引发错误并退出。
#!/usr/bin/ruby

require 'rest-client'
require 'json'

url = 'https://satellite6.example.com/api/v2/'
katello_url = "#{url}/katello/api/v2/"

$username = 'admin'
$password = 'changeme'

org_name = "MyOrg"
environments = [ "Development", "Testing", "Production" ]

# Performs a GET using the passed URL location
def get_json(location)
  response = RestClient::Request.new(
    :method => :get,
    :url => location,
    :user => $username,
    :password => $password,
    :headers => { :accept => :json,
    :content_type => :json }
  ).execute
  JSON.parse(response.to_str)
end

# Performs a POST and passes the data to the URL location
def post_json(location, json_data)
  response = RestClient::Request.new(
    :method => :post,
    :url => location,
    :user => $username,
    :password => $password,
    :headers => { :accept => :json,
    :content_type => :json},
    :payload => json_data
  ).execute
  JSON.parse(response.to_str)
end

# Creates a hash with ids mapping to names for an array of recods
def id_name_map(records)
  records.inject({}) do |map, record|
    map.update(record['id'] => record['name'])
  end
end

# Get list of existing organizations
orgs = get_json("#{katello_url}/organizations")
org_list = id_name_map(orgs['results'])

if !org_list.has_value?(org_name)
  # If our organization is not found, create it
  puts "Creating organization: \t#{org_name}"
  org_id = post_json("#{katello_url}/organizations", JSON.generate({"name"=> org_name}))["id"]
else
  # Our organization exists, so let's grab it
  org_id = org_list.key(org_name)
  puts "Organization \"#{org_name}\" exists"
end

# Get list of organization's lifecycle environments
envs = get_json("#{katello_url}/organizations/#{org_id}/environments")
env_list = id_name_map(envs['results'])
prior_env_id = env_list.key("Library")

# Exit the script if at least one life cycle environment already exists
environments.each do |e|
  if env_list.has_value?(e)
    puts "ERROR: One of the Environments is not unique to organization"
    exit
  end
end

 # Create life cycle environments
environments.each do |environment|
  puts "Creating environment: \t#{environment}"
  prior_env_id = post_json("#{katello_url}/organizations/#{org_id}/environments", JSON.generate({"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id}))["id"]
end
Copy to Clipboard Toggle word wrap

4.2.2. 使用 Apipie Bindings

apipie 绑定是 apipie 记录的 API 的 Ruby 绑定,它们从 Satellite 获取并缓存 API 定义,然后按需生成 API 调用。使用 apipie 绑定可让您简化 Ruby API 查询。apipie 通常会报告 "appy-pie",到 rhyme with "happy" without the h。
以下示例创建新组织,然后在新组织中创建三个环境。如果机构已存在,该脚本将使用该组织。如果组织中已存在任何环境,该脚本将引发错误并退出。
#!/usr/bin/ruby

require 'apipie-bindings'

org_name = "MyOrg"
environments = [ "Development", "Testing", "Production" ]

# Create an instance of apipie bindings
@api = ApipieBindings::API.new({
  :uri => 'https://satellite6.example.com/',
  :username => 'admin',
  :password => 'changeme',
  :api_version => 2
})

# Performs an API call with default options
def call_api(resource_name, action_name, params = {})
  http_headers = {}
  apipie_options = { :skip_validation => true }
  @api.resource(resource_name).call(action_name, params, http_headers, apipie_options)
end

# Creates a hash with IDs mapping to names for an array of records
def id_name_map(records)
  records.inject({}) do |map, record|
    map.update(record['id'] => record['name'])
  end
end

# Get list of existing organizations
orgs = call_api(:organizations, :index)
org_list = id_name_map(orgs['results'])

if !org_list.has_value?(org_name)
  # If our organization is not found, create it
  puts "Creating organization: \t#{org_name}"
  org_id = call_api(:organizations, :create, {'organization' => { :name => org_name }})['id']
else
  # Our organization exists, so let's grab it
  org_id = org_list.key(org_name)
  puts "Organization \"#{org_name}\" exists"
end

# Get list of organization's life cycle environments
envs = call_api(:lifecycle_environments, :index, {'organization_id' => org_id})
env_list = id_name_map(envs['results'])
prior_env_id = env_list.key("Library")

# Exit the script if at least one life cycle environment already exists
environments.each do |e|
  if env_list.has_value?(e)
    puts "ERROR: One of the Environments is not unique to organization"
    exit
  end
end

 # Create life cycle environments
environments.each do |environment|
  puts "Creating environment: \t#{environment}"
  prior_env_id = call_api(:lifecycle_environments, :create, {"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id })['id']
end
Copy to Clipboard Toggle word wrap

4.3. 使用 Python 的 API 示例

以下示例演示了如何使用 Python 执行各种任务来与 Satellite API 通信。
重要
这些是示例脚本和命令。在使用之前,请确定您仔细查看这些脚本,并替换任何变量、用户名、密码和其他信息,以适应您自己的部署。
以下脚本不使用 SSL 验证与 REST API 交互,此处仅作为演示提供。

4.3.1. 使用 Python 创建对象

以下脚本连接到 Red Hat Satellite 6 API 并创建一个新机构,然后在新组织中创建三个环境。如果机构已存在,该脚本将使用该组织。如果组织中已存在任何环境,该脚本将引发错误并退出。
#!/usr/bin/python

import json
import sys

try:
    import requests
except ImportError:
    print "Please install the python-requests module."
    sys.exit(-1)

# URL to your Satellite 6 server
URL = "https://satellite6.example.com"
# URL for the API to your deployed Satellite 6 server
SAT_API = "%s/katello/api/v2/" % URL
# Katello-specific API
KATELLO_API = "%s/katello/api/" % URL
POST_HEADERS = {'content-type': 'application/json'}
# Default credentials to login to Satellite 6
USERNAME = "admin"
PASSWORD = "changeme"
# Ignore SSL for now
SSL_VERIFY = False

# Name of the organization to be either created or used
ORG_NAME = "MyOrg"
# Name for life cycle environments to be either created or used
ENVIRONMENTS = ["Development", "Testing", "Production"]


def get_json(location):
    """
    Performs a GET using the passed URL location
    """

    r = requests.get(location, auth=(USERNAME, PASSWORD), verify=SSL_VERIFY)

    return r.json()


def post_json(location, json_data):
    """
    Performs a POST and passes the data to the URL location
    """

    result = requests.post(
        location,
        data=json_data,
        auth=(USERNAME, PASSWORD),
        verify=SSL_VERIFY,
        headers=POST_HEADERS)

    return result.json()


def main():
    """
    Main routine that creates or re-uses an organization and
    life cycle environments. If life cycle environments already
    exist, exit out.
    """

    # Check if our organization already exists
    org = get_json(SAT_API + "organizations/" + ORG_NAME)

    # If our organization is not found, create it
    if org.get('error', None):
        org_id = post_json(
            SAT_API + "organizations/",
            json.dumps({"name": ORG_NAME}))["id"]
        print "Creating organization: \t" + ORG_NAME
    else:
        # Our organization exists, so let's grab it
        org_id = org['id']
        print "Organization '%s' exists." % ORG_NAME

    # Now, let's fetch all available life cycle environments for this org...
    envs = get_json(
        SAT_API + "organizations/" + str(org_id) + "/environments/")

    # ... and add them to a dictionary, with respective 'Prior' environment
    prior_env_id = 0
    env_list = {}
    for env in envs['results']:
        env_list[env['id']] = env['name']
        prior_env_id = env['id'] if env['name'] == "Library" else prior_env_id

    # Exit the script if at least one life cycle environment already exists
    if all(environment in env_list.values() for environment in ENVIRONMENTS):
        print "ERROR: One of the Environments is not unique to organization"
        sys.exit(-1)

    # Create life cycle environments
    for environment in ENVIRONMENTS:
        new_env_id = post_json(
            SAT_API + "organizations/" + str(org_id) + "/environments/",
            json.dumps(
                {
                    "name": environment,
                    "organization_id": org_id,
                    "prior": prior_env_id}
            ))["id"]

        print "Creating environment: \t" + environment
        prior_env_id = new_env_id


if __name__ == "__main__":
    main()
Copy to Clipboard Toggle word wrap

4.3.2. 使用 Python 运行查询

您可以创建并运行 Python 脚本,以达到与 第 4.1 节 “使用 Curl 的 API 示例” 中描述的结果相同。以下示例脚本描述了此方法。首先,创建一个名为 sat6api.py 的可执行文件,然后添加以下内容:
#!/usr/bin/python
import json
import sys
try:
    import requests
except ImportError:
    print "Please install the python-requests module."
    sys.exit(-1)

SAT_API = 'https://satellite6.example.com/api/v2/'
USERNAME = "admin"
PASSWORD = "password"
SSL_VERIFY = False   # Ignore SSL for now

def get_json(url):
    # Performs a GET using the passed URL location
    r = requests.get(url, auth=(USERNAME, PASSWORD), verify=SSL_VERIFY)
    return r.json()

def get_results(url):
    jsn = get_json(url)
    if jsn.get('error'):
        print "Error: " + jsn['error']['message']
    else:
        if jsn.get('results'):
            return jsn['results']
        elif 'results' not in jsn:
            return jsn
        else:
            print "No results found"
    return None

def display_all_results(url):
    results = get_results(url)
    if results:
        print json.dumps(results, indent=4, sort_keys=True)

def display_info_for_hosts(url):
    hosts = get_results(url)
    if hosts:
        for host in hosts:
            print "ID: %-10d Name: %-30s IP: %-20s OS: %-30s" % (host['id'], host['name'], host['ip'], host['operatingsystem_name'])

def main():
    host = 'satellite6.example.com'
    print "Displaying all info for host %s ..." % host
    display_all_results(SAT_API + 'hosts/' + host)

    print "Displaying all facts for host %s ..." % host
    display_all_results(SAT_API + 'hosts/%s/facts' % host)

    host_pattern = 'example'
    print "Displaying basic info for hosts matching pattern '%s'..." % host_pattern
    display_info_for_hosts(SAT_API + 'hosts?search=' + host_pattern)

    environment = 'production'
    print "Displaying basic info for hosts in environment %s..." % environment
    display_info_for_hosts(SAT_API + 'hosts?search=environment=' + environment)

    model = 'RHEV Hypervisor'
    print "Displaying basic info for hosts with model name %s..." % model
    display_info_for_hosts(SAT_API + 'hosts?search=model="' + model + '"')

if __name__ == "__main__":
    main()
Copy to Clipboard Toggle word wrap
然后,您可以从命令行运行 ./sat6api.py 来显示结果。

4.4. 使用扩展搜索

您可以使用 Web UI 确定可用于构建查询的其他搜索术语。Satellite 6 支持有范围搜索和 tab 自动完成功能,使此任务变得更加容易。
例如,若要根据其操作系统搜索主机,请导航到 HostsAll Hosts,再单击 Search 文本框中的搜索文本框以显示搜索词的列表。对于操作系统的一个搜索术语是 os_description,您可以在 API 查询中使用,如下所示:
$ curl -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=os_description=\"RHEL+Server+6.6\" | python -m json.tool
  {
    ...
    "results": [
        {
            "name": "satellite6.example.com",
            "operatingsystem_id": 1,
            "operatingsystem_name": "RHEL Server 6.6",
            ...
        }
    ],
    "search": "os_description=\"RHEL Server 6.6\"",
}
Copy to Clipboard Toggle word wrap

4.5. 使用带有 Pagination Control 的搜索

您可以使用 per_pagepage 分页参数来限制 API 搜索查询返回的搜索结果。per_page 参数指定每个页面的数量,以及 page 参数指定根据 per_page 参数计算的页面,要返回。
当您没有指定任何分页参数时,要返回的默认项目数量被设置为 1000,但 per_page 值的默认值是 20,当您指定 page 参数时应用它。

例 4.6. 列出内容视图

本例显示列出每个页面的第三个页面为 10 个结果:
$ curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/content_views?per_page=10&page=3"
Copy to Clipboard Toggle word wrap

例 4.7. 列出激活码

本例显示 ID 为 1 的机构的 Activation Keys,每个页面返回了 30 个键的第二个页面:
$ curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/activation_keys?organization_id=1&per_page=30&page=2"
Copy to Clipboard Toggle word wrap
要获得多个结果页面,您可以使用 for loop 结构。

例 4.8. 返回多个页面

这个示例将第 1 页的 Content Views 的 3 页返回,每个页为 5 个结果:
$ for i in `seq 1 3`; do curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/content_views?per_page=5&page=$i"; done
Copy to Clipboard Toggle word wrap

4.6. 使用生命周期环境

服务器管理指南 的生命周期环境部分中所述,应用程序生命周期被分为不同的生命周期环境,这代表应用程序生命周期的每个阶段。https://access.redhat.com/documentation/zh-cn/red_hat_satellite/6.2/html/server_administration_guide/sect-red_hat_satellite-server_administration_guide-configuring_organizations_locations_and_life_cycle_environments-life_cycle_environments生命周期环境链接到形成 环境路径。要使用 API 创建链接生命周期环境,请使用 prior_id 参数。
您可以参阅 生命周期环境的内置 API 参考,地址为 https://satellite6.example.com/apidoc/v2/lifecycle_environments.html。API 路由包括 /katello/api/environments/katello/api/organizations/:organization_id/environments
您可以列出 Satellite 上针对默认机构 1 的所有当前生命周期环境,如下所示:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X GET \
-u sat_user:sat_password -k \
https://satellite6.example.com/katello/api/organizations/1/environments | python -m json.tool
Copy to Clipboard Toggle word wrap
新安装的 Satellite 会有一个类似如下的部分的输出:
      output omitted
   "description": null,
   "id": 1,
   "label": "Library",
   "library": true,
   "name": "Library",
   "organization": {
        "id": 1,
        "label": "Default_Organization",
        "name": "Default Organization"
   },
   "permissions": {
       "destroy_lifecycle_environments": false,
       "edit_lifecycle_environments": true,
       "promote_or_remove_content_views_to_environments": true,
       "view_lifecycle_environments": true
   },
   "prior": null,
   "successor": null,
      output truncated
Copy to Clipboard Toggle word wrap
在以下流程中,默认的库环境 ID 为 1,用作创建生命周期环境的起点。

过程 4.3. 创建链接的生命周期环境

  1. 选择您要用作起点的现有生命周期环境。使用其 ID 列出环境,本例中为 ID 为 1 的环境:
    $ curl -X GET -s -k -u sat_user:sat_password \
    https://satellite6.example.com/katello/api/environments/1 | python -m json.tool
    	output omitted
       "id": 1,
       "label": "Library",
    	output omitted
        "prior": null,
        "successor": null,
    	output truncated
    Copy to Clipboard Toggle word wrap
  2. 使用 prior 选项设置为 1 创建新的生命周期环境:
    1. 创建包含以下内容的 JSON 文件,如 life-cycle.json,其内容如下: {"organization_id":1,"label":"api-dev","name":"API Development","prior":1}
    2. 按照如下所示输入命令:
      $ curl -H "Accept:application/json,version=2" \
      -H "Content-Type:application/json" -X POST \
      -u sat_user:sat_password -k \
      -d @life-cycle.json \
      https://satellite6.example.com/katello/api/environments \
      | python -m json.tool
            output omitted
          "description": null,
          "id": 2,
          "label": "api-dev",
          "library": false,
          "name": "API Development",
          "organization": {
              "id": 1,
              "label": "Default_Organization",
              "name": "Default Organization"
          },
          "permissions": {
              "destroy_lifecycle_environments": true,
              "edit_lifecycle_environments": true,
              "promote_or_remove_content_views_to_environments": true,
              "view_lifecycle_environments": true
          },
         "prior": {
              "id": 1,
              "name": "Library"
          },
      	output truncated
      Copy to Clipboard Toggle word wrap
    在命令输出中,您可以看到此生命周期环境的 ID 是 2,在此前的生命周期环境为 1。这表明,生命周期环境 12 均链接。创建此环境的后续版本 ID 2 时使用生命周期环境 ID 2。
  3. 使用 prior 选项设置为 2 来创建另一个生命周期环境:
    1. 编辑之前创建的 life-cycle.json,更新 标签name 和 before 值 :{organization_id":1,"label":"api-qa","name":"API QA"," prior ":2}
    2. 按照如下所示输入命令:
      $ curl -H "Accept:application/json,version=2" \
      -H "Content-Type:application/json" -X POST \
      -u sat_user:sat_password -k \
      -d @life-cycle.json \
      https://satellite6.example.com/katello/api/environments \
      | python -m json.tool
            output omitted
         "description": null,
         "id": 3,
          "label": "api-qa",
          "library": false,
          "name": "API QA",
          "organization": {
              "id": 1,
              "label": "Default_Organization",
              "name": "Default Organization"
          },
          "permissions": {
              "destroy_lifecycle_environments": true,
              "edit_lifecycle_environments": true,
              "promote_or_remove_content_views_to_environments": true,
              "view_lifecycle_environments": true
          },
         "prior": {
              "id": 2,
              "name": "API Development"
          },
          "successor": null,
      	output truncated
      Copy to Clipboard Toggle word wrap
    在命令输出中,您可以看到此生命周期环境的 ID 是 3,在此前的生命周期环境为 2。这表明,生命周期环境 23 均链接。
更新生命周期环境
可以使用 PUT 命令更新生命周期环境。例如:
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_user:sat_password -k \
 -d '{"description":"Quality Acceptance Testing"}' \
https://satellite6.example.com/katello/api/environments/3 \
| python -m json.tool
      output omitted
 "description": "Quality Acceptance Testing",
    "id": 3,
    "label": "api-qa",
    "library": false,
    "name": "API QA",
    "organization": {
        "id": 1,
        "label": "Default_Organization",
        "name": "Default Organization"
    },
    "permissions": {
        "destroy_lifecycle_environments": true,
        "edit_lifecycle_environments": true,
        "promote_or_remove_content_views_to_environments": true,
        "view_lifecycle_environments": true
    },
    "prior": {
        "id": 2,
        "name": "API Development"
    },
	output truncated
Copy to Clipboard Toggle word wrap
删除生命周期环境
可以删除生命周期环境,只要没有后续环境。因此,使用以下格式的命令以相反的顺序删除它们:
curl -X DELETE -s -k -u sat_user:sat_password https://satellite6.example.com/katello/api/environments/:id
Copy to Clipboard Toggle word wrap

附录 A. API 响应代码

Red Hat Satellite 6 API 为 API 调用提供 HTTP 响应状态代码。以下代码是 Satellite API 中所有资源的通用代码。
Expand
表 A.1. API 响应代码
响应解释
200 OK 对于成功请求操作:显示、索引、更新或删除(GET、PUT、DELETE 请求)。
201 created 对于成功创建操作(POST 请求)。
301 永久移动 当 Satellite 限制为使用 HTTPS 但尝试使用 HTTP 时,会进行重定向。
400 错误请求 缺少需要的参数,或者搜索查询具有无效的语法。
401 未授权 授权用户失败(例如,不正确的凭证)。
403 Forbidden 用户没有足够的权限来执行操作或读取资源,或者通常不支持该操作。
404 not Found 带有给定 ID 的记录不存在。当请求的记录不存在时,它可能会显示和删除操作,或者在其中一个关联的记录不存在时删除操作。
409 冲突 无法删除记录,因为现有的依赖项(例如,带有主机的主机组)。
415 不支持的 Media Type HTTP 请求的内容类型是 JSON。
422 Unprocessable Entity 由于一些验证错误,创建实体失败。仅适用于创建或更新操作。
500 内部服务器错误 意外的内部服务器错误。
503 服务不可用 服务器没有运行。

附录 B. API 权限列表

Red Hat Satellite 6 API 支持大量操作,许多操作都需要特定的权限。下表列出了 API 权限名称、与这些权限关联的操作以及关联的资源类型。
Expand
表 B.1. API 权限列表
权限名称Actions资源类型
view_activation_keys
  • katello/activation_keys/all
  • katello/activation_keys/index
  • katello/activation_keys/auto_complete_search
  • katello/api/v2/activation_keys/index
  • katello/api/v2/activation_keys/show
  • katello/api/v2/activation_keys/available_host_collections
  • katello/api/v2/activation_keys/available_releases
  • katello/api/v2/activation_keys/product_content
Katello::ActivationKey
create_activation_keys
  • katello/api/v2/activation_keys/create
  • katello/api/v2/activation_keys/copy
Katello::ActivationKey
edit_activation_keys
  • katello/api/v2/activation_keys/update
  • katello/api/v2/activation_keys/content_override
  • katello/api/v2/activation_keys/add_subscriptions
  • katello/api/v2/activation_keys/remove_subscriptions
Katello::ActivationKey
destroy_activation_keys
  • katello/api/v2/activation_keys/destroy
Katello::ActivationKey
logout
  • users/logout
 
view_architectures
  • architectures/index
  • architectures/show
  • architectures/auto_complete_search
  • api/v1/architectures/index
  • api/v1/architectures/show
  • api/v2/architectures/index
  • api/v2/architectures/show
 
create_architectures
  • architectures/new
  • architectures/create
  • api/v1/architectures/create
  • api/v2/architectures/create
 
edit_architectures
  • architectures/edit
  • architectures/update
  • api/v1/architectures/update
  • api/v2/architectures/update
 
destroy_architectures
  • architectures/destroy
  • api/v1/architectures/destroy
  • api/v2/architectures/destroy
 
view_audit_logs
  • audits/index
  • audits/show
  • audits/auto_complete_search
  • api/v1/audits/index
  • api/v1/audits/show
  • api/v2/audits/index
  • api/v2/audits/show
 
view_authenticators
  • auth_source_ldaps/index
  • auth_source_ldaps/show
  • api/v1/auth_source_ldaps/index
  • api/v1/auth_source_ldaps/show
  • api/v2/auth_source_ldaps/index
  • api/v2/auth_source_ldaps/show
 
create_authenticators
  • auth_source_ldaps/new
  • auth_source_ldaps/create
  • api/v1/auth_source_ldaps/create
  • api/v2/auth_source_ldaps/create
 
edit_authenticators
  • auth_source_ldaps/edit
  • auth_source_ldaps/update
  • api/v1/auth_source_ldaps/update
  • api/v2/auth_source_ldaps/update
 
destroy_authenticators
  • auth_source_ldaps/destroy
  • api/v1/auth_source_ldaps/destroy
  • api/v2/auth_source_ldaps/destroy
 
view_bookmarks
  • bookmarks/index
  • bookmarks/show
  • api/v1/bookmarks/index
  • api/v1/bookmarks/show
  • api/v2/bookmarks/index
  • api/v2/bookmarks/show
 
create_bookmarks
  • bookmarks/new
  • bookmarks/create
  • api/v1/bookmarks/new
  • api/v1/bookmarks/create
  • api/v2/bookmarks/new
  • api/v2/bookmarks/create
 
edit_bookmarks
  • bookmarks/edit
  • bookmarks/update
  • api/v1/bookmarks/edit
  • api/v1/bookmarks/update
  • api/v2/bookmarks/edit
  • api/v2/bookmarks/update
 
destroy_bookmarks
  • bookmarks/destroy
  • api/v1/bookmarks/destroy
  • api/v2/bookmarks/destroy
 
download_bootdisk
  • foreman_bootdisk/disks/generic
  • foreman_bootdisk/disks/host
  • foreman_bootdisk/disks/full_host
  • foreman_bootdisk/disks/subnet
  • foreman_bootdisk/disks/help
  • foreman_bootdisk/api/v2/disks/generic
  • foreman_bootdisk/api/v2/disks/host
 
manage_capsule_content
  • katello/api/v2/capsule_content/lifecycle_environments
  • katello/api/v2/capsule_content/available_lifecycle_environments
  • katello/api/v2/capsule_content/add_lifecycle_environment
  • katello/api/v2/capsule_content/remove_lifecycle_environment
  • katello/api/v2/capsule_content/sync
  • katello/api/v2/capsule_content/sync_status
  • katello/api/v2/capsule_content/cancel_sync
SmartProxy
view_capsule_content
  • smart_proxies/pulp_storage
  • smart_proxies/pulp_status
  • smart_proxies/show_with_content
SmartProxy
view_compute_profiles
  • compute_profiles/index
  • compute_profiles/show
  • compute_profiles/auto_complete_search
  • api/v2/compute_profiles/index
  • api/v2/compute_profiles/show
 
create_compute_profiles
  • compute_profiles/new
  • compute_profiles/create
  • api/v2/compute_profiles/create
 
edit_compute_profiles
  • compute_profiles/edit
  • compute_profiles/update
  • api/v2/compute_profiles/update
 
destroy_compute_profiles
  • compute_profiles/destroy
  • api/v2/compute_profiles/destroy
 
view_compute_resources
  • compute_resources/index
  • compute_resources/show
  • compute_resources/auto_complete_search
  • compute_resources/ping
  • compute_resources/available_images
  • api/v1/compute_resources/index
  • api/v1/compute_resources/show
  • api/v2/compute_resources/index
  • api/v2/compute_resources/show
  • api/v2/compute_resources/available_images
  • api/v2/compute_resources/available_clusters
  • api/v2/compute_resources/available_folders
  • api/v2/compute_resources/available_flavors
  • api/v2/compute_resources/available_networks
  • api/v2/compute_resources/available_resource_pools
  • api/v2/compute_resources/available_security_groups
  • api/v2/compute_resources/available_storage_domains
  • api/v2/compute_resources/available_zones
  • api/v2/compute_resources/available_storage_pods
 
create_compute_resources
  • compute_resources/new
  • compute_resources/create
  • compute_resources/test_connection
  • api/v1/compute_resources/create
  • api/v2/compute_resources/create
 
edit_compute_resources
  • compute_resources/edit
  • compute_resources/update
  • compute_resources/test_connection
  • compute_attributes/new
  • compute_attributes/create
  • compute_attributes/edit
  • compute_attributes/update
  • api/v1/compute_resources/update
  • api/v2/compute_resources/update
  • api/v2/compute_attributes/create
  • api/v2/compute_attributes/update
 
destroy_compute_resources
  • compute_resources/destroy
  • api/v1/compute_resources/destroy
  • api/v2/compute_resources/destroy
 
view_compute_resources_vms
  • compute_resources_vms/index
  • compute_resources_vms/show
 
create_compute_resources_vms
  • compute_resources_vms/new
  • compute_resources_vms/create
 
edit_compute_resources_vms
  • compute_resources_vms/edit
  • compute_resources_vms/update
 
destroy_compute_resources_vms
  • compute_resources_vms/destroy
 
power_compute_resources_vms
  • compute_resources_vms/power
  • compute_resources_vms/pause
 
console_compute_resources_vms
  • compute_resources_vms/console
 
view_config_groups
  • config_groups/index
  • config_groups/auto_complete_search
  • api/v2/config_groups/index
  • api/v2/config_groups/show
 
create_config_groups
  • config_groups/new
  • config_groups/create
  • api/v2/config_groups/create
 
edit_config_groups
  • config_groups/edit
  • config_groups/update
  • api/v2/config_groups/update
 
destroy_config_groups
  • config_groups/destroy
  • api/v2/config_groups/destroy
 
view_config_reports
  • api/v1/reports/index
  • api/v1/reports/show
  • api/v1/reports/last
  • api/v2/reports/index
  • api/v2/reports/show
  • api/v2/reports/last
  • config_reports/index
  • config_reports/show
  • config_reports/auto_complete_search
  • api/v2/config_reports/index
  • api/v2/config_reports/show
  • api/v2/config_reports/last
 
destroy_config_reports
  • config_reports/destroy
  • api/v1/reports/destroy
  • api/v2/reports/destroy
  • api/v2/config_reports/destroy
 
upload_config_reports
  • api/v2/reports/create
  • api/v2/config_reports/create
 
view_containers
  • containers/index
  • containers/show
  • api/v2/containers/index
  • api/v2/containers/show
  • api/v2/containers/logs
Container
commit_containers
  • containers/commit
Container
create_containers
  • containers/steps/show
  • containers/steps/update
  • containers/new
  • api/v2/containers/create
  • api/v2/containers/power
Container
destroy_containers
  • containers/destroy
  • api/v2/containers/destroy
Container
power_compute_resources_vms
  • containers/power
  • api/v2/containers/create
  • api/v2/containers/power
ComputeResource
view_content_hosts
  • katello/content_hosts/auto_complete_search
  • katello/api/v2/systems/index
  • katello/api/v2/systems/show
  • katello/api/v2/systems/errata
  • katello/api/v2/systems/package_profile
  • katello/api/v2/systems/product_content
  • katello/api/v2/systems/report
  • katello/api/v2/systems/releases
  • katello/api/v2/systems/available_host_collections
  • katello/api/v2/host_collections/systems
Katello::System
create_content_hosts
  • katello/api/v2/systems/create
  • katello/api/rhsm/candlepin_proxies/consumer_create
  • katello/api/rhsm/candlepin_proxies/consumer_show
Katello::System
edit_content_hosts
  • katello/api/v2/systems/update
  • katello/api/v2/systems/content_override
  • katello/api/rhsm/candlepin_proxies/upload_package_profile
  • katello/api/rhsm/candlepin_proxies/regenerate_identity_certificates
  • katello/api/rhsm/candlepin_proxies/hypervisors_update
Katello::System
destroy_content_hosts
  • katello/api/v2/systems/destroy
Katello::System
view_content_views
  • katello/api/v2/content_views/index
  • katello/api/v2/content_views/show
  • katello/api/v2/content_views/available_puppet_modules
  • katello/api/v2/content_views/available_puppet_module_names
  • katello/api/v2/content_view_filters/index
  • katello/api/v2/content_view_filters/show
  • katello/api/v2/content_view_filter_rules/index
  • katello/api/v2/content_view_filter_rules/show
  • katello/api/v2/content_view_histories/index
  • katello/api/v2/content_view_puppet_modules/index
  • katello/api/v2/content_view_puppet_modules/show
  • katello/api/v2/content_view_versions/index
  • katello/api/v2/content_view_versions/show
  • katello/api/v2/package_groups/index
  • katello/api/v2/package_groups/show
  • katello/api/v2/errata/index
  • katello/api/v2/errata/show
  • katello/api/v2/puppet_modules/index
  • katello/api/v2/puppet_modules/show
  • katello/content_views/auto_complete
  • katello/content_views/auto_complete_search
  • katello/errata/short_details
  • katello/errata/auto_complete
  • katello/packages/details
  • katello/packages/auto_complete
  • katello/products/auto_complete
  • katello/repositories/auto_complete_library
  • katello/content_search/index
  • katello/content_search/products
  • katello/content_search/repos
  • katello/content_search/packages
  • katello/content_search/errata
  • katello/content_search/puppet_modules
  • katello/content_search/packages_items
  • katello/content_search/errata_items
  • katello/content_search/puppet_modules_items
  • katello/content_search/view_packages
  • katello/content_search/view_puppet_modules
  • katello/content_search/repo_packages
  • katello/content_search/repo_errata
  • katello/content_search/repo_puppet_modules
  • katello/content_search/repo_compare_errata
  • katello/content_search/repo_compare_packages
  • katello/content_search/repo_compare_puppet_modules
  • katello/content_search/view_compare_errata
  • katello/content_search/view_compare_packages
  • katello/content_search/view_compare_puppet_modules
  • katello/content_search/views
Katello::ContentView
create_content_views
  • katello/api/v2/content_views/create
  • katello/api/v2/content_views/copy
Katello::ContentView
edit_content_views
  • katello/api/v2/content_views/update
  • katello/api/v2/content_view_filters/create
  • katello/api/v2/content_view_filters/update
  • katello/api/v2/content_view_filters/destroy
  • katello/api/v2/content_view_filter_rules/create
  • katello/api/v2/content_view_filter_rules/update
  • katello/api/v2/content_view_filter_rules/destroy
  • katello/api/v2/content_view_puppet_modules/create
  • katello/api/v2/content_view_puppet_modules/update
  • katello/api/v2/content_view_puppet_modules/destroy
Katello::ContentView
destroy_content_views
  • katello/api/v2/content_views/destroy
  • katello/api/v2/content_views/remove
  • katello/api/v2/content_view_versions/destroy
Katello::ContentView
publish_content_views
  • katello/api/v2/content_views/publish
  • katello/api/v2/content_view_versions/incremental_update
Katello::ContentView
promote_or_remove_content_views
  • katello/api/v2/content_view_versions/promote
  • katello/api/v2/content_views/remove_from_environment
  • katello/api/v2/content_views/remove
Katello::ContentView
export_content_views
  • katello/api/v2/content_view_versions/export
Katello::ContentView
access_dashboard
  • dashboard/index
  • dashboard/save_positions
  • dashboard/reset_default
  • dashboard/create
  • dashboard/destroy
  • api/v1/dashboard/index
  • api/v2/dashboard/index
 
view_discovered_hosts
  • discovered_hosts/index
  • discovered_hosts/show
  • discovered_hosts/auto_complete_search
  • api/v2/discovered_hosts/index
  • api/v2/discovered_hosts/show
主机
submit_discovered_hosts
  • api/v2/discovered_hosts/facts
  • api/v2/discovered_hosts/create
主机
auto_provision_discovered_hosts
  • discovered_hosts/auto_provision
  • discovered_hosts/auto_provision_all
  • api/v2/discovered_hosts/auto_provision
  • api/v2/discovered_hosts/auto_provision_all
主机
provision_discovered_hosts
  • discovered_hosts/edit
  • discovered_hosts/update
  • api/v2/discovered_hosts/update
主机
edit_discovered_hosts
  • discovered_hosts/update_multiple_location
  • discovered_hosts/select_multiple_organization
  • discovered_hosts/update_multiple_organization
  • discovered_hosts/select_multiple_location
  • discovered_hosts/refresh_facts
  • discovered_hosts/reboot
  • discovered_hosts/reboot_all
  • api/v2/discovered_hosts/refresh_facts
  • api/v2/discovered_hosts/reboot
  • api/v2/discovered_hosts/reboot_all
主机
destroy_discovered_hosts
  • discovered_hosts/destroy
  • discovered_hosts/submit_multiple_destroy
  • discovered_hosts/multiple_destroy
  • api/v2/discovered_hosts/destroy
主机
view_discovery_rules
  • discovery_rules/index
  • discovery_rules/show
  • discovery_rules/auto_complete_search
  • api/v2/discovery_rules/index
  • api/v2/discovery_rules/show
DiscoveryRule
create_discovery_rules
  • discovery_rules/new
  • discovery_rules/create
  • api/v2/discovery_rules/create
DiscoveryRule
edit_discovery_rules
  • discovery_rules/edit
  • discovery_rules/update
  • discovery_rules/enable
  • discovery_rules/disable
  • api/v2/discovery_rules/create
  • api/v2/discovery_rules/update
DiscoveryRule
execute_discovery_rules
  • discovery_rules/auto_provision
  • discovery_rules/auto_provision_all
  • api/v2/discovery_rules/auto_provision
  • api/v2/discovery_rules/auto_provision_all
DiscoveryRule
destroy_discovery_rules
  • discovery_rules/destroy
  • api/v2/discovery_rules/destroy
DiscoveryRule
view_domains
  • domains/index
  • domains/show
  • domains/auto_complete_search
  • api/v1/domains/index
  • api/v1/domains/show
  • api/v2/domains/index
  • api/v2/domains/show
  • api/v2/parameters/index
  • api/v2/parameters/show
 
create_domains
  • domains/new
  • domains/create
  • api/v1/domains/create
  • api/v2/domains/create
 
edit_domains
  • domains/edit
  • domains/update
  • api/v1/domains/update
  • api/v2/domains/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
 
destroy_domains
  • domains/destroy
  • api/v1/domains/destroy
  • api/v2/domains/destroy
 
view_environments
  • environments/index
  • environments/show
  • environments/auto_complete_search
  • api/v1/environments/index
  • api/v1/environments/show
  • api/v2/environments/index
  • api/v2/environments/show
 
create_environments
  • environments/new
  • environments/create
  • api/v1/environments/create
  • api/v2/environments/create
 
edit_environments
  • environments/edit
  • environments/update
  • api/v1/environments/update
  • api/v2/environments/update
 
destroy_environments
  • environments/destroy
  • api/v1/environments/destroy
  • api/v2/environments/destroy
 
import_environments
  • environments/import_environments
  • environments/obsolete_and_new
  • api/v1/environments/import_puppetclasses
  • api/v2/environments/import_puppetclasses
  • api/v1/smart_proxies/import_puppetclasses
  • api/v2/smart_proxies/import_puppetclasses
 
view_external_usergroups
  • external_usergroups/index
  • external_usergroups/show
  • api/v2/external_usergroups/index
  • api/v2/external_usergroups/show
 
create_external_usergroups
  • external_usergroups/new
  • external_usergroups/create
  • api/v2/external_usergroups/new
  • api/v2/external_usergroups/create
 
edit_external_usergroups
  • external_usergroups/edit
  • external_usergroups/update
  • external_usergroups/refresh
  • api/v2/external_usergroups/update
  • api/v2/external_usergroups/refresh
 
destroy_external_usergroups
  • external_usergroups/destroy
  • api/v2/external_usergroups/destroy
 
view_external_variables
  • lookup_keys/index
  • lookup_keys/show
  • lookup_keys/auto_complete_search
  • puppetclass_lookup_keys/index
  • puppetclass_lookup_keys/show
  • puppetclass_lookup_keys/auto_complete_search
  • variable_lookup_keys/index
  • variable_lookup_keys/show
  • variable_lookup_keys/auto_complete_search
  • lookup_values/index
  • api/v1/lookup_keys/index
  • api/v1/lookup_keys/show
  • api/v2/smart_variables/index
  • api/v2/smart_variables/show
  • api/v2/smart_class_parameters/index
  • api/v2/smart_class_parameters/show
  • api/v2/override_values/index
  • api/v2/override_values/show
 
create_external_variables
  • lookup_keys/new
  • lookup_keys/create
  • puppetclass_lookup_keys/new
  • puppetclass_lookup_keys/create
  • variable_lookup_keys/new
  • variable_lookup_keys/create
  • lookup_values/create
  • api/v1/lookup_keys/create
  • api/v2/smart_variables/create
  • api/v2/smart_class_parameters/create
  • api/v2/override_values/create
 
edit_external_variables
  • lookup_keys/edit
  • lookup_keys/update
  • puppetclass_lookup_keys/edit
  • puppetclass_lookup_keys/update
  • variable_lookup_keys/edit
  • variable_lookup_keys/update
  • lookup_values/create
  • lookup_values/update
  • lookup_values/destroy
  • api/v1/lookup_keys/update
  • api/v2/smart_variables/update
  • api/v2/smart_class_parameters/update
  • api/v2/override_values/create
  • api/v2/override_values/update
  • api/v2/override_values/destroy
 
destroy_external_variables
  • lookup_keys/destroy
  • puppetclass_lookup_keys/destroy
  • variable_lookup_keys/destroy
  • lookup_values/destroy
  • api/v1/lookup_keys/destroy
  • api/v2/smart_variables/destroy
  • api/v2/smart_class_parameters/destroy
  • api/v2/override_values/create
  • api/v2/override_values/update
  • api/v2/override_values/destroy
 
view_facts
  • facts/index
  • facts/show
  • fact_values/index
  • fact_values/show
  • fact_values/auto_complete_search
  • api/v1/fact_values/index
  • api/v1/fact_values/show
  • api/v2/fact_values/index
  • api/v2/fact_values/show
 
upload_facts
  • api/v2/hosts/facts
 
view_filters
  • filters/index
  • filters/auto_complete_search
  • api/v2/filters/index
  • api/v2/filters/show
 
create_filters
  • filters/new
  • filters/create
  • api/v2/filters/create
 
edit_filters
  • filters/edit
  • filters/update
  • permissions/index
  • api/v2/filters/update
  • api/v2/permissions/index
  • api/v2/permissions/show
  • api/v2/permissions/resource_types
 
destroy_filters
  • filters/destroy
  • api/v2/filters/destroy
 
view_arf_reports
  • arf_reports/index
  • arf_reports/show
  • arf_reports/parse_html
  • arf_reports/show_html
  • arf_reports/parse_bzip
  • arf_reports/auto_complete_search
  • api/v2/compliance/arf_reports/index
  • api/v2/compliance/arf_reports/show
  • compliance_hosts/show
 
destroy_arf_reports
  • arf_reports/destroy
  • arf_reports/delete_multiple
  • arf_reports/submit_delete_multiple
  • api/v2/compliance/arf_reports/destroy
 
create_arf_reports
  • api/v2/compliance/arf_reports/create
 
view_policies
  • policies/index
  • policies/show
  • policies/parse
  • policies/auto_complete_search
  • policy_dashboard/index
  • compliance_dashboard/index
  • api/v2/compliance/policies/index
  • api/v2/compliance/policies/show
  • api/v2/compliance/policies/content
ForemanOpenscap::Policy
edit_policies
  • policies/edit
  • policies/update
  • policies/scap_content_selected
  • api/v2/compliance/policies/update
ForemanOpenscap::Policy
create_policies
  • policies/new
  • policies/create
  • api/v2/compliance/policies/create
ForemanOpenscap::Policy
destroy_policies
  • policies/destroy
  • api/v2/compliance/policies/destroy
ForemanOpenscap::Policy
assign_policies
  • policies/select_multiple_hosts
  • policies/update_multiple_hosts
  • policies/disassociate_multiple_hosts
  • policies/remove_policy_from_multiple_hosts
ForemanOpenscap::Policy
view_scap_contents
  • scap_contents/index
  • scap_contents/show
  • scap_contents/auto_complete_search
  • api/v2/compliance/scap_contents/index
  • api/v2/compliance/scap_contents/show
ForemanOpenscap::ScapContent
view_scap_contents
  • scap_contents/index
  • scap_contents/show
  • scap_contents/auto_complete_search
  • api/v2/compliance/scap_contents/index
  • api/v2/compliance/scap_contents/show
ForemanOpenscap::ScapContent
edit_scap_contents
  • scap_contents/edit
  • scap_contents/update
  • api/v2/compliance/scap_contents/update
ForemanOpenscap::ScapContent
create_scap_contents
  • scap_contents/new
  • scap_contents/create
  • api/v2/compliance/scap_contents/create
ForemanOpenscap::ScapContent
destroy_scap_contents
  • scap_contents/destroy
  • api/v2/compliance/scap_contents/destroy
ForemanOpenscap::ScapContent
edit_hosts
  • hosts/openscap_proxy_changed
主机
edit_hostgroups
  • hostgroups/openscap_proxy_changed
主机
view_job_templates
  • job_templates/index
  • job_templates/show
  • job_templates/revision
  • job_templates/auto_complete_search
  • job_templates/auto_complete_job_category
  • job_templates/preview
  • job_templates/export
  • api/v2/job_templates/index
  • api/v2/job_templates/show
  • api/v2/job_templates/revision
  • api/v2/job_templates/export
  • api/v2/template_inputs/index
  • api/v2/template_inputs/show
  • api/v2/foreign_input_sets/index
  • api/v2/foreign_input_sets/show
JobTemplate
create_job_templates
  • job_templates/new
  • job_templates/create
  • job_templates/clone_template
  • job_templates/import
  • api/v2/job_templates/create
  • api/v2/job_templates/clone
  • api/v2/job_templates/import
JobTemplate
edit_job_templates
  • job_templates/edit
  • job_templates/update
  • api/v2/job_templates/update
  • api/v2/template_inputs/create
  • api/v2/template_inputs/update
  • api/v2/template_inputs/destroy
  • api/v2/foreign_input_sets/create
  • api/v2/foreign_input_sets/update
  • api/v2/foreign_input_sets/destroy
 
edit_job_templates
  • job_templates/edit
  • job_templates/update
  • api/v2/job_templates/update
  • api/v2/template_inputs/create
  • api/v2/template_inputs/update
  • api/v2/template_inputs/destroy
  • api/v2/foreign_input_sets/create
  • api/v2/foreign_input_sets/update
  • api/v2/foreign_input_sets/destroy
 
edit_remote_execution_features
  • remote_execution_features/index
  • remote_execution_features/show
  • remote_execution_features/update
  • api/v2/remote_execution_features/index
  • api/v2/remote_execution_features/show
  • api/v2/remote_execution_features/update
RemoteExecutionFeature
destroy_job_templates
  • job_templates/destroy
  • api/v2/job_templates/destroy
JobTemplate
lock_job_templates
  • job_templates/lock
  • job_templates/unlock
JobTemplate
create_job_invocations
  • job_invocations/new
  • job_invocations/create
  • job_invocations/refresh
  • job_invocations/rerun
  • job_invocations/preview_hosts
  • api/v2/job_invocations/create
JobInvocation
view_job_invocations
  • job_invocations/index
  • job_invocations/show
  • template_invocations/show
  • api/v2/job_invocations/index
  • api/v2/job_invocations/show
  • api/v2/job_invocations/output
JobInvocation
execute_template_invocation TemplateInvocation
filter_autocompletion_for_template_invocation
  • template_invocations/auto_complete_search
  • job_invocations/show
  • template_invocations/index
TemplateInvocation
view_foreman_tasks
  • foreman_tasks/tasks/auto_complete_search
  • foreman_tasks/tasks/sub_tasks
  • foreman_tasks/tasks/index
  • foreman_tasks/tasks/show
  • foreman_tasks/api/tasks/bulk_search
  • foreman_tasks/api/tasks/show
  • foreman_tasks/api/tasks/index
  • foreman_tasks/api/tasks/summary
ForemanTasks::Task
edit_foreman_tasks
  • foreman_tasks/tasks/resume
  • foreman_tasks/tasks/unlock
  • foreman_tasks/tasks/force_unlock
  • foreman_tasks/tasks/cancel_step
  • foreman_tasks/api/tasks/bulk_resume
ForemanTasks::Task
create_recurring_logics ForemanTasks::RecurringLogic
view_recurring_logics
  • foreman_tasks/recurring_logics/index
  • foreman_tasks/recurring_logics/show
  • foreman_tasks/api/recurring_logics/index
  • foreman_tasks/api/recurring_logics/show
ForemanTasks::RecurringLogic
edit_recurring_logics
  • foreman_tasks/recurring_logics/cancel
  • foreman_tasks/api/recurring_logics/cancel
ForemanTasks::RecurringLogic
view_globals
  • common_parameters/index
  • common_parameters/show
  • common_parameters/auto_complete_search
  • api/v1/common_parameters/index
  • api/v1/common_parameters/show
  • api/v2/common_parameters/index
  • api/v2/common_parameters/show
 
create_globals
  • common_parameters/new
  • common_parameters/create
  • api/v1/common_parameters/create
  • api/v2/common_parameters/create
 
edit_globals
  • common_parameters/edit
  • common_parameters/update
  • api/v1/common_parameters/update
  • api/v2/common_parameters/update
 
destroy_globals
  • common_parameters/destroy
  • api/v1/common_parameters/destroy
  • api/v2/common_parameters/destroy
 
view_gpg_keys
  • katello/gpg_keys/all
  • katello/gpg_keys/index
  • katello/gpg_keys/auto_complete_search
  • katello/api/v2/gpg_keys/index
  • katello/api/v2/gpg_keys/show
Katello::GpgKey
create_gpg_keys
  • katello/api/v2/gpg_keys/create
Katello::GpgKey
edit_gpg_keys
  • katello/api/v2/gpg_keys/update
  • katello/api/v2/gpg_keys/content
Katello::GpgKey
destroy_gpg_keys
  • katello/api/v2/gpg_keys/destroy
Katello::GpgKey
view_host_collections
  • katello/api/v2/host_collections/index
  • katello/api/v2/host_collections/show
  • katello/host_collections/auto_complete_search
Katello::HostCollection
create_host_collections
  • katello/api/v2/host_collections/create
  • katello/api/v2/host_collections/copy
Katello::HostCollection
edit_host_collections
  • katello/api/v2/host_collections/update
  • katello/api/v2/host_collections/add_systems
  • katello/api/v2/host_collections/remove_systems
Katello::HostCollection
destroy_host_collections
  • katello/api/v2/host_collections/destroy
Katello::HostCollection
edit_classes
  • host_editing/edit_classes
  • api/v2/host_classes/index
  • api/v2/host_classes/create
  • api/v2/host_classes/destroy
 
create_params
  • host_editing/create_params
  • api/v2/parameters/create
 
edit_params
  • host_editing/edit_params
  • api/v2/parameters/update
 
destroy_params
  • host_editing/destroy_params
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
 
view_hostgroups
  • hostgroups/index
  • hostgroups/show
  • hostgroups/auto_complete_search
  • api/v1/hostgroups/index
  • api/v1/hostgroups/show
  • api/v2/hostgroups/index
  • api/v2/hostgroups/show
 
create_hostgroups
  • hostgroups/new
  • hostgroups/create
  • hostgroups/clone
  • hostgroups/nest
  • hostgroups/process_hostgroup
  • hostgroups/architecture_selected
  • hostgroups/domain_selected
  • hostgroups/environment_selected
  • hostgroups/medium_selected
  • hostgroups/os_selected
  • hostgroups/use_image_selected
  • hostgroups/process_hostgroup
  • hostgroups/puppetclass_parameters
  • host/process_hostgroup
  • puppetclasses/parameters
  • api/v1/hostgroups/create
  • api/v1/hostgroups/clone
  • api/v2/hostgroups/create
  • api/v2/hostgroups/clone
 
edit_hostgroups
  • hostgroups/edit
  • hostgroups/update
  • hostgroups/architecture_selected
  • hostgroups/process_hostgroup
  • hostgroups/architecture_selected
  • hostgroups/domain_selected
  • hostgroups/environment_selected
  • hostgroups/medium_selected
  • hostgroups/os_selected
  • hostgroups/use_image_selected
  • hostgroups/process_hostgroup
  • hostgroups/puppetclass_parameters
  • host/process_hostgroup
  • puppetclasses/parameters
  • api/v1/hostgroups/update
  • api/v2/hostgroups/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
  • api/v2/hostgroup_classes/index
  • api/v2/hostgroup_classes/create
  • api/v2/hostgroup_classes/destroy
 
destroy_hostgroups
  • hostgroups/destroy
  • api/v1/hostgroups/destroy
  • api/v2/hostgroups/destroy
 
view_hosts
  • hosts/index
  • hosts/show
  • hosts/errors
  • hosts/active
  • hosts/out_of_sync
  • hosts/disabled
  • 主机/待处理
  • hosts/vm
  • hosts/externalNodes
  • hosts/pxe_config
  • hosts/storeconfig_klasses
  • hosts/auto_complete_search
  • hosts/bmc
  • hosts/runtime
  • hosts/resources
  • hosts/templates
  • hosts/overview
  • hosts/nics
  • dashboard/OutOfSync
  • dashboard/errors
  • dashboard/active
  • unattended/host_template
  • unattended/hostgroup_template
  • api/v1/hosts/index
  • api/v1/hosts/show
  • api/v1/hosts/status
  • api/v2/hosts/index
  • api/v2/hosts/show
  • api/v2/hosts/status
  • api/v2/hosts/get_status
  • api/v2/hosts/vm_compute_attributes
  • api/v2/hosts/template
  • api/v2/interfaces/index
  • api/v2/interfaces/show
  • locations/mismatches
  • organizations/mismatches
  • hosts/puppet_environment_for_content_view
  • katello/api/v2/host_autocomplete/auto_complete_search
  • katello/api/v2/host_errata/index
  • katello/api/v2/host_errata/show
  • katello/api/v2/host_errata/auto_complete_search
  • katello/api/v2/host_subscriptions/index
  • katello/api/v2/host_subscriptions/events
  • katello/api/v2/host_subscriptions/product_content
  • katello/api/v2/hosts_bulk_actions/installable_errata
  • katello/api/v2/hosts_bulk_actions/available_incremental_updates
  • katello/api/v2/host_packages/index
 
create_hosts
  • hosts/new
  • hosts/create
  • hosts/clone
  • hosts/architecture_selected
  • hosts/compute_resource_selected
  • hosts/domain_selected
  • hosts/environment_selected
  • hosts/hostgroup_or_environment_selected
  • hosts/medium_selected
  • hosts/os_selected
  • hosts/use_image_selected
  • hosts/process_hostgroup
  • hosts/process_taxonomy
  • hosts/current_parameters
  • hosts/puppetclass_parameters
  • hosts/template_used
  • hosts/interfaces
  • compute_resources/cluster_selected
  • compute_resources/template_selected
  • compute_resources/provider_selected
  • compute_resources/resource_pools
  • puppetclasses/parameters
  • subnets/freeip
  • interfaces/new
  • api/v1/hosts/create
  • api/v2/hosts/create
  • api/v2/interfaces/create
  • api/v2/tasks/index
 
edit_hosts
  • hosts/edit
  • hosts/update
  • hosts/multiple_actions
  • hosts/reset_multiple
  • hosts/submit_multiple_enable
  • hosts/select_multiple_hostgroup
  • hosts/select_multiple_environment
  • hosts/submit_multiple_disable
  • hosts/multiple_parameters
  • hosts/multiple_disable
  • hosts/multiple_enable
  • hosts/update_multiple_environment
  • hosts/update_multiple_hostgroup
  • hosts/update_multiple_parameters
  • hosts/toggle_manage
  • hosts/select_multiple_organization
  • hosts/update_multiple_organization
  • hosts/disassociate
  • hosts/multiple_disassociate
  • hosts/update_multiple_disassociate
  • hosts/select_multiple_owner
  • hosts/update_multiple_owner
  • hosts/select_multiple_power_state
  • hosts/update_multiple_power_state
  • hosts/select_multiple_puppet_proxy
  • hosts/update_multiple_puppet_proxy
  • hosts/select_multiple_puppet_ca_proxy
  • hosts/update_multiple_puppet_ca_proxy
  • hosts/select_multiple_location
  • hosts/update_multiple_location
  • hosts/architecture_selected
  • hosts/compute_resource_selected
  • hosts/domain_selected
  • hosts/environment_selected
  • hosts/hostgroup_or_environment_selected
  • hosts/medium_selected
  • hosts/os_selected
  • hosts/use_image_selected
  • hosts/process_hostgroup
  • hosts/process_taxonomy
  • hosts/current_parameters
  • hosts/puppetclass_parameters
  • hosts/template_used
  • hosts/interfaces
  • compute_resources/associate
  • compute_resources/[:cluster_selected, :template_selected, :provider_selected, :resource_pools]
  • compute_resources_vms/associate
  • puppetclasses/parameters
  • subnets/freeip
  • interfaces/new
  • api/v1/hosts/update
  • api/v2/hosts/update
  • api/v2/hosts/disassociate
  • api/v2/interfaces/create
  • api/v2/interfaces/update
  • api/v2/interfaces/destroy
  • api/v2/compute_resources/associate
  • api/v2/hosts/host_collections
  • katello/api/v2/host_errata/apply
  • katello/api/v2/host_packages/install
  • katello/api/v2/host_packages/upgrade
  • katello/api/v2/host_packages/upgrade_all
  • katello/api/v2/host_packages/remove
  • katello/api/v2/host_subscriptions/auto_attach
  • katello/api/v2/host_subscriptions/add_subscriptions
  • katello/api/v2/host_subscriptions/remove_subscriptions
  • katello/api/v2/host_subscriptions/content_override
  • katello/api/v2/hosts_bulk_actions/bulk_add_host_collections
  • katello/api/v2/hosts_bulk_actions/bulk_remove_host_collections
  • katello/api/v2/hosts_bulk_actions/install_content
  • katello/api/v2/hosts_bulk_actions/update_content
  • katello/api/v2/hosts_bulk_actions/remove_content
  • katello/api/v2/hosts_bulk_actions/environment_content_view
 
destroy_hosts
  • hosts/destroy
  • hosts/multiple_actions
  • hosts/reset_multiple
  • hosts/multiple_destroy
  • hosts/submit_multiple_destroy
  • api/v1/hosts/destroy
  • api/v2/hosts/destroy
  • api/v2/interfaces/destroy
  • katello/api/v2/hosts_bulk_actions/destroy_hosts
 
build_hosts
  • hosts/setBuild
  • hosts/cancelBuild
  • hosts/multiple_build
  • hosts/submit_multiple_build
  • hosts/review_before_build
  • hosts/rebuild_config
  • hosts/submit_rebuild_config
  • tasks/show
  • api/v2/tasks/index
  • api/v2/hosts/rebuild_config
 
power_hosts
  • hosts/power
  • api/v2/hosts/power
 
console_hosts
  • hosts/console
 
ipmi_boot
  • hosts/ipmi_boot
  • api/v2/hosts/boot
 
puppetrun_hosts
  • hosts/puppetrun
  • hosts/multiple_puppetrun
  • hosts/update_multiple_puppetrun
  • api/v2/hosts/puppetrun
 
search_repository_image_search
  • image_search/auto_complete_repository_name
  • image_search/auto_complete_image_tag
  • image_search/search_repository
Docker/ImageSearch
view_images
  • images/index
  • images/show
  • images/auto_complete_search
  • api/v1/images/index
  • api/v1/images/show
  • api/v2/images/index
  • api/v2/images/show
 
create_images
  • images/new
  • images/create
  • api/v1/images/create
  • api/v2/images/create
 
edit_images
  • images/edit
  • images/update
  • api/v1/images/update
  • api/v2/images/update
 
destroy_images
  • images/destroy
  • api/v1/images/destroy
  • api/v2/images/destroy
 
view_lifecycle_environments
  • katello/api/v2/environments/index
  • katello/api/v2/environments/show
  • katello/api/v2/environments/paths
  • katello/api/v2/environments/repositories
  • katello/api/rhsm/candlepin_proxies/rhsm_index
  • katello/environments/auto_complete_search
Katello::KTEnvironment
create_lifecycle_environments
  • katello/api/v2/environments/create
Katello::KTEnvironment
edit_lifecycle_environments
  • katello/api/v2/environments/update
Katello::KTEnvironment
destroy_lifecycle_environments
  • katello/api/v2/environments/destroy
Katello::KTEnvironment
promote_or_remove_content_views_to_environments Katello::KTEnvironment
view_locations
  • locations/index
  • locations/show
  • locations/auto_complete_search
  • api/v1/locations/index
  • api/v1/locations/show
  • api/v2/locations/index
  • api/v2/locations/show
 
create_locations
  • locations/new
  • locations/create
  • locations/clone_taxonomy
  • locations/step2
  • locations/nest
  • api/v1/locations/create
  • api/v2/locations/create
 
edit_locations
  • locations/edit
  • locations/update
  • locations/import_mismatches
  • locations/parent_taxonomy_selected
  • api/v1/locations/update
  • api/v2/locations/update
 
destroy_locations
  • locations/destroy
  • api/v1/locations/destroy
  • api/v2/locations/destroy
 
assign_locations
  • locations/assign_all_hosts
  • locations/assign_hosts
  • locations/assign_selected_hosts
 
view_mail_notifications
  • mail_notifications/index
  • mail_notifications/auto_complete_search
  • mail_notifications/show
  • api/v2/mail_notifications/index
  • api/v2/mail_notifications/show
 
view_media
  • media/index
  • media/show
  • media/auto_complete_search
  • api/v1/media/index
  • api/v1/media/show
  • api/v2/media/index
  • api/v2/media/show
 
create_media
  • media/new
  • media/create
  • api/v1/media/create
  • api/v2/media/create
 
edit_media
  • media/edit
  • media/update
  • api/v1/media/update
  • api/v2/media/update
 
destroy_media
  • media/destroy
  • api/v1/media/destroy
  • api/v2/media/destroy
 
view_models
  • models/index
  • models/show
  • models/auto_complete_search
  • api/v1/models/index
  • api/v1/models/show
  • api/v2/models/index
  • api/v2/models/show
 
create_models
  • models/new
  • models/create
  • api/v1/models/create
  • api/v2/models/create
 
edit_models
  • models/edit
  • models/update
  • api/v1/models/update
  • api/v2/models/update
 
destroy_models
  • models/destroy
  • api/v1/models/destroy
  • api/v2/models/destroy
 
view_operatingsystems
  • operatingsystems/index
  • operatingsystems/show
  • operatingsystems/bootfiles
  • operatingsystems/auto_complete_search
  • api/v1/operatingsystems/index
  • api/v1/operatingsystems/show
  • api/v1/operatingsystems/bootfiles
  • api/v2/operatingsystems/index
  • api/v2/operatingsystems/show
  • api/v2/operatingsystems/bootfiles
  • api/v2/os_default_templates/index
  • api/v2/os_default_templates/show
 
create_operatingsystems
  • operatingsystems/new
  • operatingsystems/create
  • api/v1/operatingsystems/create
  • api/v2/operatingsystems/create
  • api/v2/os_default_templates/create
 
edit_operatingsystems
  • operatingsystems/edit
  • operatingsystems/update
  • api/v1/operatingsystems/update
  • api/v2/operatingsystems/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
  • api/v2/os_default_templates/create
  • api/v2/os_default_templates/update
  • api/v2/os_default_templates/destroy
 
destroy_operatingsystems
  • operatingsystems/destroy
  • api/v1/operatingsystems/destroy
  • api/v2/operatingsystems/destroy
  • api/v2/os_default_templates/create
 
view_organizations
  • organizations/index
  • organizations/show
  • organizations/auto_complete_search
  • api/v1/organizations/index
  • api/v1/organizations/show
  • api/v2/organizations/index
  • api/v2/organizations/show
  • katello/api/v2/organizations/index
  • katello/api/v2/organizations/show
  • katello/api/v2/organizations/redhat_provider
  • katello/api/v2/organizations/download_debug_certificate
  • katello/api/v2/tasks/index
 
create_organizations
  • organizations/new
  • organizations/create
  • organizations/clone_taxonomy
  • organizations/step2
  • organizations/nest
  • api/v1/organizations/create
  • api/v2/organizations/create
  • katello/api/v2/organizations/create
 
edit_organizations
  • organizations/edit
  • organizations/update
  • organizations/import_mismatches
  • organizations/parent_taxonomy_selected
  • api/v1/organizations/update
  • api/v2/organizations/update
  • katello/api/v2/organizations/update
  • katello/api/v2/organizations/autoattach_subscriptions
 
destroy_organizations
  • organizations/destroy
  • api/v1/organizations/destroy
  • api/v2/organizations/destroy
  • katello/api/v2/organizations/destroy
 
assign_organizations
  • organizations/assign_all_hosts
  • organizations/assign_hosts
  • organizations/assign_selected_hosts
 
view_ptables
  • ptables/index
  • ptables/show
  • ptables/auto_complete_search
  • ptables/revision
  • ptables/preview
  • api/v1/ptables/index
  • api/v1/ptables/show
  • api/v2/ptables/index
  • api/v2/ptables/show
  • api/v2/ptables/revision
 
create_ptables
  • ptables/new
  • ptables/create
  • ptables/clone_template
  • api/v1/ptables/create
  • api/v2/ptables/create
  • api/v2/ptables/clone
 
edit_ptables
  • ptables/edit
  • ptables/update
  • api/v1/ptables/update
  • api/v2/ptables/update
 
destroy_ptables
  • ptables/destroy
  • api/v1/ptables/destroy
  • api/v2/ptables/destroy
 
lock_ptables
  • ptables/lock
  • ptables/unlock
  • api/v2/ptables/lock
  • api/v2/ptables/unlock
 
view_plugins
  • plugins/index
  • api/v2/plugins/index
 
view_products
  • katello/products/auto_complete
  • katello/products/auto_complete_search
  • katello/api/v2/products/index
  • katello/api/v2/products/show
  • katello/api/v2/repositories/index
  • katello/api/v2/repositories/show
  • katello/api/v2/packages/index
  • katello/api/v2/packages/show
  • katello/api/v2/distributions/index
  • katello/api/v2/distributions/show
  • katello/api/v2/package_groups/index
  • katello/api/v2/package_groups/show
  • katello/api/v2/errata/index
  • katello/api/v2/errata/show
  • katello/api/v2/puppet_modules/index
  • katello/api/v2/puppet_modules/show
  • katello/errata/short_details
  • katello/errata/auto_complete
  • katello/packages/details
  • katello/packages/auto_complete
  • katello/puppet_modules/show
  • katello/repositories/auto_complete_library
  • katello/repositories/repository_types
  • katello/content_search/index
  • katello/content_search/products
  • katello/content_search/repos
  • katello/content_search/packages
  • katello/content_search/errata
  • katello/content_search/puppet_modules
  • katello/content_search/packages_items
  • katello/content_search/errata_items
  • katello/content_search/puppet_modules_items
  • katello/content_search/repo_packages
  • katello/content_search/repo_errata
  • katello/content_search/repo_puppet_modules
  • katello/content_search/repo_compare_errata
  • katello/content_search/repo_compare_packages
  • katello/content_search/repo_compare_puppet_modules
Katello::Product
create_products
  • katello/api/v2/products/create
  • katello/api/v2/repositories/create
Katello::Product
edit_products
  • katello/api/v2/products/update
  • katello/api/v2/repositories/update
  • katello/api/v2/repositories/remove_content
  • katello/api/v2/repositories/import_uploads
  • katello/api/v2/repositories/upload_content
  • katello/api/v2/products_bulk_actions/update_sync_plans
  • katello/api/v2/content_uploads/create
  • katello/api/v2/content_uploads/update
  • katello/api/v2/content_uploads/destroy
  • katello/api/v2/organizations/repo_discover
  • katello/api/v2/organizations/cancel_repo_discover
Katello::Product
destroy_products
  • katello/api/v2/products/destroy
  • katello/api/v2/repositories/destroy
  • katello/api/v2/products_bulk_actions/destroy_products
  • katello/api/v2/repositories_bulk_actions/destroy_repositories
Katello::Product
sync_products
  • katello/api/v2/products/sync
  • katello/api/v2/repositories/sync
  • katello/api/v2/products_bulk_actions/sync_products
  • katello/api/v2/repositories_bulk_actions/sync_repositories
  • katello/api/v2/sync/index
  • katello/api/v2/sync_plans/sync
  • katello/sync_management/index
  • katello/sync_management/sync_status
  • katello/sync_management/product_status
  • katello/sync_management/sync
  • katello/sync_management/destroy
Katello::Product
export_products
  • katello/api/v2/repositories/export
Katello::Product
view_provisioning_templates
  • provisioning_templates/index
  • provisioning_templates/show
  • provisioning_templates/revision
  • provisioning_templates/auto_complete_search
  • provisioning_templates/preview
  • api/v1/config_templates/index
  • api/v1/config_templates/show
  • api/v1/config_templates/revision
  • api/v2/config_templates/index
  • api/v2/config_templates/show
  • api/v2/config_templates/revision
  • api/v2/provisioning_templates/index
  • api/v2/provisioning_templates/show
  • api/v2/provisioning_templates/revision
  • api/v2/template_combinations/index
  • api/v2/template_combinations/show
  • api/v1/template_kinds/index
  • api/v2/template_kinds/index
 
create_provisioning_templates
  • provisioning_templates/new
  • provisioning_templates/create
  • provisioning_templates/clone_template
  • api/v1/config_templates/create
  • api/v2/config_templates/create
  • api/v2/config_templates/clone
  • api/v2/provisioning_templates/create
  • api/v2/provisioning_templates/clone
  • api/v2/template_combinations/create
 
edit_provisioning_templates
  • provisioning_templates/edit
  • provisioning_templates/update
  • api/v1/config_templates/update
  • api/v2/config_templates/update
  • api/v2/provisioning_templates/update
  • api/v2/template_combinations/update
 
destroy_provisioning_templates
  • provisioning_templates/destroy
  • api/v1/config_templates/destroy
  • api/v2/config_templates/destroy
  • api/v2/provisioning_templates/destory
  • api/v2/template_combinations/destory
 
deploy_provisioning_templates
  • provisioning_templates/build_pxe_default
  • api/v1/config_templates/build_pxe_default
  • api/v2/config_templates/build_pxe_default
  • api/v2/provisioning_templates/build_pxe_default
 
lock_provisioning_templates
  • provisioning_templates/lock
  • provisioning_templates/unlock
  • api/v2/config_templates/lock
  • api/v2/config_templates/unlock
  • api/v2/provisioning_templates/lock
  • api/v2/provisioning_templates/unlock
 
user_logout
  • users/logout
 
my_account
  • users/edit
  • katello/api/v2/tasks/show
 
api_status
  • api/v1/home/status
  • api/v2/home/status
 
view_puppetclasses
  • puppetclasses/index
  • puppetclasses/show
  • puppetclasses/auto_complete_search
  • api/v1/puppetclasses/index
  • api/v1/puppetclasses/show
  • api/v2/puppetclasses/index
  • api/v2/puppetclasses/show
  • api/v1/lookup_keys/index
  • api/v1/lookup_keys/show
  • api/v2/smart_variables/index
  • api/v2/smart_variables/show
  • api/v2/smart_class_parameters/index
  • api/v2/smart_class_parameters/show
 
create_puppetclasses
  • puppetclasses/new
  • puppetclasses/create
  • api/v1/puppetclasses/create
  • api/v2/puppetclasses/create
 
edit_puppetclasses
  • puppetclasses/edit
  • puppetclasses/update
  • puppetclasses/override
  • api/v1/puppetclasses/update
  • api/v2/puppetclasses/update
  • api/v1/lookup_keys/create
  • api/v1/lookup_keys/update
  • api/v1/lookup_keys/destroy
  • api/v2/smart_variables/create
  • api/v2/smart_variables/update
  • api/v2/smart_variables/destroy
  • api/v2/smart_class_parameters/create
  • api/v2/smart_class_parameters/update
  • api/v2/smart_class_parameters/destroy
 
destroy_puppetclasses
  • puppetclasses/destroy
  • api/v1/puppetclasses/destroy
  • api/v2/puppetclasses/destroy
 
import_puppetclasses
  • puppetclasses/import_environments
  • puppetclasses/obsolete_and_new
  • api/v1/environments/import_puppetclasses
  • api/v2/environments/import_puppetclasses
  • api/v1/smart_proxies/import_puppetclasses
  • api/v2/smart_proxies/import_puppetclasses
 
view_realms
  • realms/index
  • realms/show
  • realms/auto_complete_search
  • api/v2/realms/index
  • api/v2/realms/show
 
create_realms
  • realms/new
  • realms/create
  • api/v2/realms/create
 
edit_realms
  • realms/edit
  • realms/update
  • api/v2/realms/update
 
destroy_realms
  • realms/destroy
  • api/v2/realms/destroy
 
view_search
  • redhat_access/search/index
 
view_cases
  • redhat_access/cases/index
  • redhat_access/cases/create
 
attachments
  • redhat_access/attachments/index
  • redhat_access/attachments/create
 
配置
  • redhat_access/configuration/index
 
app_root
  • redhat_access/redhat_access/index
 
view_log_viewer
  • redhat_access/logviewer/index
 
logs
  • redhat_access/logs/index
 
rh_telemetry_api
  • redhat_access/api/telemetry_api/proxy
  • redhat_access/api/telemetry_api/connection_status
 
rh_telemetry_view
  • redhat_access/analytics_dashboard/index
 
rh_telemetry_configurations
  • redhat_access/telemetry_configurations/show
  • redhat_access/telemetry_configurations/update
 
view_registries
  • registries/index
  • registries/show
  • api/v2/registries/index
  • api/v2/registries/show
DockerRegistry
view_registries
  • registries/index
  • registries/show
  • api/v2/registries/index
  • api/v2/registries/show
DockerRegistry
create_registries
  • registry/new
  • registries/create
  • registries/update
  • registries/edit
  • api/v2/registries/create
  • api/v2/registries/update
DockerRegistry
destroy_registries
  • registries/destroy
  • api/v2/registries/destroy
DockerRegistry
view_roles
  • roles/index
  • roles/auto_complete_search
  • api/v2/roles/index
  • api/v2/roles/show
 
create_roles
  • roles/new
  • roles/create
  • roles/clone
  • api/v2/roles/create
 
edit_roles
  • roles/edit
  • roles/update
  • api/v2/roles/update
 
destroy_roles
  • roles/destroy
  • api/v2/roles/destroy
 
access_settings
  • home/settings
 
view_smart_proxies
  • smart_proxies/index
  • smart_proxies/ping
  • smart_proxies/auto_complete_search
  • smart_proxies/version
  • smart_proxies/show
  • smart_proxies/plugin_version
  • smart_proxies/tftp_server
  • smart_proxies/puppet_environments
  • smart_proxies/puppet_dashboard
  • smart_proxies/log_pane
  • smart_proxies/failed_modules
  • smart_proxies/errors_card
  • smart_proxies/modules_card
  • api/v1/smart_proxies/index
  • api/v1/smart_proxies/show
  • api/v2/smart_proxies/index
  • api/v2/smart_proxies/show
  • api/v2/smart_proxies/version
  • api/v2/smart_proxies/log
 
create_smart_proxies
  • smart_proxies/new
  • smart_proxies/create
  • api/v1/smart_proxies/create
  • api/v2/smart_proxies/create
 
edit_smart_proxies
  • smart_proxies/edit
  • smart_proxies/update
  • smart_proxies/refresh
  • smart_proxies/expire_logs
  • api/v1/smart_proxies/update
  • api/v1/smart_proxies/refresh
  • api/v2/smart_proxies/update
  • api/v2/smart_proxies/refresh
 
destroy_smart_proxies
  • smart_proxies/destroy
  • api/v1/smart_proxies/destroy
  • api/v2/smart_proxies/destroy
 
view_smart_proxies_autosign
  • autosign/index
  • autosign/show
  • autosign/counts
  • api/v1/autosign/index
  • api/v2/autosign/index
 
create_smart_proxies_autosign
  • autosign/new
  • autosign/create
 
destroy_smart_proxies_autosign
  • autosign/destroy
 
view_smart_proxies_puppetca
  • puppetca/index
  • puppetca/counts
  • puppetca/expiry
 
edit_smart_proxies_puppetca
  • puppetca/update
 
destroy_smart_proxies_puppetca
  • puppetca/destroy
 
view_statistics
  • statistics/index
  • api/v1/statistics/index
  • api/v2/statistics/index
 
view_subnets
  • subnets/index
  • subnets/show
  • subnets/auto_complete_search
  • api/v1/subnets/index
  • api/v1/subnets/show
  • api/v2/subnets/index
  • api/v2/subnets/show
 
create_subnets
  • subnets/new
  • subnets/create
  • api/v1/subnets/create
  • api/v2/subnets/create
 
edit_subnets
  • subnets/edit
  • subnets/update
  • api/v1/subnets/update
  • api/v2/subnets/update
 
destroy_subnets
  • subnets/destroy
  • api/v1/subnets/destroy
  • api/v2/subnets/destroy
 
import_subnets
  • subnets/import
  • subnets/create_multiple
 
view_subscriptions
  • katello/api/v2/subscriptions/index
  • katello/api/v2/subscriptions/show
  • katello/api/v2/subscriptions/available
  • katello/api/v2/subscriptions/manifest_history
  • katello/api/v2/subscriptions/auto_complete_search
  • katello/api/v2/repository_sets/index
  • katello/api/v2/repository_sets/show
  • katello/api/v2/repository_sets/available_repositories
机构(Organization)
attach_subscriptions
  • katello/api/v2/subscriptions/create
机构(Organization)
unattach_subscriptions
  • katello/api/v2/subscriptions/destroy
机构(Organization)
import_manifest
  • katello/products/available_repositories
  • katello/products/toggle_repository
  • katello/providers/redhat_provider
  • katello/providers/redhat_provider_tab
  • katello/api/v2/subscriptions/upload
  • katello/api/v2/subscriptions/refresh_manifest
  • katello/api/v2/repository_sets/enable
  • katello/api/v2/repository_sets/disable
机构(Organization)
delete_manifest
  • katello/api/v2/subscriptions/delete_manifest
机构(Organization)
view_sync_plans
  • katello/sync_plans/all
  • katello/sync_plans/index
  • katello/sync_plans/auto_complete_search
  • katello/api/v2/sync_plans/index
  • katello/api/v2/sync_plans/show
  • katello/api/v2/sync_plans/add_products
  • katello/api/v2/sync_plans/remove_products
  • katello/api/v2/sync_plans/available_products
  • katello/api/v2/products/index
Katello::SyncPlan
create_sync_plans
  • katello/api/v2/sync_plans/create
Katello::SyncPlan
edit_sync_plans
  • katello/api/v2/sync_plans/update
Katello::SyncPlan
destroy_sync_plans
  • katello/api/v2/sync_plans/destroy
Katello::SyncPlan
view_tasks
  • 趋势/显示
 
view_trends
  • 趋势/索引
  • 趋势/显示
 
create_trends
  • 趋势/新
  • trends/create
 
edit_trends
  • 趋势/编辑
  • 趋势/更新
 
destroy_trends
  • 趋势/销毁
 
update_trends
  • 趋势/计数
 
my_organizations
  • katello/api/rhsm/candlepin_proxies/list_owners
 
view_usergroups
  • usergroups/index
  • usergroups/show
  • usergroups/auto_complete_search
  • api/v1/usergroups/index
  • api/v1/usergroups/show
  • api/v2/usergroups/index
  • api/v2/usergroups/show
 
create_usergroups
  • usergroups/new
  • usergroups/create
  • api/v1/usergroups/create
  • api/v2/usergroups/create
 
edit_usergroups
  • usergroups/edit
  • usergroups/update
  • api/v1/usergroups/update
  • api/v2/usergroups/update
 
destroy_usergroups
  • usergroups/destroy
  • api/v1/usergroups/destroy
  • api/v2/usergroups/destroy
 
view_users
  • users/index
  • users/show
  • users/auto_complete_search
  • api/v1/users/index
  • api/v1/users/show
  • api/v2/users/index
  • api/v2/users/show
 
create_users
  • users/new
  • users/create
  • users/auth_source_selected
  • api/v1/users/create
  • api/v2/users/create
 
edit_users
  • users/edit
  • users/update
  • users/auth_source_selected
  • users/test_mail
  • api/v1/users/update
  • api/v2/users/update
 
destroy_users
  • users/destroy
  • api/v1/users/destroy
  • api/v2/users/destroy
 

法律通告

版权所有 © 2017 Red Hat, Inc.
本文档由红帽根据 Creative Commons Attribution-ShareAlike 3.0 Unported License 授权使用。如果您发布了本文档,或者其修改的版本,您必须向 Red Hat, Inc. 提供归属,并提供原始文档的链接。如果文档被修改了,所有红帽商标都必须删除。
作为本文档的许可者,红帽可能会放弃强制制执行 CC-BY-SA 第4d 条款,且不声明该条款在适用条款允许的最大限度内有效。
Red Hat、Red Hat Enterprise Linux、Shadowman 徽标、红帽徽标、JBoss、OpenShift、Fedora、Infinity 徽标和 RHCE 是 Red Hat, Inc. 在美国和其他国家注册的商标。
Linux® 是 Linus Torvalds 在美国和其它国家注册的商标。
Java® 是 Oracle 和/或其附属公司注册的商标。
XFS® 是 Silicon Graphics International Corp. 或其子公司在美国和/或其他国家的商标。
MySQL® 是 MySQL AB 在美国、美国和其他国家注册的商标。
Node.js® 是 Joyent 的官方商标。红帽与官方 Joyent Node.js 开源社区或商业项目没有正式的关系或认可。
OpenStack® Word Mark 和 OpenStack 徽标是 OpenStack Foundation 在美国及其他国家注册的商标/服务标记或商标/服务标记,在 OpenStack Foundation 许可的情况下使用。我们不附属于 OpenStack Foundation 或 OpenStack 社区。
所有其他商标均由其各自所有者所有。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat