7.10. 创建复合内容视图
使用这个流程创建复合内容视图。要使用 CLI 而不是 Satellite Web UI,请参阅 CLI 过程。
流程
- 在 Satellite Web UI 中,进入到 Content > Lifecycle > Content Views。
- 单击 Create 内容视图。
- 在 Create content view 窗口中,在 Name 字段中输入视图的名称。Red Hat Satellite 会自动从您输入的名称完成 Label 字段。
- 可选:在 Description 字段中输入视图的描述。
- 在 Type 选项卡上,选择 Composite 内容视图。
- 可选: 如果要重新发布内容视图时自动发布复合内容视图的新版本,请选中 Auto publish 复选框。
- 单击 Create 内容视图。
- 在 内容视图 选项卡上,选择要添加到复合内容视图的内容视图,然后单击 Add 内容视图。
- 在 Add 内容视图 窗口中,选择每个内容视图的版本。
- 可选:如果要自动将内容视图更新至最新版本,请选择 Always update to latest version 复选框。
- 点 Add,然后点 Publish new version。
- 可选:在 Description 字段中输入内容视图的描述。
- 在 Publish 窗口中,设置 Promote 开关,然后选择生命周期环境。
- 单击 Next,然后单击 Finish。
CLI 过程
在创建复合内容视图前,列出现有内容视图的版本 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时,当其包含的内容视图重新发布时,复合内容视图会自动重新发布:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 添加内容视图到复合内容视图。您可以通过其 ID 或其名称来识别内容视图、内容视图版本和命令中的组织。要将多个内容视图添加到复合内容视图,请对您要包含的每个内容视图重复此步骤。
如果为内容视图启用了 Always update to latest version 选项:
hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"
$ hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果您有内容视图禁用 Always update to latest version 选项:
hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"
$ hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
发布复合内容视图:
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