diff --git a/pkg/apis/compute/zz_generated.model.go b/pkg/apis/compute/zz_generated.model.go index d2323cbc33..7ce26d1d9f 100644 --- a/pkg/apis/compute/zz_generated.model.go +++ b/pkg/apis/compute/zz_generated.model.go @@ -916,7 +916,8 @@ type SGuestTemplate struct { // 计费方式 BillingType string `json:"billing_type"` // 其他配置信息 - Content interface{} `json:"content"` + Content interface{} `json:"content"` + LastCheckTime time.Time `json:"last_check_time"` } // SGuestTemplateResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestTemplateResourceBase. @@ -925,20 +926,6 @@ type SGuestTemplateResourceBase struct { GuestTemplateId string `json:"guest_template_id"` } -// SGuestcdrom is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestcdrom. -type SGuestcdrom struct { - Id string `json:"id"` - // = Column(VARCHAR(36, charset='ascii'), primary_key=True) - ImageId string `json:"image_id"` - // Column(VARCHAR(36, charset='ascii'), nullable=True) - Name string `json:"name"` - // Column(VARCHAR(64, charset='ascii'), nullable=True) - Path string `json:"path"` - // Column(VARCHAR(256, charset='ascii'), nullable=True) - Size int64 `json:"size"` - UpdateVersion int `json:"update_version"` -} - // SGuestdisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestdisk. type SGuestdisk struct { SGuestJointsBase @@ -1058,10 +1045,11 @@ type SHost struct { OvnVersion string `json:"ovn_version"` IsBaremetal bool `json:"is_baremetal"` // 是否处于维护状态 - IsMaintenance bool `json:"is_maintenance"` - EnableHealthCheck bool `json:"enable_health_check"` - ResourceType string `json:"resource_type"` - RealExternalId string `json:"real_external_id"` + IsMaintenance bool `json:"is_maintenance"` + LastPingAt time.Time `json:"last_ping_at"` + EnableHealthCheck bool `json:"enable_health_check"` + ResourceType string `json:"resource_type"` + RealExternalId string `json:"real_external_id"` // 是否为导入的宿主机 IsImport bool `json:"is_import"` // 是否允许PXE启动 @@ -1317,9 +1305,12 @@ type SLoadbalancerAgentDeployment struct { // SLoadbalancerAgentParams is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParams. type SLoadbalancerAgentParams struct { - KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"` - HaproxyConfTmpl string `json:"haproxy_conf_tmpl"` - TelegrafConfTmpl string `json:"telegraf_conf_tmpl"` + KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"` + HaproxyConfTmpl string `json:"haproxy_conf_tmpl"` + TelegrafConfTmpl string `json:"telegraf_conf_tmpl"` + Vrrp SLoadbalancerAgentParamsVrrp `json:"vrrp"` + Haproxy SLoadbalancerAgentParamsHaproxy `json:"haproxy"` + Telegraf SLoadbalancerAgentParamsTelegraf `json:"telegraf"` } // SLoadbalancerAgentParamsHaproxy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsHaproxy. @@ -1561,16 +1552,6 @@ type SManagedResourceBase struct { ManagerId string `json:"manager_id"` } -// SNatDEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatDEntry. -type SNatDEntry struct { - SNatEntry - ExternalIP string `json:"external_ip"` - ExternalPort int `json:"external_port"` - InternalIP string `json:"internal_ip"` - InternalPort int `json:"internal_port"` - IpProtocol string `json:"ip_protocol"` -} - // SNatEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatEntry. type SNatEntry struct { apis.SStatusInfrasResourceBase @@ -1601,25 +1582,6 @@ type SNatgatewayResourceBase struct { NatgatewayId string `json:"natgateway_id"` } -// SNetInterface is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetInterface. -type SNetInterface struct { - Mac string `json:"mac"` - // Column(VARCHAR(36, charset='ascii'), primary_key=True) - BaremetalId string `json:"baremetal_id"` - // Column(VARCHAR(36, charset='ascii'), nullable=True) - WireId string `json:"wire_id"` - // Column(VARCHAR(36, charset='ascii'), nullable=True) - Rate int `json:"rate"` - // Column(Integer, nullable=True) # Mbps - NicType string `json:"nic_type"` - // Column(VARCHAR(36, charset='ascii'), nullable=True) - Index byte `json:"index"` - // Column(TINYINT, nullable=True) - LinkUp bool `json:"link_up"` - // Column(Boolean, nullable=True) - Mtu int16 `json:"mtu"` -} - // SNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetwork. type SNetwork struct { apis.SSharableVirtualResourceBase @@ -1825,6 +1787,8 @@ type SScalingAlarm struct { Value float64 `json:"value"` // Real-time cumulate number RealCumulate int `json:"real_cumulate"` + // Last trigger time + LastTriggerTime time.Time `json:"last_trigger_time"` } // SScalingGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroup. @@ -1855,6 +1819,10 @@ type SScalingGroup struct { HealthCheckGov int `json:"health_check_gov"` LoadbalancerBackendPort int `json:"loadbalancer_backend_port"` LoadbalancerBackendWeight int `json:"loadbalancer_backend_weight"` + // Time to allow scale + AllowScaleTime time.Time `json:"allow_scale_time"` + // NextCheckTime descripe the next time to check instance's health + NextCheckTime time.Time `json:"next_check_time"` } // SScalingGroupGuest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupGuest. @@ -2196,7 +2164,13 @@ type STimer struct { WeekDays byte `json:"week_days"` // 0-31 0 is unlimited MonthDays uint32 `json:"month_days"` - IsExpired bool `json:"is_expired"` + // StartTime represent the start time of this timer + StartTime time.Time `json:"start_time"` + // EndTime represent deadline of this timer + EndTime time.Time `json:"end_time"` + // NextTime represent the time timer should bell + NextTime time.Time `json:"next_time"` + IsExpired bool `json:"is_expired"` } // SVCenter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVCenter. diff --git a/pkg/apis/monitor/zz_generated.model.go b/pkg/apis/monitor/zz_generated.model.go index da41782959..056943ec73 100644 --- a/pkg/apis/monitor/zz_generated.model.go +++ b/pkg/apis/monitor/zz_generated.model.go @@ -70,10 +70,11 @@ type SAlertRecord struct { apis.SEnabledResourceBase apis.SStatusStandaloneResourceBase apis.SScopedResourceBase - AlertId string `json:"alert_id"` - Level string `json:"level"` - State string `json:"state"` - EvalData interface{} `json:"eval_data"` + AlertId string `json:"alert_id"` + Level string `json:"level"` + State string `json:"state"` + EvalData interface{} `json:"eval_data"` + AlertRule interface{} `json:"alert_rule"` } // SAlertnotification is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertnotification. diff --git a/pkg/apis/zz_generated.model.go b/pkg/apis/zz_generated.model.go index 0cb1537d40..92b871b62b 100644 --- a/pkg/apis/zz_generated.model.go +++ b/pkg/apis/zz_generated.model.go @@ -228,4 +228,6 @@ type SVirtualResourceBase struct { PendingDeletedAt time.Time `json:"pending_deleted_at"` // 资源是否处于回收站中 PendingDeleted bool `json:"pending_deleted"` + // 资源是否被冻结 + Freezed bool `json:"freezed"` } diff --git a/pkg/cloudcommon/db/virtualresource.go b/pkg/cloudcommon/db/virtualresource.go index ae0463ac4b..1c7cf2e504 100644 --- a/pkg/cloudcommon/db/virtualresource.go +++ b/pkg/cloudcommon/db/virtualresource.go @@ -64,7 +64,7 @@ type SVirtualResourceBase struct { PendingDeletedAt time.Time `json:"pending_deleted_at" list:"user"` // 资源是否处于回收站中 PendingDeleted bool `nullable:"false" default:"false" index:"true" get:"user" list:"user" json:"pending_deleted"` - + // 资源是否被冻结 Freezed bool `nullable:"false" default:"false" get:"user" list:"user" json:"freezed"` }