8.2. 更新与激活码关联的订阅
使用这个步骤更改与激活码关联的订阅。要使用 CLI 而不是 Satellite Web UI,请参阅 CLI 过程。
请注意,对激活码的更改仅适用于更改后置备的机器。要更新现有内容主机上的订阅,请参阅 第 3.7 节 “在多个主机上更新红帽订阅”。
流程
- 在 Satellite Web UI 中,导航到 Content > Activation keys,再点击激活码的名称。
- 点 Subscriptions 选项卡。
- 要删除订阅,请选择 List/Remove,然后选择要删除的订阅左侧的复选框,然后单击 Remove Selected。
- 要添加订阅,请选择 Add,然后选择要添加的订阅左侧的复选框,然后单击添加所 选项。
- 点 Repository Sets 选项卡,并检查存储库的状态设置。
- 要启用或禁用存储库,可选择存储库的复选框,然后使用 Select Action 列表更改状态。
- 单击 Details 选项卡,选择此激活密钥的 Content View,然后单击 Save。
CLI 过程
列出激活码当前包含的订阅:
# hammer activation-key subscriptions \ --name My_Activation_Key \ --organization "My_Organization"
从激活码中删除所需的订阅:
# hammer activation-key remove-subscription \ --name "My_Activation_Key" \ --subscription-id ff808181533518d50152354246e901aa \ --organization "My_Organization"
对于
--subscription-id
选项,您可以使用 UUID 或订阅 ID。将新订阅附加到激活码中:
# hammer activation-key add-subscription \ --name "My_Activation_Key" \ --subscription-id ff808181533518d50152354246e901aa \ --organization "My_Organization"
对于
--subscription-id
选项,您可以使用 UUID 或订阅 ID。列出与激活码关联的产品内容:
# hammer activation-key product-content \ --name "My_Activation_Key" \ --organization "My_Organization"
覆盖所需存储库的默认自动启用状态:
# hammer activation-key content-override \ --name "My_Activation_Key" \ --content-label content_label \ --value 1 \ --organization "My_Organization"
对于
--value
选项,在启用时输入1
,0
代表 disable。