Example #1
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="bk_biz_id",
             type="int",
             schema=IntItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("插件操作信息"),
             key="nodeman_plugin_operate",
             type="object",
             schema=ObjectItemSchema(
                 description=_("插件操作内容"),
                 property_schemas={
                     "nodeman_op_type": StringItemSchema(description=_("插件操作类型")),
                     "nodeman_plugin": StringItemSchema(description=_("插件名称")),
                     "nodeman_plugin_version": StringItemSchema(description=_("插件版本")),
                     "install_config": ArrayItemSchema(
                         description=_("安装操作参数"),
                         item_schema=StringItemSchema(
                             description=_("安装选项,nodeman_op_type值为MAIN_INSTALL_PLUGIN时可填"),
                             enum=["keep_config", "no_restart"],
                         ),
                     ),
                 },
             ),
         ),
         self.InputItem(
             name=_("主机信息"),
             key="nodeman_host_info",
             type="object",
             schema=ObjectItemSchema(
                 description=_("主机信息内容"),
                 property_schemas={
                     "nodeman_host_input_type": StringItemSchema(
                         description=_("主机填写方式"), enum=["host_ip", "host_id"]
                     ),
                     "nodeman_bk_cloud_id": IntItemSchema(description=_("主机所在云区域 ID")),
                     "nodeman_host_ip": StringItemSchema(
                         description=_("主机ip,多个以英文','分隔,nodeman_host_input_type值为host_ip时必填")
                     ),
                     "nodeman_host_id": StringItemSchema(
                         description=_("主机id,多个以英文','分隔,nodeman_host_input_type值为host_id时必填")
                     ),
                 },
             ),
         ),
     ]
Example #2
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("定时作业名称"),
             key="job_cron_name",
             type="string",
             schema=StringItemSchema(description=_("待创建的定时作业名称")),
         ),
         self.InputItem(
             name=_("定时规则"),
             key="job_cron_expression",
             type="string",
             schema=StringItemSchema(description=_("待创建的定时作业定时规则")),
         ),
         self.InputItem(
             name=_("定时作业状态"),
             key="job_cron_status",
             type="int",
             schema=IntItemSchema(description=_("待创建的定时作业状态,暂停(1) 启动(2)"),
                                  enum=[1, 2]),
         ),
     ]
Example #3
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("模块"),
             key="cc_module_select",
             type="array",
             schema=ArrayItemSchema(
                 description=_("模块 ID 列表"),
                 item_schema=IntItemSchema(description=_("模块 ID"))),
         ),
         self.InputItem(
             name=_("模块属性"),
             key="cc_module_property",
             type="string",
             schema=StringItemSchema(description=_("需要修改的模块属性")),
         ),
         self.InputItem(
             name=_("属性值"),
             key="cc_module_prop_value",
             type="string",
             schema=StringItemSchema(description=_("模块属性更新后的值")),
         ),
     ]
Example #4
0
 def outputs_format(self):
     return super(JobLocalContentUploadService, self).outputs_format() + [
         self.OutputItem(
             name=_("JOB全局变量"),
             key="log_outputs",
             type="object",
             schema=ObjectItemSchema(
                 description=_(
                     "输出日志中提取的全局变量,日志中形如 <SOPS_VAR>key:val</SOPS_VAR> 的变量会被提取到 log_outputs['key'] 中,值为 val"
                 ),
                 property_schemas={
                     "name": StringItemSchema(description=_("全局变量名称")),
                     "value": StringItemSchema(description=_("全局变量值")),
                 },
             ),
         ),
         self.OutputItem(
             name=_("JOB任务ID"),
             key="job_inst_id",
             type="int",
             schema=IntItemSchema(description=_("提交的任务在 JOB 平台的实例 ID")),
         ),
         self.OutputItem(
             name=_("JOB任务链接"),
             key="job_inst_url",
             type="string",
             schema=StringItemSchema(description=_("提交的任务在 JOB 平台的 URL")),
         ),
     ]
Example #5
0
class Int(CommonPlainVariable):
    code = 'int'
    name = _(u"整数")
    type = 'general'
    tag = 'int.int'
    form = '%svariables/%s.js' % (settings.STATIC_URL, code)
    schema = IntItemSchema(description=_(u'整数变量'))
Example #6
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("填参方式"),
             key="cc_set_select_method",
             type="string",
             schema=StringItemSchema(description=_("模块填入方式,拓扑(topo),层级文本(text)"), enum=["topo", "text"]),
         ),
         self.InputItem(
             name=_("拓扑-集群列表"),
             key="cc_set_select_topo",
             type="array",
             schema=ArrayItemSchema(
                 description=_("需要清空的集群 ID 列表"), item_schema=IntItemSchema(description=_("集群 ID"))
             ),
         ),
         self.InputItem(
             name=_("文本路径-集群"),
             key="cc_set_select_text",
             type="string",
             schema=StringItemSchema(description=_("集群文本路径,请输入完整路径,从业务拓扑开始,如`业务A>集群B`,多个目标集群用换行分隔")),
         ),
         self.InputItem(
             name=_("服务状态"),
             key="cc_set_status",
             type="string",
             schema=StringItemSchema(description=_("集群服务器状态,开放(1)或关闭(2)"), enum=["1", "2"]),
         ),
     ]
Example #7
0
File: cc.py Project: manlucas/atom
 def inputs_format(self):
     return [
         self.InputItem(
             name=_(u'业务 ID'),
             key='biz_cc_id',
             type='string',
             schema=StringItemSchema(description=_(u'当前操作所属的 CMDB 业务 ID'))),
         self.InputItem(name=_(u'主机内网 IP'),
                        key='cc_host_ip',
                        type='string',
                        schema=StringItemSchema(
                            description=_(u'待转移的主机内网 IP,以 "," 分隔'))),
         self.InputItem(
             name=_(u'模块 ID'),
             key='cc_module_select',
             type='array',
             schema=ArrayItemSchema(
                 description=_(u'转移目标模块 ID 列表'),
                 item_schema=IntItemSchema(description=_(u'模块 ID')))),
         self.InputItem(name=_(u'转移方式'),
                        key='cc_is_increment',
                        type='string',
                        schema=StringItemSchema(
                            description=_(u'主机转移方式,覆盖(false)或追加(true)'),
                            enum=['false', 'true'])),
     ]
Example #8
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("父实例"),
             key="cc_set_parent_select",
             type="array",
             schema=ArrayItemSchema(
                 description=_("父实例 ID 列表"),
                 item_schema=IntItemSchema(description=_("实例 ID"))),
         ),
         self.InputItem(
             name=_("集群信息"),
             key="cc_set_info",
             type="array",
             schema=ArrayItemSchema(
                 description=_("新集群信息对象列表"),
                 item_schema=ObjectItemSchema(description=_("集群信息描述对象"),
                                              property_schemas={}),
             ),
         ),
     ]
Example #9
0
File: cc.py Project: manlucas/atom
 def inputs_format(self):
     return [
         self.InputItem(
             name=_(u'业务 ID'),
             key='biz_cc_id',
             type='string',
             schema=StringItemSchema(description=_(u'当前操作所属的 CMDB 业务 ID'))),
         self.InputItem(
             name=_(u'模块'),
             key='cc_module_select',
             type='array',
             schema=ArrayItemSchema(
                 description=_(u'模块 ID 列表'),
                 item_schema=IntItemSchema(description=_(u'模块 ID')))),
         self.InputItem(
             name=_(u'模块属性'),
             key='cc_module_property',
             type='string',
             schema=StringItemSchema(description=_(u'需要修改的模块属性'))),
         self.InputItem(
             name=_(u'属性值'),
             key='cc_module_prop_value',
             type='string',
             schema=StringItemSchema(description=_(u'模块属性更新后的值')))
     ]
Example #10
0
File: job.py Project: manlucas/atom
 def inputs_format(self):
     return [
         self.InputItem(
             name=_(u'业务 ID'),
             key='biz_cc_id',
             type='string',
             schema=StringItemSchema(description=_(u'当前操作所属的 CMDB 业务 ID'))),
         self.InputItem(
             name=_(u'作业模板 ID'),
             key='job_task_id',
             type='string',
             schema=StringItemSchema(description=_(u'需要执行的 JOB 作业模板 ID'))),
         self.InputItem(
             name=_(u'全局变量'),
             key='job_global_var',
             type='array',
             schema=ArrayItemSchema(
                 description=_(u'作业模板执行所需的全局变量列表'),
                 item_schema=ObjectItemSchema(
                     description=_(u'全局变量'),
                     property_schemas={
                         'type':
                         IntItemSchema(description=_(u'变量类型,字符串(1) IP(2)')),
                         'name':
                         StringItemSchema(description=_(u'变量名')),
                         'value':
                         StringItemSchema(description=_(u'变量值'))
                     })))
     ]
Example #11
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("主机内网 IP"),
             key="cc_host_ip",
             type="string",
             schema=StringItemSchema(
                 description=_("待转移的主机内网 IP,多个用英文逗号 `,` 分隔")),
         ),
         self.InputItem(
             name=_("模块 ID"),
             key="cc_module_select",
             type="array",
             schema=ArrayItemSchema(
                 description=_("转移目标模块 ID 列表"),
                 item_schema=IntItemSchema(description=_("模块 ID"))),
         ),
         self.InputItem(
             name=_("转移方式"),
             key="cc_is_increment",
             type="string",
             schema=StringItemSchema(
                 description=_("主机转移方式,覆盖(false)或追加(true)"),
                 enum=["false", "true"]),
         ),
     ]
Example #12
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_(u'任务ID'),
             key='job_id',
             type='int',
             schema=IntItemSchema(description=_(u'提交的任务的job_id'))),
         self.OutputItem(
             name=_(u'安装成功个数'),
             key='success_num',
             type='int',
             schema=IntItemSchema(description=_(u'任务中安装成功的机器个数'))),
         self.OutputItem(
             name=_(u'安装失败个数'),
             key='fail_num',
             type='int',
             schema=IntItemSchema(description=_(u'任务中安装失败的机器个数'))),
     ]
Example #13
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_("响应内容"), key="data", type="string", schema=StringItemSchema(description=_("解除告警屏蔽的响应内容"))
         ),
         self.OutputItem(
             name=_("状态码"), key="status_code", type="int", schema=IntItemSchema(description=_("解除告警屏蔽的响应状态码"))
         ),
     ]
Example #14
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("通知人员所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("通知方式"),
             key="bk_notify_type",
             type="array",
             schema=ArrayItemSchema(
                 description=_("需要使用的通知方式,从 API 网关自动获取已实现的通知渠道"),
                 item_schema=StringItemSchema(description=_("通知方式"))),
         ),
         self.InputItem(
             name=_("固定分组"),
             key="bk_receiver_group",
             type="array",
             required=False,
             schema=ArrayItemSchema(
                 description=_("需要进行通知的业务人员分组"),
                 enum=["Maintainers", "ProductPm", "Developer", "Tester"],
                 item_schema=StringItemSchema(description=_("通知分组")),
             ),
         ),
         self.InputItem(
             name=_("项目人员分组"),
             key="bk_staff_group",
             type="array",
             required=False,
             schema=ArrayItemSchema(
                 description=_("需要进行通知的项目人员分组ID列表"),
                 item_schema=IntItemSchema(description=_("项目人员分组ID"))),
         ),
         self.InputItem(
             name=_("额外通知人"),
             key="bk_more_receiver",
             type="string",
             schema=StringItemSchema(
                 description=_("除了通知分组外需要额外通知的人员,多个用英文逗号 `,` 分隔")),
         ),
         self.InputItem(name=_("通知标题"),
                        key="bk_notify_title",
                        type="string",
                        schema=StringItemSchema(description=_("通知的标题"))),
         self.InputItem(name=_("通知内容"),
                        key="bk_notify_content",
                        type="string",
                        schema=StringItemSchema(description=_("通知的内容"))),
         self.InputItem(name=_("通知执行人"),
                        key="notify",
                        type="boolean",
                        schema=BooleanItemSchema(description=_("通知执行人名字"))),
     ]
Example #15
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"), key="bk_biz_id", type="int", schema=IntItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("操作对象"),
             key="nodeman_op_target",
             type="object",
             schema=ObjectItemSchema(
                 description=_("需要操作的对象"),
                 property_schemas={
                     "nodeman_bk_cloud_id": StringItemSchema(description=_("云区域 ID")),
                     "nodeman_node_type": StringItemSchema(
                         description=_("节点类型,可以是 AGENT(表示直连区域安装 Agent)、 PROXY(表示安装 Proxy)")
                     ),
                 },
             ),
         ),
         self.InputItem(
             name=_("操作详情"),
             key="nodeman_op_info",
             type="object",
             schema=ObjectItemSchema(
                 description=_("操作内容信息"),
                 property_schemas={
                     "nodeman_ap_id": StringItemSchema(description=_("接入点 ID")),
                     "nodeman_op_type": StringItemSchema(
                         description=_(
                             "任务操作类型,可以是 INSTALL(安装)、  REINSTALL(重装)、" " UNINSTALL (卸载)、 REMOVE (移除)或 UPGRADE (升级)"
                         )
                     ),
                     "nodeman_ip_str": StringItemSchema(description=_("IP(升级,卸载,移除时需要)")),
                     "nodeman_hosts": ArrayItemSchema(
                         description=_("需要被操作的主机信息(安装与重装时需要)"),
                         item_schema=ObjectItemSchema(
                             description=_("主机相关信息"),
                             property_schemas={
                                 "inner_ip": StringItemSchema(description=_("内网 IP")),
                                 "login_ip": StringItemSchema(description=_("主机登录 IP,可以为空,适配复杂网络时填写")),
                                 "data_ip": StringItemSchema(description=_("主机数据 IP,可以为空,适配复杂网络时填写")),
                                 "outer_ip": StringItemSchema(description=_("外网 IP, 可以为空")),
                                 "os_type": StringItemSchema(description=_("操作系统类型,可以是 LINUX, WINDOWS, 或 AIX")),
                                 "port": StringItemSchema(description=_("端口号")),
                                 "account": StringItemSchema(description=_("登录帐号")),
                                 "auth_type": StringItemSchema(description=_("认证方式,可以是 PASSWORD 或 KEY")),
                                 "auth_key": StringItemSchema(description=_("认证密钥,根据认证方式,是登录密码或者登陆密钥")),
                             },
                         ),
                     ),
                 },
             ),
         ),
     ]
Example #16
0
class Int(CommonPlainVariable, SelfExplainVariable):
    code = "int"
    name = _("整数")
    type = "general"
    tag = "int.int"
    form = "%svariables/%s.js" % (settings.STATIC_URL, code)
    schema = IntItemSchema(description=_("整数变量"))

    @classmethod
    def _self_explain(cls, **kwargs) -> List[FieldExplain]:
        return [FieldExplain(key="${KEY}", type=Type.INT, description="用户输入的数值")]
Example #17
0
 def inputs_format(self):
     return [self.InputItem(name=_('业务 ID'),
                            key='biz_cc_id',
                            type='string',
                            schema=StringItemSchema(description=_('当前操作所属的 CMDB 业务 ID'))),
             self.InputItem(name=_('集群列表'),
                            key='cc_set_select',
                            type='array',
                            schema=ArrayItemSchema(description=_('需要清空的集群 ID 列表'),
                                                   item_schema=IntItemSchema(description=_('集群 ID'))))
             ]
Example #18
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("填参方式"),
             key="cc_set_select_method",
             type="string",
             schema=StringItemSchema(description=_("集群填入方式,拓扑(topo),层级文本(text)"), enum=["topo", "text"]),
         ),
         self.InputItem(
             name=_("拓扑-集群列表"),
             key="cc_set_select_topo",
             type="array",
             schema=ArrayItemSchema(description=_("所属集群 ID 列表"), item_schema=IntItemSchema(description=_("集群 ID"))),
         ),
         self.InputItem(
             name=_("文本路径-集群"),
             key="cc_set_select_text",
             type="string",
             schema=StringItemSchema(description=_("集群文本路径,请输入完整路径,从业务拓扑开始,如`业务A>集群B`,多个目标集群用换行分隔")),
         ),
         self.InputItem(
             name=_("创建方式"),
             key="cc_create_method",
             type="string",
             schema=StringItemSchema(
                 description=_("按模板创建(template),直接创建-按服务分类创建(category)"), enum=["template", "category"]
             ),
         ),
         self.InputItem(
             name=_("模块信息列表-直接创建(通过服务分类创建)"),
             key="cc_module_infos_category",
             type="array",
             schema=ArrayItemSchema(
                 description=_("模块信息对象列表"),
                 item_schema=ObjectItemSchema(description=_("模块信息描述对象"), property_schemas={}),
             ),
         ),
         self.InputItem(
             name=_("模块信息列表-按服务模板创建"),
             key="cc_module_infos_template",
             type="array",
             schema=ArrayItemSchema(
                 description=_("模块信息对象列表"),
                 item_schema=ObjectItemSchema(description=_("模块信息描述对象"), property_schemas={}),
             ),
         ),
     ]
Example #19
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_("任务 ID"),
             key="job_id",
             type="int",
             schema=IntItemSchema(description=_("提交的任务的 job_id")),
         ),
         self.OutputItem(
             name=_("安装成功个数"),
             key="success_num",
             type="int",
             schema=IntItemSchema(description=_("任务中安装成功的机器个数")),
         ),
         self.OutputItem(
             name=_("安装失败个数"),
             key="fail_num",
             type="int",
             schema=IntItemSchema(description=_("任务中安装失败的机器个数")),
         ),
     ]
