8.6. 创建复合内容视图
流程
要创建 Composite 内容视图,请完成以下步骤:
- 在 Satellite Web UI 中,进入到 Content > Content Views,再点 Create New View。
- 在 Name 字段中输入视图的名称。Red Hat Satellite 6 会自动从您输入的名称完成 Label 字段。
- 在 Description 字段中,输入视图的描述。
- 选中 Composite View? 复选框,以创建 Composite Content View。
- 可选: 如果您希望在内容视图重新发布时自动重新发布 Composite Content View,选择 Auto Publish 复选框。
- 点 Save。
- 在 Add Content Views 区域中,选择要添加到 Composite Content View 的内容视图,然后单击 Add Content Views。
- 单击 Publish New Version 以发布 Composite 内容视图。在 Description 字段中,输入描述并单击 Save。
- 单击 Promote,再选择要提升 Composite Content View 的生命周期环境,输入描述,然后单击 Promote Version。
对于 CLI 用户
在创建 Composite Content Views 之前,列出现有内容视图的版本 ID:
hammer content-view version list \ --organization "My_Organization"
# hammer content-view version list \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建一个新的复合内容视图。当将
--auto-publish选项设置为yes时,当内容视图包含的内容视图时会自动重新发布 Composite Content View :Copy to Clipboard Copied! Toggle word wrap Toggle overflow 向 Composite 内容视图添加组件内容视图。您必须包含内容视图版本 ID 并使用--
latest选项。要包括多个组件内容视图到 Composite Content View,请对您要包含的每个内容视图重复此步骤:hammer content-view component add \ --component-content-view-id Content_View_Version_ID \ --latest \ --composite-content-view "Example_Composite_Content_View"
# hammer content-view component add \ --component-content-view-id Content_View_Version_ID \ --latest \ --composite-content-view "Example_Composite_Content_View"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 发布 Composite 内容视图:
hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of Composite Content View" \ --organization "My_Organization"
# hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of Composite Content View" \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在所有环境中提升复合内容视图:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow