更新时间:2024-01-23 GMT+08:00
分享

修改计算资源

修改计算资源节点。

命令结构

health edit compute-resources  [flags]
表1 参数说明

参数

简写

是否必选

描述

--force

-f

是否强制操作。

--labels

-l

需要添加或删除的标签列表。json数组格式。如:-l "[\"h1\",\"h2\"]"

--node

-n

计算资源节点id

--operation-type

-t

对计算资源的操作:[add-labels \| delete-labels \| stop \| reboot \| start \| schedulable \| non-schedule]。add-labels:添加计算节点标签。delete-labels:删除计算节点标签。stop:停止节点。reboot:重启节点。start:启动节点。schedulable:设置节点可被调度。non-schedule:设置节点不可被调度

命令示例

  • 删除计算节点标签
    health edit  compute-resources  -t delete-labels -l "[\"h1\",\"h2\"]"  -n 9b1727a3-2102-4d92-95b9-7eaa86b398ac
    edit  compute resources using the delete-labels mode is successful
  • 添加计算节点标签
    health edit  compute-resources  -t add-labels -l "[\"h1\",\"h2\"]"  -n 9b1727a3-2102-4d92-95b9-7eaa86b398ac
    the edit  compute-resources using add-labels mode is successful
  • 设置节点可调度
    health edit  compute-resources  -t  schedulable  -n 9b1727a3-2102-4d92-95b9-7eaa86b398ac
    the edit  compute-resources using schedulable mode is successful
  • 停止计算节点
    health edit  compute-resources  -t  stop  -n 9b1727a3-2102-4d92-95b9-7eaa86b398ac
    The stop operation is started successfully...

分享:

    相关文档

    相关产品