Example #20
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_("响应内容"),
             key="data",
             type="object",
             schema=ObjectItemSchema(description=_("HTTP 请求响应内容,内部结构不固定"), property_schemas={}),
         ),
         self.OutputItem(
             name=_("状态码"), key="status_code", type="int", schema=IntItemSchema(description=_("HTTP 请求响应状态码"))
         ),
     ]
Example #21
0
File: job.py Project: manlucas/atom
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_(u'定时作业ID'),
             key='cron_id',
             type='int',
             schema=IntItemSchema(description=_(u'成功创建的定时作业 ID'))),
         self.OutputItem(
             name=_(u'定时作业状态'),
             key='status',
             type='string',
             schema=StringItemSchema(description=_(u'成功创建的定时作业状态')))
     ]
Example #22
0
File: job.py Project: manlucas/atom
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_(u'JOB任务ID'),
             key='job_inst_id',
             type='int',
             schema=IntItemSchema(description=_(u'提交的任务在 JOB 平台的实例 ID'))),
         self.OutputItem(
             name=_(u'JOB任务链接'),
             key='job_inst_url',
             type='string',
             schema=StringItemSchema(description=_(u'提交的任务在 JOB 平台的 URL')))
     ]
Example #23
0
 def outputs_format(self):
     return [
         self.OutputItem(name=_(u'响应内容'),
                         key='data',
                         type='object',
                         schema=ObjectItemSchema(
                             description=_(u'HTTP 请求响应内容,内部结构不固定'),
                             property_schemas={})),
         self.OutputItem(
             name=_(u'状态码'),
             key='status_code',
             type='int',
             schema=IntItemSchema(description=_(u'HTTP 请求响应状态码')))
     ]
Example #24
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("HTTP 请求方法"),
             key="bk_http_request_method",
             type="string",
             schema=StringItemSchema(description=_("HTTP 请求方法")),
         ),
         self.InputItem(
             name=_("HTTP 请求目标地址"),
             key="bk_http_request_url",
             type="string",
             schema=StringItemSchema(description=_("HTTP 请求目标地址")),
         ),
         self.InputItem(
             name=_("HTTP 请求 header"),
             key="bk_http_request_header",
             type="array",
             schema=ArrayItemSchema(
                 description=_("HTTP 请求头部列表"),
                 item_schema=ObjectItemSchema(
                     description=_("单个头部信息"),
                     property_schemas={
                         "name": StringItemSchema(description=_("请求头名称")),
                         "value": StringItemSchema(description=_("请求头值")),
                     },
                 ),
             ),
         ),
         self.InputItem(
             name=_("HTTP 请求 body"),
             key="bk_http_request_body",
             type="string",
             schema=StringItemSchema(description=_("HTTP 请求 body")),
         ),
         self.InputItem(
             name=_("HTTP 请求超时时间"),
             key="bk_http_request_timeout",
             type="int",
             schema=IntItemSchema(description=_("HTTP 请求超时时间")),
         ),
         self.InputItem(
             name=_("HTTP 请求成功条件"),
             key="bk_http_success_exp",
             type="string",
             schema=StringItemSchema(
                 description=_("根据返回的 JSON 的数据来控制节点的成功或失败, " "使用 resp 引用返回的 JSON 对象,例 resp.result==True")
             ),
         ),
     ]
Example #25
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_("定时作业ID"),
             key="cron_id",
             type="int",
             schema=IntItemSchema(description=_("成功创建的定时作业 ID")),
         ),
         self.OutputItem(
             name=_("定时作业状态"),
             key="status",
             type="string",
             schema=StringItemSchema(description=_("成功创建的定时作业状态")),
         ),
     ]
Example #26
0
 def outputs_format(self):
     return [
         self.OutputItem(
             name=_("JOB任务ID"),
             key="job_inst_id",
             type="int",
             schema=IntItemSchema(description=_("提交的任务在 JOB 平台的实例 ID")),
         ),
         self.OutputItem(
             name=_("JOB任务链接"),
             key="job_inst_url",
             type="string",
             schema=StringItemSchema(description=_("提交的任务在 JOB 平台的 URL")),
         ),
     ]
