机型配置命令:machine
列出所有机型配置:ls
入口:
lbg machine ls
概要:
usage: lbg machine ls [-h] [-cpu] [-gpu] [-p PLATFORM] [-s SORT] [-d]
                      [--csv] [--json] [--yaml] [--table] [--noheader]
options:
  -h, --help            show this help message and exit
  -cpu                  only show cpu machine
  -gpu                  only show gpu machine
  -p PLATFORM, --platform PLATFORM
                        show only this platform
  -s SORT, --sort SORT  sort with value, split by ",". default: id
  -d, --descending      sort with descend value
  --csv                 output with csv format
  --json                output with json format
  --yaml                output with yaml format
  --table               output with table format
  --noheader            does not print header information
参数说明:
| 参数 | 缩写 | 说明 | 必填 | 
|---|---|---|---|
| -cpu | - | 只显示cpu机型 | 否 | 
| -gpu | - | 只显示gpu机型 | 否 | 
| --sort | -s | 根据字段排序,可用','分割。默认为id | 否 | 
| --descending | -d | 倒序 | 否 | 
案例:
$ lbg machine ls --yaml # 查看所有配置并输出为yaml格式
$ lbg machine ls -cpu # 查看所有cpu节点
$ lbg machine ls -s cpu,memory -d -p sugon #显示所有曙光(sugon)平台的机型,并以cpu和memory倒序排列