diff --git a/pkg/apis/compute/loadbalanceracl.go b/pkg/apis/compute/loadbalanceracl.go index 0f5002bc2c..0081940d5e 100644 --- a/pkg/apis/compute/loadbalanceracl.go +++ b/pkg/apis/compute/loadbalanceracl.go @@ -96,13 +96,6 @@ func (self SAclEntries) IsZero() bool { return len(self) == 0 } -func (aclEntries *SLoadbalancerAclEntries) IsZero() bool { - if len([]*SLoadbalancerAclEntry(*aclEntries)) == 0 { - return true - } - return false -} - func (aclEntry *SAclEntry) Validate() error { if strings.Index(aclEntry.Cidr, "/") > 0 { _, ipNet, err := net.ParseCIDR(aclEntry.Cidr) diff --git a/pkg/apis/compute/zz_generated.model.go b/pkg/apis/compute/zz_generated.model.go index c6a862bb9d..47911d496e 100644 --- a/pkg/apis/compute/zz_generated.model.go +++ b/pkg/apis/compute/zz_generated.model.go @@ -81,38 +81,6 @@ type SAppEnvironment struct { InstanceNumber int `json:"instance_number"` } -// SAwsCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAwsCachedLb. -type SAwsCachedLb struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - // 后端服务器 实例ID - BackendId string `json:"backend_id"` - // 本地loadbalancebackend id - CachedBackendGroupId string `json:"cached_backend_group_id"` -} - -// SAwsCachedLbbg is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAwsCachedLbbg. -type SAwsCachedLbbg struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - LoadbalancerId string `json:"loadbalancer_id"` - BackendGroupId string `json:"backend_group_id"` - TargetType string `json:"target_type"` - // 后端服务器类型 - ProtocolType string `json:"protocol_type"` - // 监听协议类型 - Port int `json:"port"` - // 监听端口 - HealthCheckProtocol string `json:"health_check_protocol"` - // 健康检查协议类型 - HealthCheckInterval int `json:"health_check_interval"` -} - // SBackupDiskConfig is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBackupDiskConfig. type SBackupDiskConfig struct { DiskConfig @@ -201,17 +169,16 @@ type SCDNDomain struct { // SCachedLoadbalancerAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCachedLoadbalancerAcl. type SCachedLoadbalancerAcl struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase SLoadbalancerAclResourceBase - ListenerId string `json:"listener_id"` } // SCachedLoadbalancerCertificate is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCachedLoadbalancerCertificate. type SCachedLoadbalancerCertificate struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SManagedResourceBase // 云账号ID @@ -820,9 +787,9 @@ type SElasticcache struct { NetworkId string `json:"network_id"` // 带宽 Bandwidth int `json:"bandwidth"` - // 内网DNS + // 内网DNS PrivateDNS string `json:"private_dns"` - // 内网IP地址 + // 内网IP地址 PrivateIpAddr string `json:"private_ip_addr"` // 内网访问端口 PrivateConnectPort int `json:"private_connect_port"` @@ -1117,7 +1084,8 @@ type SGuest struct { // 秘钥对Id KeypairId string `json:"keypair_id"` // 备份机所在宿主机Id - BackupHostId string `json:"backup_host_id"` + BackupHostId string `json:"backup_host_id"` + BackupGuestStatus string `json:"backup_guest_status"` // 迁移或克隆的速度 ProgressMbps float64 `json:"progress_mbps"` Vga string `json:"vga"` @@ -1201,6 +1169,8 @@ type SGuestdisk struct { Bps int `json:"bps"` Mountpoint string `json:"mountpoint"` Index byte `json:"index"` + // Column(TINYINT(4), nullable=False, default=0) + BootIndex byte `json:"boot_index"` } // SGuestnetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestnetwork. @@ -1396,34 +1366,6 @@ type SHostwire struct { WireId string `json:"wire_id"` } -// SHuaweiCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHuaweiCachedLb. -type SHuaweiCachedLb struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - // 后端服务器 实例ID - BackendId string `json:"backend_id"` - // 本地loadbalancebackend id - CachedBackendGroupId string `json:"cached_backend_group_id"` -} - -// SHuaweiCachedLbbg is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHuaweiCachedLbbg. -type SHuaweiCachedLbbg struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - LoadbalancerId string `json:"loadbalancer_id"` - BackendGroupId string `json:"backend_group_id"` - AssociatedId string `json:"associated_id"` - // 关联ID - AssociatedType string `json:"associated_type"` - // 关联类型, listener || rule - ProtocolType string `json:"protocol_type"` -} - // SI18nResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SI18nResourceBase. type SI18nResourceBase struct { } @@ -1545,6 +1487,10 @@ type SIsolatedDevice struct { Model string `json:"model"` // 云主机Id GuestId string `json:"guest_id"` + // guest network index + NetworkIndex byte `json:"network_index"` + // Nic wire id + WireId string `json:"wire_id"` // # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr` Addr string `json:"addr"` VendorDeviceId string `json:"vendor_device_id"` @@ -1634,6 +1580,7 @@ type SKubeNodePool struct { type SLoadbalancer struct { apis.SVirtualResourceBase apis.SExternalizedResourceBase + SBillingResourceBase SManagedResourceBase SCloudregionResourceBase SDeletePreventableResourceBase @@ -1669,17 +1616,10 @@ type SLoadbalancerAcl struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - AclEntries *SLoadbalancerAclEntries `json:"acl_entries"` - Fingerprint string `json:"fingerprint"` -} - -// SLoadbalancerAclEntries is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAclEntries. -type SLoadbalancerAclEntries []*SLoadbalancerAclEntry - -// SLoadbalancerAclEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAclEntry. -type SLoadbalancerAclEntry struct { - Cidr string `json:"cidr"` - Comment string `json:"comment"` + AclEntries *SAclEntries `json:"acl_entries"` + Fingerprint string `json:"fingerprint"` + // 是否变化 + IsDirty bool `json:"is_dirty"` } // SLoadbalancerAclResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAclResourceBase. @@ -1756,12 +1696,9 @@ type SLoadbalancerAgentParamsVrrp struct { // SLoadbalancerBackend is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerBackend. type SLoadbalancerBackend struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase - // SManagedResourceBase - // SCloudregionResourceBase SLoadbalancerBackendgroupResourceBase - // BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` BackendId string `json:"backend_id"` BackendType string `json:"backend_type"` BackendRole string `json:"backend_role"` @@ -1774,7 +1711,7 @@ type SLoadbalancerBackend struct { // SLoadbalancerBackendGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerBackendGroup. type SLoadbalancerBackendGroup struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SLoadbalancerResourceBase Type string `json:"type"` @@ -1849,9 +1786,8 @@ type SLoadbalancerHTTPRedirect struct { // SLoadbalancerHTTPSListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPSListener. type SLoadbalancerHTTPSListener struct { SLoadbalancerCertificateResourceBase - CachedCertificateId string `json:"cached_certificate_id"` - TLSCipherPolicy string `json:"tls_cipher_policy"` - EnableHttp2 bool `json:"enable_http2"` + TLSCipherPolicy string `json:"tls_cipher_policy"` + EnableHttp2 bool `json:"enable_http2"` } // SLoadbalancerHealthCheck is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHealthCheck. @@ -1865,9 +1801,9 @@ type SLoadbalancerHealthCheck struct { // 健康检查路径 / HealthCheckHttpCode string `json:"health_check_http_code"` HealthCheckRise int `json:"health_check_rise"` - // 健康检查健康阈值 3秒 + // 健康检查健康阈值 3秒 HealthCheckFall int `json:"health_check_fall"` - // 健康检查不健康阈值 15秒 + // 健康检查不健康阈值 15秒 HealthCheckTimeout int `json:"health_check_timeout"` // 健康检查超时时间 10秒 HealthCheckInterval int `json:"health_check_interval"` @@ -1878,7 +1814,7 @@ type SLoadbalancerHealthCheck struct { // SLoadbalancerListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListener. type SLoadbalancerListener struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SLoadbalancerResourceBase ListenerType string `json:"listener_type"` @@ -1897,7 +1833,6 @@ type SLoadbalancerListener struct { AclStatus string `json:"acl_status"` AclType string `json:"acl_type"` SLoadbalancerAclResourceBase - CachedAclId string `json:"cached_acl_id"` SLoadbalancerRateLimiter SLoadbalancerTCPListener SLoadbalancerUDPListener @@ -1916,7 +1851,7 @@ type SLoadbalancerListenerResourceBase struct { // SLoadbalancerListenerRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListenerRule. type SLoadbalancerListenerRule struct { - apis.SVirtualResourceBase + apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SLoadbalancerListenerResourceBase // 默认转发策略,目前只有aws用到其它云都是false @@ -1988,11 +1923,11 @@ type SModelartsPool struct { WorkType string `json:"work_type"` // CPU 架构 x86|xarm CpuArch string `json:"cpu_arch"` + Cidr string `json:"cidr"` } // SModelartsPoolSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SModelartsPoolSku. type SModelartsPoolSku struct { - SManagedResourceBase apis.SEnabledStatusStandaloneResourceBase apis.SExternalizedResourceBase SCloudregionResourceBase @@ -2011,6 +1946,8 @@ type SModelartsPoolSku struct { NpuSize int `json:"npu_size"` // 内存 Memory int `json:"memory"` + // 处理器类型 + ProcessorType string `json:"processor_type"` } // SMongoDB is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMongoDB. @@ -2244,6 +2181,16 @@ type SNetworkInterface struct { AssociateId string `json:"associate_id"` } +// SNetworkIpMac is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkIpMac. +type SNetworkIpMac struct { + apis.SStandaloneAnonResourceBase + NetworkId string `json:"network_id"` + // MAC地址 + MacAddr string `json:"mac_addr"` + // IPv4地址 + IpAddr string `json:"ip_addr"` +} + // SNetworkResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkResourceBase. type SNetworkResourceBase struct { NetworkId string `json:"network_id"` @@ -2265,34 +2212,6 @@ type SNetworkschedtag struct { NetworkId string `json:"network_id"` } -// SOpenstackCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SOpenstackCachedLb. -type SOpenstackCachedLb struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - // 后端服务器 实例ID - BackendId string `json:"backend_id"` - // 本地loadbalancebackend id - CachedBackendGroupId string `json:"cached_backend_group_id"` -} - -// SOpenstackCachedLbbg is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SOpenstackCachedLbbg. -type SOpenstackCachedLbbg struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - LoadbalancerId string `json:"loadbalancer_id"` - BackendGroupId string `json:"backend_group_id"` - AssociatedId string `json:"associated_id"` - // 关联ID - AssociatedType string `json:"associated_type"` - // 关联类型, listener || rule - ProtocolType string `json:"protocol_type"` -} - // SPolicyAssignment is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SPolicyAssignment. type SPolicyAssignment struct { apis.SDomainLevelResourceBase @@ -2325,33 +2244,9 @@ type SProjectMapping struct { // SProjectMappingResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SProjectMappingResourceBase. type SProjectMappingResourceBase struct { - ProjectMappingId string `json:"project_mapping_id"` -} - -// SQcloudCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SQcloudCachedLb. -type SQcloudCachedLb struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - // 后端服务器 实例ID - BackendId string `json:"backend_id"` - // 本地loadbalancebackend id - CachedBackendGroupId string `json:"cached_backend_group_id"` -} - -// SQcloudCachedLbbg is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SQcloudCachedLbbg. -type SQcloudCachedLbbg struct { - apis.SVirtualResourceBase - apis.SExternalizedResourceBase - SManagedResourceBase - SCloudregionResourceBase - LoadbalancerId string `json:"loadbalancer_id"` - BackendGroupId string `json:"backend_group_id"` - AssociatedId string `json:"associated_id"` - // 关联ID - AssociatedType string `json:"associated_type"` + ProjectMappingId string `json:"project_mapping_id"` + EnableProjectSync *bool `json:"enable_project_sync,omitempty"` + EnableResourceSync *bool `json:"enable_resource_sync,omitempty"` } // SReservedip is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SReservedip. @@ -2531,7 +2426,7 @@ type SSchedtag struct { apis.SStandaloneResourceBase apis.SScopedResourceBase DefaultStrategy string `json:"default_strategy"` - // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”) + // Column(VARCHAR(16, charset='ascii'), nullable=True, default='') ResourceType string `json:"resource_type"` } diff --git a/pkg/apis/notify/zz_generated.model.go b/pkg/apis/notify/zz_generated.model.go index f788434f35..0676708e42 100644 --- a/pkg/apis/notify/zz_generated.model.go +++ b/pkg/apis/notify/zz_generated.model.go @@ -80,6 +80,7 @@ type SNotification struct { Message string `json:"message"` ReceivedAt time.Time `json:"received_at"` EventId string `json:"event_id"` + TopicType string `json:"topic_type"` SendTimes int `json:"send_times"` Tag string `json:"tag"` } @@ -155,12 +156,11 @@ type STemplate struct { // STopic is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.STopic. type STopic struct { - apis.SStandaloneResourceBase - apis.SEnabledResourceBase + apis.SEnabledStatusStandaloneResourceBase Type string `json:"type"` Resources uint64 `json:"resources"` Actions uint32 `json:"actions"` - Results byte `json:"results"` + Results *bool `json:"results,omitempty"` AdvanceDays int `json:"advance_days"` WebconsoleDisable *bool `json:"webconsole_disable,omitempty"` }