Example #27
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("填参方式"),
             key="cc_select_set_parent_method",
             type="string",
             schema=StringItemSchema(
                 description=_("父实例填入方式,拓扑(topo),层级文本(text)"),
                 enum=["topo", "text"]),
         ),
         self.InputItem(
             name=_("拓扑-父实例"),
             key="cc_set_parent_select_topo",
             type="array",
             schema=ArrayItemSchema(
                 description=_("父实例 ID 列表"),
                 item_schema=IntItemSchema(description=_("实例 ID"))),
         ),
         self.InputItem(
             name=_("文本路径-父实例"),
             key="cc_set_parent_select_text",
             type="string",
             schema=StringItemSchema(description=_(
                 "父实例文本路径,请输入完整路径,从业务拓扑开始,如`业务A>网络B`,多个父实例用换行分隔")),
         ),
         self.InputItem(
             name=_("集群名称"),
             key="cc_set_name",
             type="string",
             schema=StringItemSchema(description=_("集群名称")),
         ),
         self.InputItem(
             name=_("集群模板"),
             key="cc_set_template",
             type="string",
             schema=StringItemSchema(description=_("集群模板")),
         ),
     ]
Example #28
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("填参方式"),
             key="cc_module_select_method",
             type="string",
             schema=StringItemSchema(
                 description=_("模块填入方式,拓扑(topo),层级文本(text)"),
                 enum=["topo", "text"]),
         ),
         self.InputItem(
             name=_("拓扑-模块"),
             key="cc_module_select_topo",
             type="array",
             schema=ArrayItemSchema(
                 description=_("转移目标模块 ID 列表"),
                 item_schema=IntItemSchema(description=_("模块 ID"))),
         ),
         self.InputItem(
             name=_("文本路径-模块"),
             key="cc_module_select_text",
             type="string",
             schema=StringItemSchema(description=_(
                 "模块文本路径,请输入完整路径,从业务拓扑开始,如`业务A>集群B>模块C`,多个目标模块用换行分隔")),
         ),
         self.InputItem(
             name=_("模块属性"),
             key="cc_module_property",
             type="string",
             schema=StringItemSchema(description=_("需要修改的模块属性")),
         ),
         self.InputItem(
             name=_("属性值"),
             key="cc_module_prop_value",
             type="string",
             schema=StringItemSchema(description=_("模块属性更新后的值")),
         ),
     ]
Example #29
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_("业务 ID"),
             key="biz_cc_id",
             type="string",
             schema=StringItemSchema(description=_("当前操作所属的 CMDB 业务 ID")),
         ),
         self.InputItem(
             name=_("填参方式"),
             key="cc_module_select_method",
             type="string",
             schema=StringItemSchema(description=_("模块填入方式,拓扑(topo),层级文本(text)"), enum=["topo", "text"]),
         ),
         self.InputItem(
             name=_("主机内网 IP"),
             key="cc_host_ip",
             type="string",
             schema=StringItemSchema(description=_("待转移的主机内网 IP,多个用英文逗号 `,` 分隔")),
         ),
         self.InputItem(
             name=_("拓扑-模块"),
             key="cc_module_select_topo",
             type="array",
             schema=ArrayItemSchema(
                 description=_("转移目标模块 ID 列表"), item_schema=IntItemSchema(description=_("模块 ID"))
             ),
         ),
         self.InputItem(
             name=_("文本路径-模块"),
             key="cc_module_select_text",
             type="string",
             schema=StringItemSchema(description=_("请输入完整路径,从业务拓扑开始,如`业务A>集群B>模块C`,多个目标模块用换行分隔")),
         ),
         self.InputItem(
             name=_("转移方式"),
             key="cc_is_increment",
             type="string",
             schema=StringItemSchema(description=_("主机转移方式,覆盖(false)或追加(true)"), enum=["false", "true"]),
         ),
     ]
Example #30
0
 def inputs_format(self):
     return [
         self.InputItem(
             name=_('业务 ID'),
             key='biz_cc_id',
             type='string',
             schema=StringItemSchema(description=_('当前操作所属的 CMDB 业务 ID'))),
         self.InputItem(
             name=_('集群列表'),
             key='cc_set_select',
             type='array',
             schema=ArrayItemSchema(
                 description=_('需要清空的集群 ID 列表'),
                 item_schema=IntItemSchema(description=_('集群 ID')))),
         self.InputItem(name=_('服务状态'),
                        key='cc_set_status',
                        type='string',
                        schema=StringItemSchema(
                            description=_('集群服务器状态,开放(1)或关闭(2)'),
                            enum=['1', '2']))
     ]