liuhaijun 3f5f28d785 add sheduling agent
Change-Id: I89f35fb3984044c57f10727432755012542f9fd8
2023-11-16 10:55:57 +00:00

26 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package nats_msg_model
import "encoding/json"
func UnmarshalUpgradePlan(data []byte) (UpgradePlan, error) {
var r UpgradePlan
err := json.Unmarshal(data, &r)
return r, err
}
func (r *UpgradePlan) Marshal() ([]byte, error) {
return json.Marshal(r)
}
type UpgradePlan struct {
UpgradeTime string `json:"upgradeTime" yaml:"upgradeTime"` //指定升级时间;指定时间升级时有值
UpgradeRule string `json:"upgradeRule" yaml:"upgradeRule"` //升级策略;0:立刻升级1:指定时间升级
DeviceType string `json:"deviceType" yaml:"deviceType"` //设备类型;0:为全部1应用一体机2调度一体机3纳管一体机
Status string `json:"status" yaml:"status"` //字典create创建此条升级规则delete删除升级规则
AgentId string `json:"agentId" yaml:"agentId"` // 关联升级记录,反馈升级结果时用
Option string `json:"option" yaml:"option"` // reboot|upgrade|rollback # 动作
Version string `json:"version" yaml:"version"`
CurrentVerson string `json:"currentVerson" yaml:"currentVerson"`
RID string `json:"rid" yaml:"rid" mapstructure:"rid"`
}