文档目录

场景封装

概览

基于用户实际生产场景需求,提供场景化的一键全局设置,方便快速将云平台设置为所需状态,提高运维效率。

清单

模板信息清单(GlobalConfigTemplate Inventory)

名字 描述 可选的 可选的参数值 起始支持版本
uuid 请参见 资源属性 3.6.0
name 请参见 资源属性 3.6.0
description 请参见 资源属性 3.6.0
type 模板类型 3.6.0
groupBy 以字段分组,相当于MySQL中的group by关键字。例如groupBy=type 3.6.0
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 3.6.0
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 3.6.0
示例
{
  "inventories": [
    {
      "uuid": "reservedCapacity",
      "name": "scenes1",
      "type": "System",
      "description": "For scenes1"
    }
  ]
}

模板具体配置清单(TemplateConfig Inventory)

名字 描述 可选的 可选的参数值 起始支持版本
category 配置类型 3.6.0
name 请参见 资源属性 3.6.0
defaultValue 模板默认值 3.6.0
templateUuid 所属模板Uuid 3.6.0
value 模板值 3.6.0
groupBy 以字段分组,相当于MySQL中的group by关键字。例如groupBy=type 3.6.0
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 3.6.0
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 3.6.0
示例
{
  "inventories": [
    {
      "templateUuid": "0000111122223333",
      "category": "backupStorage",
      "name": "reservedCapacity",
      "defaultValue": "1G",
      "value": "2G"
    }
  ]
}

操作(Operations)

应用模板(ApplyTemplateConfig)

用户可以使用ApplyTemplateConfig应用模板。 例如:
ApplyTemplateConfig templateUuid=b86c9016b4f24953a9edefb53ca0678c

参数(Parameters)

名字 描述 可选的 可选的参数值 起始支持版本
templateUuid 模板Uuid 3.6.0
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 3.6.0
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 3.6.0
timeout

查询所有模板信息(QueryGlobalConfigTemplate)

管理员可以使用QueryGlobalConfigTemplate查询所有模板信息。例如:
QueryGlobalConfigTemplate

原生域查询(Primitive Fields of Query)

请参见模板信息清单(GlobalConfigTemplate Inventory)

查询模板具体配置(QueryTemplateConfig)

管理员可以使用QueryTemplateConfig查询模板具体配置。例如:
QueryTemplateConfig

原生域查询(Primitive Fields of Query)

请参见模板具体配置清单(TemplateConfig Inventory)

更新模板值(UpdateTemplateConfig)

用户可以使用UpdateTemplateConfig更新模板值。 例如:
UpdateTemplateConfig templateUuid=000011112222 category=vm name=emulateHyperV value=true

参数(Parameters)

名字 描述 可选的 可选的参数值 起始支持版本
templateUuid 模板Uuid 3.6.0
category 对应的GlobalConfig配置类型 3.6.0
name 对应的GlobalConfig配置名称 3.6.0
value 模板值 3.6.0
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 3.6.0
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 3.6.0
timeout

重置模板到初始状态(ResetTemplateConfig)

用户可以使用ResetTemplateConfig重置模板到初始状态。 例如:
ResetTemplateConfig templateUuid=b86c9016b4f24953a9edefb53ca0678c

参数(Parameters)

名字 描述 可选的 可选的参数值 起始支持版本
templateUuid 模板Uuid 3.6.0
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 3.6.0
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 3.6.0
timeout

重置模板配置到默认值(RevertTemplateConfig)

用户可以使用RevertTemplateConfig重置模板配置到默认值。 例如:
RevertTemplateConfig templateUuid=fd5ae067a0b037d2af3a6ec060c4be86

参数(Parameters)

名字 描述 可选的 可选的参数值 起始支持版本
templateUuid 模板UUID 4.6.21
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 4.6.21
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 4.6.21
timeout

标签(Tags)

用户可以使用CreateUserTag resourceType=GlobalConfigVO在用户上创建用户标签。 例如:
CreateUserTag resourceType=GlobalConfigVO tag=Test1 \
resourceUuid=3fd25b9e5b87423bba5612a45c1f5ecc
CLI命令使用手册 | 5.4.12 | ZStack Cloud · ZCF | ZStack 资源中心