10.2. 更新与激活码关联的订阅
您可以使用 Web UI 或 Hammer 命令行工具更改与激活码关联的订阅。
请注意,对激活码的更改仅适用于更改后置备的机器。要更新现有内容主机上的订阅,请参阅 第 4.7 节 “批量更新内容主机订阅”。
流程
要更新与激活码关联的订阅,请完成以下步骤:
- 在 Satellite Web UI 中,进入到 Content > Activation keys,然后点击激活码的名称。
- 点击 Subscriptions 选项卡。
- 要删除订阅,请选中 List/Remove,然后选中要删除的订阅左侧的复选框,然后单击 Remove Selected。
- 要添加订阅,请选择 Add,然后选中要添加的订阅左侧的复选框,然后单击 Add Selected。
- 点 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"
覆盖所需存储库的默认 auto-enable 状态:
# hammer activation-key content-override \ --name "My_Activation_Key" \ --content-label content_label \ --value 1 \ --organization "My_Organization"
对于
--value
选项,输入1
代表启用,输入0
代表禁用。