diff --git a/pkg/apis/cloudprovider/zz_generated.model.go b/pkg/apis/cloudprovider/zz_generated.model.go index fe54f991f0..882a099b28 100644 --- a/pkg/apis/cloudprovider/zz_generated.model.go +++ b/pkg/apis/cloudprovider/zz_generated.model.go @@ -16,8 +16,16 @@ package cloudprovider // SGeographicInfo is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SGeographicInfo. type SGeographicInfo struct { - Latitude float32 `json:"latitude"` - Longitude float32 `json:"longitude"` - City string `json:"city"` - CountryCode string `json:"country_code"` + // 纬度 + // example: 26.647003 + Latitude float32 `json:"latitude"` + // 经度 + // example: 106.630211 + Longitude float32 `json:"longitude"` + // 城市 + // example: Guiyang + City string `json:"city"` + // 国家代码 + // example: CN + CountryCode string `json:"country_code"` } diff --git a/pkg/apis/compute/zz_generated.model.go b/pkg/apis/compute/zz_generated.model.go index 65d68c98d5..d0e858f3d3 100644 --- a/pkg/apis/compute/zz_generated.model.go +++ b/pkg/apis/compute/zz_generated.model.go @@ -27,8 +27,10 @@ type SAwsCachedLb struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - BackendId string `json:"backend_id"` + BackendServerId string `json:"backend_server_id"` + // 后端服务器 实例ID + BackendId string `json:"backend_id"` + // 本地loadbalancebackend id CachedBackendGroupId string `json:"cached_backend_group_id"` } @@ -38,13 +40,17 @@ type SAwsCachedLbbg struct { 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"` + 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"` + // 健康检查协议类型 + HealthCheckInterval int `json:"health_check_interval"` } // SBaremetalagent is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBaremetalagent. @@ -61,9 +67,13 @@ type SBaremetalagent struct { // SBillingResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBillingResourceBase. type SBillingResourceBase struct { - BillingType string `json:"billing_type"` - ExpiredAt time.Time `json:"expired_at"` - BillingCycle string `json:"billing_cycle"` + // 计费类型, 按量、包年包月 + // example: postpaid + BillingType string `json:"billing_type"` + // 过期时间 + ExpiredAt time.Time `json:"expired_at"` + // 计费周期 + BillingCycle string `json:"billing_cycle"` } // SBucket is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBucket. @@ -88,7 +98,8 @@ type SCachedLoadbalancerAcl struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - AclId string `json:"acl_id"` + AclId string `json:"acl_id"` + // 本地ACL ID ListenerId string `json:"listener_id"` } @@ -97,6 +108,7 @@ type SCachedLoadbalancerCertificate struct { apis.SVirtualResourceBase apis.SExternalizedResourceBase SManagedResourceBase + // 云账号ID SCloudregionResourceBase CertificateId string `json:"certificate_id"` } @@ -105,12 +117,24 @@ type SCachedLoadbalancerCertificate struct { type SCachedimage struct { apis.SStandaloneResourceBase apis.SExternalizedResourceBase - Size int64 `json:"size"` - Info interface{} `json:"info"` - LastSync time.Time `json:"last_sync"` - LastRef time.Time `json:"last_ref"` - RefCount int `json:"ref_count"` - ImageType string `json:"image_type"` + // 镜像大小单位: Byte + // example: 53687091200 + Size int64 `json:"size"` + // 镜像详情信息 + // example: {"deleted":false,"disk_format":"qcow2","id":"img-a6uucnfl","is_public":true,"min_disk":51200,"min_ram":0,"name":"FreeBSD 11.1 64bit","properties":{"os_arch":"x86_64","os_distribution":"FreeBSD","os_type":"FreeBSD","os_version":"11"},"protected":true,"size":53687091200,"status":"active"} + Info interface{} `json:"info"` + // 上此同步时间 + // example: 2020-01-17T05:28:54.000000Z + LastSync time.Time `json:"last_sync"` + // 最近一次缓存引用时间 + // 2020-01-17T05:20:54.000000Z + LastRef time.Time `json:"last_ref"` + // 引用次数 + // example: 0 + RefCount int `json:"ref_count"` + // 镜像类型, system: 公有云镜像, customized: 自定义镜像 + // example: system + ImageType string `json:"image_type"` } // SCloudaccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudaccount. @@ -118,28 +142,59 @@ type SCloudaccount struct { apis.SEnabledStatusStandaloneResourceBase apis.SDomainizedResourceBase SSyncableBaseResource - LastAutoSync time.Time `json:"last_auto_sync"` - ProjectId string `json:"tenant_id"` - AccessUrl string `json:"access_url"` - Account string `json:"account"` - Secret string `json:"secret"` - AccountId string `json:"account_id"` - IsPublicCloud *bool `json:"is_public_cloud,omitempty"` - IsOnPremise bool `json:"is_on_premise"` - Provider string `json:"provider"` - EnableAutoSync bool `json:"enable_auto_sync"` - SyncIntervalSeconds int `json:"sync_interval_seconds"` - Balance float64 `json:"balance"` - ProbeAt time.Time `json:"probe_at"` - HealthStatus string `json:"health_status"` - ErrorCount int `json:"error_count"` - AutoCreateProject bool `json:"auto_create_project"` - Version string `json:"version"` - Sysinfo interface{} `json:"sysinfo"` - Brand string `json:"brand"` - Options interface{} `json:"options"` - IsPublic bool `json:"is_public"` - ShareMode string `json:"share_mode"` + // 上此同步时间 + LastAutoSync time.Time `json:"last_auto_sync"` + // 项目Id + ProjectId string `json:"tenant_id"` + // 云环境连接地址 + AccessUrl string `json:"access_url"` + // 云账号 + Account string `json:"account"` + // 云账号密码 + Secret string `json:"secret"` + // 云环境唯一标识 + AccountId string `json:"account_id"` + // 是否是公有云账号 + // example: true + IsPublicCloud *bool `json:"is_public_cloud,omitempty"` + // 是否是本地IDC账号 + // example: false + IsOnPremise bool `json:"is_on_premise"` + // 云平台类型 + // example: google + Provider string `json:"provider"` + // 是否启用自动同步 + // example: false + EnableAutoSync bool `json:"enable_auto_sync"` + // 自动同步周期 + // example: 300 + SyncIntervalSeconds int `json:"sync_interval_seconds"` + // 账户余额 + // example: 124.2 + Balance float64 `json:"balance"` + // 上次账号探测时间 + ProbeAt time.Time `json:"probe_at"` + // 账号健康状态 + // example: normal + HealthStatus string `json:"health_status"` + // 账号探测异常错误次数 + ErrorCount int `json:"error_count"` + // 是否根据云上项目自动在本地创建对应项目 + // example: false + AutoCreateProject bool `json:"auto_create_project"` + // 云API版本 + Version string `json:"version"` + // 云系统信息 + Sysinfo interface{} `json:"sysinfo"` + // 品牌信息, 一般和provider相同 + // example: DStack + Brand string `json:"brand"` + // 额外信息 + Options interface{} `json:"options"` + // for backward compatiblity, keep is_public field, but not usable + IsPublic bool `json:"is_public"` + // add share_mode field to indicate the share range of this account + ShareMode string `json:"share_mode"` } // SCloudprovider is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudprovider. @@ -147,9 +202,10 @@ type SCloudprovider struct { apis.SEnabledStatusStandaloneResourceBase apis.SProjectizedResourceBase SSyncableBaseResource - HealthStatus string `json:"health_status"` - AccessUrl string `json:"access_url"` - Account string `json:"account"` + HealthStatus string `json:"health_status"` + AccessUrl string `json:"access_url"` + Account string `json:"account"` + // Column(VARCHAR(64, charset='ascii'), nullable=False) Secret string `json:"secret"` CloudaccountId string `json:"cloudaccount_id"` Provider string `json:"provider"` @@ -166,11 +222,13 @@ type SCloudproviderCapability struct { type SCloudproviderregion struct { apis.SJointResourceBase SSyncableBaseResource - CloudproviderId string `json:"cloudprovider_id"` - CloudregionId string `json:"cloudregion_id"` - Enabled bool `json:"enabled"` - SyncResults interface{} `json:"sync_results"` - LastDeepSyncAt time.Time `json:"last_deep_sync_at"` + CloudproviderId string `json:"cloudprovider_id"` + // Column(VARCHAR(36, charset='ascii'), nullable=False) + CloudregionId string `json:"cloudregion_id"` + Enabled bool `json:"enabled"` + // SyncIntervalSeconds int `list:"domain"` + SyncResults interface{} `json:"sync_results"` + LastDeepSyncAt time.Time `json:"last_deep_sync_at"` } // SCloudregion is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregion. @@ -179,8 +237,12 @@ type SCloudregion struct { SManagedResourceBase apis.SExternalizedResourceBase cloudprovider.SGeographicInfo + // 云环境 + // example: ChinaCloud Environment string `json:"environment"` - Provider string `json:"provider"` + // 云平台 + // example: Huawei + Provider string `json:"provider"` } // SCloudregionResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregionResourceBase. @@ -196,32 +258,64 @@ type SDBInstance struct { SBillingResourceBase SCloudregionResourceBase SDeletePreventableResourceBase - MasterInstanceId string `json:"master_instance_id"` - VcpuCount int `json:"vcpu_count"` - VmemSizeMb int `json:"vmem_size_mb"` - StorageType string `json:"storage_type"` - DiskSizeGB int `json:"disk_size_gb"` - Port int `json:"port"` - Category string `json:"category"` - Engine string `json:"engine"` - EngineVersion string `json:"engine_version"` - InstanceType string `json:"instance_type"` - MaintainTime string `json:"maintain_time"` - SecgroupId string `json:"secgroup_id"` - VpcId string `json:"vpc_id"` - ConnectionStr string `json:"connection_str"` + // 主实例Id + MasterInstanceId string `json:"master_instance_id"` + // CPU数量 + // example: 1 + VcpuCount int `json:"vcpu_count"` + // 内存大小 + // example: 1024 + VmemSizeMb int `json:"vmem_size_mb"` + // 存储类型 + // example: local_ssd + StorageType string `json:"storage_type"` + // 存储大小 + // example: 10240 + DiskSizeGB int `json:"disk_size_gb"` + // 端口 + // example: 3306 + Port int `json:"port"` + // 实例类型 + // example: ha + Category string `json:"category"` + // 引擎 + // example: MySQL + Engine string `json:"engine"` + // 引擎版本 + // example: 5.7 + EngineVersion string `json:"engine_version"` + // 套餐名称 + // example: mysql.x4.large.2c + InstanceType string `json:"instance_type"` + // 维护时间 + MaintainTime string `json:"maintain_time"` + // 安全组Id + // example: default + SecgroupId string `json:"secgroup_id"` + // 虚拟私有网络Id + // example: ed20d84e-3158-41b1-870c-1725e412e8b6 + VpcId string `json:"vpc_id"` + // 外部连接地址 + ConnectionStr string `json:"connection_str"` + // 内部连接地址 InternalConnectionStr string `json:"internal_connection_str"` - Zone1 string `json:"zone1"` - Zone2 string `json:"zone2"` - Zone3 string `json:"zone3"` - ZoneId string `json:"zone_id"` + // 可用区1 + Zone1 string `json:"zone1"` + // 可用区2 + Zone2 string `json:"zone2"` + // 可用区3 + Zone3 string `json:"zone3"` + // 可用区Id(对应公有云的可用区Id) + ZoneId string `json:"zone_id"` } // SDBInstanceAccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceAccount. type SDBInstanceAccount struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase - Secret string `json:"secret"` + // 数据库密码 + Secret string `json:"secret"` + // RDS实例Id DBInstanceId string `json:"dbinstance_id"` } @@ -231,21 +325,37 @@ type SDBInstanceBackup struct { SCloudregionResourceBase SManagedResourceBase apis.SExternalizedResourceBase - Engine string `json:"engine"` - EngineVersion string `json:"engine_version"` - StartTime time.Time `json:"start_time"` - EndTime time.Time `json:"end_time"` - BackupMode string `json:"backup_mode"` - DBNames string `json:"db_names"` - BackupSizeMb int `json:"backup_size_mb"` - DBInstanceId string `json:"dbinstance_id"` + // RDS引擎 + // example: MySQL + Engine string `json:"engine"` + // RDS引擎版本 + // example: 5.7 + EngineVersion string `json:"engine_version"` + // 备份开始时间 + StartTime time.Time `json:"start_time"` + // 备份结束时间 + EndTime time.Time `json:"end_time"` + // 备份模式 + BackupMode string `json:"backup_mode"` + // 备份数据库名称 + DBNames string `json:"db_names"` + // 备份大小 + // example: 32 + BackupSizeMb int `json:"backup_size_mb"` + // RDS实例Id + // example: 239b9663-6d06-4ef4-8cfc-320a7fb6660d + DBInstanceId string `json:"dbinstance_id"` } // SDBInstanceDatabase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceDatabase. type SDBInstanceDatabase struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase + // 字符集 + // example: utf-8 CharacterSet string `json:"character_set"` + // RDS实例Id + // example: 7d07e867-37d1-4754-865d-80f88ad0f982 DBInstanceId string `json:"dbinstance_id"` } @@ -286,9 +396,10 @@ type SDBInstanceSku struct { apis.SEnabledStatusStandaloneResourceBase apis.SExternalizedResourceBase SCloudregionResourceBase - Provider string `json:"provider"` - StorageType string `json:"storage_type"` - DiskSizeStep int `json:"disk_size_step"` + Provider string `json:"provider"` + StorageType string `json:"storage_type"` + DiskSizeStep int `json:"disk_size_step"` + // 步长 MaxDiskSizeGb int `json:"max_disk_size_gb"` MinDiskSizeGb int `json:"min_disk_size_gb"` IOPS int `json:"iops"` @@ -308,6 +419,8 @@ type SDBInstanceSku struct { // SDeletePreventableResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDeletePreventableResourceBase. type SDeletePreventableResourceBase struct { + // 是否开启删除保护 + // example: true DisableDelete *bool `json:"disable_delete,omitempty"` } @@ -316,17 +429,34 @@ type SDisk struct { apis.SVirtualResourceBase apis.SExternalizedResourceBase SBillingResourceBase - DiskFormat string `json:"disk_format"` - DiskSize int `json:"disk_size"` - AccessPath string `json:"access_path"` - AutoDelete bool `json:"auto_delete"` + // 磁盘存储类型 + // example: qcow2 + DiskFormat string `json:"disk_format"` + // 磁盘大小, 单位Mb + // example: 10240 + DiskSize int `json:"disk_size"` + // 磁盘路径 + AccessPath string `json:"access_path"` + // 是否跟随云主机自动删除, 仅绑定到云主机时才生效 + // example: false + AutoDelete bool `json:"auto_delete"` + // 存储Id StorageId string `json:"storage_id"` BackupStorageId string `json:"backup_storage_id"` - TemplateId string `json:"template_id"` - SnapshotId string `json:"snapshot_id"` - FsFormat string `json:"fs_format"` - DiskType string `json:"disk_type"` - Nonpersistent bool `json:"nonpersistent"` + // 镜像Id + TemplateId string `json:"template_id"` + // 快照Id + SnapshotId string `json:"snapshot_id"` + // 文件系统 + FsFormat string `json:"fs_format"` + // 磁盘类型 + // sys: 系统盘 + // data: 数据盘 + // swap: 交换盘 + // example: sys + DiskType string `json:"disk_type"` + // # is persistent + Nonpersistent bool `json:"nonpersistent"` } // SDnsRecord is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsRecord. @@ -353,36 +483,49 @@ type SElasticcache struct { SDeletePreventableResourceBase SCloudregionResourceBase SZoneResourceBase - SlaveZones string `json:"slave_zones"` - InstanceType string `json:"instance_type"` - CapacityMB int `json:"capacity_mb"` - LocalCategory string `json:"local_category"` - NodeType string `json:"node_type"` - Engine string `json:"engine"` - EngineVersion string `json:"engine_version"` - VpcId string `json:"vpc_id"` - NetworkType string `json:"network_type"` - NetworkId string `json:"network_id"` - SecurityGroupId string `json:"security_group_id"` - PrivateDNS string `json:"private_dns"` - PrivateIpAddr string `json:"private_ip_addr"` - PrivateConnectPort int `json:"private_connect_port"` - PublicDNS string `json:"public_dns"` - PublicIpAddr string `json:"public_ip_addr"` - PublicConnectPort int `json:"public_connect_port"` - MaintainStartTime string `json:"maintain_start_time"` - MaintainEndTime string `json:"maintain_end_time"` - AuthMode string `json:"auth_mode"` + // 主可用区. + SlaveZones string `json:"slave_zones"` + InstanceType string `json:"instance_type"` + // redis.master.micro.default + CapacityMB int `json:"capacity_mb"` + // 1024 + LocalCategory string `json:"local_category"` + // 对应Sku local_category + NodeType string `json:"node_type"` + // single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读) + Engine string `json:"engine"` + // Redis | Memcache + EngineVersion string `json:"engine_version"` + VpcId string `json:"vpc_id"` + NetworkType string `json:"network_type"` + // CLASSIC(经典网络) VPC(专有网络) + NetworkId string `json:"network_id"` + SecurityGroupId string `json:"security_group_id"` + PrivateDNS string `json:"private_dns"` + // 内网DNS + PrivateIpAddr string `json:"private_ip_addr"` + // 内网IP地址 + PrivateConnectPort int `json:"private_connect_port"` + // 内网访问端口 + PublicDNS string `json:"public_dns"` + PublicIpAddr string `json:"public_ip_addr"` + PublicConnectPort int `json:"public_connect_port"` + MaintainStartTime string `json:"maintain_start_time"` + // HH:mmZ eg. 02:00Z + MaintainEndTime string `json:"maintain_end_time"` + AuthMode string `json:"auth_mode"` } // SElasticcacheAccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheAccount. type SElasticcacheAccount struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase - ElasticcacheId string `json:"elasticcache_id"` - AccountType string `json:"account_type"` + ElasticcacheId string `json:"elasticcache_id"` + AccountType string `json:"account_type"` + // 账号类型 normal |admin AccountPrivilege string `json:"account_privilege"` - Password string `json:"password"` + // 账号权限 read | write | repl(复制, 复制权限支持读写,且开放SYNC/PSYNC命令) + Password string `json:"password"` } // SElasticcacheAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheAcl. @@ -397,13 +540,15 @@ type SElasticcacheAcl struct { type SElasticcacheBackup struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase - ElasticcacheId string `json:"elasticcache_id"` - BackupSizeMb int `json:"backup_size_mb"` - BackupType string `json:"backup_type"` - BackupMode string `json:"backup_mode"` - DownloadURL string `json:"download_url"` - StartTime time.Time `json:"start_time"` - EndTime time.Time `json:"end_time"` + ElasticcacheId string `json:"elasticcache_id"` + BackupSizeMb int `json:"backup_size_mb"` + BackupType string `json:"backup_type"` + // 全量|增量额 + BackupMode string `json:"backup_mode"` + // 自动|手动 + DownloadURL string `json:"download_url"` + StartTime time.Time `json:"start_time"` + EndTime time.Time `json:"end_time"` } // SElasticcacheParameter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheParameter. @@ -414,8 +559,10 @@ type SElasticcacheParameter struct { Key string `json:"key"` Value string `json:"value"` ValueRange string `json:"value_range"` - Modifiable bool `json:"modifiable"` - ForceRestart bool `json:"force_restart"` + // 校验代码,参数的可选范围。 + Modifiable bool `json:"modifiable"` + // True(可修改) False(不可修改) + ForceRestart bool `json:"force_restart"` } // SElasticcacheSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheSku. @@ -423,31 +570,47 @@ type SElasticcacheSku struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase SCloudregionResourceBase + // 区域 SZoneResourceBase - SlaveZoneId string `json:"slave_zone_id"` - InstanceSpec string `json:"instance_spec"` - EngineArch string `json:"engine_arch"` - LocalCategory string `json:"local_category"` - PrepaidStatus string `json:"prepaid_status"` - PostpaidStatus string `json:"postpaid_status"` - Engine string `json:"engine"` - EngineVersion string `json:"engine_version"` - CpuArch string `json:"cpu_arch"` - StorageType string `json:"storage_type"` - PerformanceType string `json:"performance_type"` - NodeType string `json:"node_type"` - MemorySizeMB int `json:"memory_size_mb"` - DiskSizeGB int `json:"disk_size_gb"` - ShardNum int `json:"shard_num"` - MaxShardNum int `json:"max_shard_num"` - ReplicasNum int `json:"replicas_num"` - MaxReplicasNum int `json:"max_replicas_num"` - MaxClients int `json:"max_clients"` - MaxConnections int `json:"max_connections"` - MaxInBandwidthMb int `json:"max_in_bandwidth_mb"` - MaxMemoryMB int `json:"max_memory_mb"` - QPS int `json:"qps"` - Provider string `json:"provider"` + // 主可用区 + SlaveZoneId string `json:"slave_zone_id"` + InstanceSpec string `json:"instance_spec"` + EngineArch string `json:"engine_arch"` + LocalCategory string `json:"local_category"` + PrepaidStatus string `json:"prepaid_status"` + PostpaidStatus string `json:"postpaid_status"` + Engine string `json:"engine"` + // 引擎 redis|memcached + EngineVersion string `json:"engine_version"` + // 引擎版本 3.0 + CpuArch string `json:"cpu_arch"` + // CPU 架构 x86|ARM + StorageType string `json:"storage_type"` + // 存储类型 DRAM|SCM + PerformanceType string `json:"performance_type"` + // standrad|enhanced + NodeType string `json:"node_type"` + MemorySizeMB int `json:"memory_size_mb"` + // 内存容量 + DiskSizeGB int `json:"disk_size_gb"` + // 套餐附带硬盘容量 + ShardNum int `json:"shard_num"` + // 最小分片数量 + MaxShardNum int `json:"max_shard_num"` + // 最大分片数量 + ReplicasNum int `json:"replicas_num"` + // 最小副本数量 + MaxReplicasNum int `json:"max_replicas_num"` + MaxClients int `json:"max_clients"` + // 最大客户端数 + MaxConnections int `json:"max_connections"` + // 最大连接数 + MaxInBandwidthMb int `json:"max_in_bandwidth_mb"` + // 最大内网带宽 + MaxMemoryMB int `json:"max_memory_mb"` + // 实际可使用的最大内存 + QPS int `json:"qps"` + Provider string `json:"provider"` } // SElasticip is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticip. @@ -456,15 +619,29 @@ type SElasticip struct { apis.SExternalizedResourceBase SManagedResourceBase SBillingResourceBase - NetworkId string `json:"network_id"` - Mode string `json:"mode"` - IpAddr string `json:"ip_addr"` + // IP子网Id, 仅私有云不为空 + NetworkId string `json:"network_id"` + // 标识弹性或非弹性 + // public_ip: 公网IP + // elastic_ip: 弹性公网IP + // example: elastic_ip + Mode string `json:"mode"` + // IP地址 + IpAddr string `json:"ip_addr"` + // 绑定资源类型 AssociateType string `json:"associate_type"` - AssociateId string `json:"associate_id"` - Bandwidth int `json:"bandwidth"` - ChargeType string `json:"charge_type"` - BgpType string `json:"bgp_type"` - AutoDellocate *bool `json:"auto_dellocate,omitempty"` + // 绑定资源Id + AssociateId string `json:"associate_id"` + // 带宽大小 + Bandwidth int `json:"bandwidth"` + // 计费类型: 流量、带宽 + // example: bandwidth + ChargeType string `json:"charge_type"` + // 目前只有华为云此字段是必需填写的 + BgpType string `json:"bgp_type"` + // 是否跟随主机删除而自动释放 + AutoDellocate *bool `json:"auto_dellocate,omitempty"` + // 区域Id CloudregionId string `json:"cloudregion_id"` } @@ -484,13 +661,19 @@ type SGlobalVpc struct { // SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroup. type SGroup struct { apis.SVirtualResourceBase - ServiceType string `json:"service_type"` - ParentId string `json:"parent_id"` - ZoneId string `json:"zone_id"` - SchedStrategy string `json:"sched_strategy"` - Granularity int `json:"granularity"` - ForceDispersion *bool `json:"force_dispersion,omitempty"` - Enabled *bool `json:"enabled,omitempty"` + // 服务类型 + ServiceType string `json:"service_type"` + ParentId string `json:"parent_id"` + // 可用区Id + // example: zone1 + ZoneId string `json:"zone_id"` + // 调度策略 + SchedStrategy string `json:"sched_strategy"` + // the upper limit number of guests with this group in a host + Granularity int `json:"granularity"` + ForceDispersion *bool `json:"force_dispersion,omitempty"` + // 是否启用 + Enabled *bool `json:"enabled,omitempty"` } // SGroupJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupJointsBase. @@ -502,7 +685,8 @@ type SGroupJointsBase struct { // SGroupguest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupguest. type SGroupguest struct { SGroupJointsBase - Tag string `json:"tag"` + Tag string `json:"tag"` + // Column(VARCHAR(256, charset='ascii'), nullable=True) GuestId string `json:"guest_id"` } @@ -521,25 +705,40 @@ type SGuest struct { apis.SExternalizedResourceBase SBillingResourceBase SDeletePreventableResourceBase - VcpuCount int `json:"vcpu_count"` - VmemSize int `json:"vmem_size"` - BootOrder string `json:"boot_order"` + // CPU大小 + VcpuCount int `json:"vcpu_count"` + // 内存大小, 单位Mb + VmemSize int `json:"vmem_size"` + // 启动顺序 + BootOrder string `json:"boot_order"` + // 关机操作类型 + // example: stop ShutdownBehavior string `json:"shutdown_behavior"` - KeypairId string `json:"keypair_id"` - HostId string `json:"host_id"` - BackupHostId string `json:"backup_host_id"` - Vga string `json:"vga"` - Vdi string `json:"vdi"` - Machine string `json:"machine"` - Bios string `json:"bios"` - OsType string `json:"os_type"` - FlavorId string `json:"flavor_id"` - SecgrpId string `json:"secgrp_id"` - AdminSecgrpId string `json:"admin_secgrp_id"` - SrcIpCheck *bool `json:"src_ip_check,omitempty"` - SrcMacCheck *bool `json:"src_mac_check,omitempty"` - Hypervisor string `json:"hypervisor"` - InstanceType string `json:"instance_type"` + // 秘钥对Id + KeypairId string `json:"keypair_id"` + // 宿主机Id + HostId string `json:"host_id"` + // 备份机所在宿主机Id + BackupHostId string `json:"backup_host_id"` + Vga string `json:"vga"` + Vdi string `json:"vdi"` + Machine string `json:"machine"` + Bios string `json:"bios"` + // 操作系统类型 + OsType string `json:"os_type"` + FlavorId string `json:"flavor_id"` + // 安全组Id + // example: default + SecgrpId string `json:"secgrp_id"` + // 管理员可见安全组Id + AdminSecgrpId string `json:"admin_secgrp_id"` + SrcIpCheck *bool `json:"src_ip_check,omitempty"` + SrcMacCheck *bool `json:"src_mac_check,omitempty"` + // 虚拟化技术 + // example: kvm + Hypervisor string `json:"hypervisor"` + // 套餐名称 + InstanceType string `json:"instance_type"` } // SGuestJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestJointsBase. @@ -563,11 +762,14 @@ type SGuestTemplate struct { // SGuestdisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestdisk. type SGuestdisk struct { SGuestJointsBase - DiskId string `json:"disk_id"` - ImagePath string `json:"image_path"` - Driver string `json:"driver"` - CacheMode string `json:"cache_mode"` - AioMode string `json:"aio_mode"` + DiskId string `json:"disk_id"` + ImagePath string `json:"image_path"` + Driver string `json:"driver"` + // Column(VARCHAR(32, charset='ascii'), nullable=True) + CacheMode string `json:"cache_mode"` + // Column(VARCHAR(32, charset='ascii'), nullable=True) + AioMode string `json:"aio_mode"` + // Column(VARCHAR(32, charset='ascii'), nullable=True) Iops int `json:"iops"` Bps int `json:"bps"` Mountpoint string `json:"mountpoint"` @@ -578,15 +780,23 @@ type SGuestdisk struct { type SGuestnetwork struct { SGuestJointsBase NetworkId string `json:"network_id"` - MacAddr string `json:"mac_addr"` - IpAddr string `json:"ip_addr"` - Ip6Addr string `json:"ip6_addr"` - Driver string `json:"driver"` - BwLimit int `json:"bw_limit"` - Index byte `json:"index"` - Virtual bool `json:"virtual"` - Ifname string `json:"ifname"` - TeamWith string `json:"team_with"` + // Column(VARCHAR(36, charset='ascii'), nullable=False) + MacAddr string `json:"mac_addr"` + // Column(VARCHAR(32, charset='ascii'), nullable=False) + IpAddr string `json:"ip_addr"` + // Column(VARCHAR(16, charset='ascii'), nullable=True) + Ip6Addr string `json:"ip6_addr"` + // Column(VARCHAR(64, charset='ascii'), nullable=True) + Driver string `json:"driver"` + // Column(VARCHAR(16, charset='ascii'), nullable=True) + BwLimit int `json:"bw_limit"` + // Column(Integer, nullable=False, default=0) # Mbps + Index byte `json:"index"` + // Column(TINYINT, nullable=False, default=0) + Virtual bool `json:"virtual"` + // Column(Boolean, default=False) + Ifname string `json:"ifname"` + TeamWith string `json:"team_with"` } // SGuestsecgroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestsecgroup. @@ -601,45 +811,74 @@ type SHost struct { apis.SExternalizedResourceBase SManagedResourceBase SBillingResourceBase - Rack string `json:"rack"` - Slots string `json:"slots"` - AccessMac string `json:"access_mac"` - AccessIp string `json:"access_ip"` - ManagerUri string `json:"manager_uri"` - SysInfo interface{} `json:"sys_info"` - SN string `json:"sn"` - CpuCount int `json:"cpu_count"` - NodeCount byte `json:"node_count"` - CpuDesc string `json:"cpu_desc"` - CpuMhz int `json:"cpu_mhz"` - CpuCache int `json:"cpu_cache"` - CpuReserved int `json:"cpu_reserved"` - CpuCmtbound float32 `json:"cpu_cmtbound"` - CpuMicrocode string `json:"cpu_microcode"` - CpuArchitecture string `json:"cpu_architecture"` - MemSize int `json:"mem_size"` - MemReserved int `json:"mem_reserved"` - MemCmtbound float32 `json:"mem_cmtbound"` - StorageSize int `json:"storage_size"` - StorageType string `json:"storage_type"` - StorageDriver string `json:"storage_driver"` - StorageInfo interface{} `json:"storage_info"` - IpmiIp string `json:"ipmi_ip"` - IpmiInfo interface{} `json:"ipmi_info"` - HostStatus string `json:"host_status"` - ZoneId string `json:"zone_id"` - HostType string `json:"host_type"` - Version string `json:"version"` - OvnVersion string `json:"ovn_version"` - IsBaremetal bool `json:"is_baremetal"` - IsMaintenance bool `json:"is_maintenance"` - LastPingAt time.Time `json:"last_ping_at"` - ResourceType string `json:"resource_type"` - RealExternalId string `json:"real_external_id"` - IsImport bool `json:"is_import"` - EnablePxeBoot *bool `json:"enable_pxe_boot,omitempty"` - Uuid string `json:"uuid"` - BootMode string `json:"boot_mode"` + // 机架 + Rack string `json:"rack"` + Slots string `json:"slots"` + AccessMac string `json:"access_mac"` + // Ip地址 + AccessIp string `json:"access_ip"` + // 管理地址 + ManagerUri string `json:"manager_uri"` + // 系统信息 + SysInfo interface{} `json:"sys_info"` + // SN信息 + SN string `json:"sn"` + // CPU大小 + CpuCount int `json:"cpu_count"` + // 物理CPU颗数 + NodeCount byte `json:"node_count"` + // CPU描述信息 + CpuDesc string `json:"cpu_desc"` + // CPU频率 + CpuMhz int `json:"cpu_mhz"` + // CPU缓存大小,单位KB + CpuCache int `json:"cpu_cache"` + // 预留CPU大小 + CpuReserved int `json:"cpu_reserved"` + // CPU超分比 + CpuCmtbound float32 `json:"cpu_cmtbound"` + // CPUMicrocode + CpuMicrocode string `json:"cpu_microcode"` + // CPU架构 + CpuArchitecture string `json:"cpu_architecture"` + // 内存大小,单位Mb + MemSize int `json:"mem_size"` + // 预留内存大小 + MemReserved int `json:"mem_reserved"` + // 内存超分比 + MemCmtbound float32 `json:"mem_cmtbound"` + // 存储大小,单位Mb + StorageSize int `json:"storage_size"` + // 存储类型 + StorageType string `json:"storage_type"` + // 存储驱动类型 + StorageDriver string `json:"storage_driver"` + // 存储详情 + StorageInfo interface{} `json:"storage_info"` + // IPMI地址 + IpmiIp string `json:"ipmi_ip"` + // IPMI详情 + IpmiInfo interface{} `json:"ipmi_info"` + // 宿主机状态 + // example: online + HostStatus string `json:"host_status"` + // 可用区Id + // example: zone1 + ZoneId string `json:"zone_id"` + // 宿主机类型 + HostType string `json:"host_type"` + Version string `json:"version"` + OvnVersion string `json:"ovn_version"` + IsBaremetal bool `json:"is_baremetal"` + // 是否处于维护状态 + IsMaintenance bool `json:"is_maintenance"` + LastPingAt time.Time `json:"last_ping_at"` + ResourceType string `json:"resource_type"` + RealExternalId string `json:"real_external_id"` + IsImport bool `json:"is_import"` + EnablePxeBoot *bool `json:"enable_pxe_boot,omitempty"` + Uuid string `json:"uuid"` + BootMode string `json:"boot_mode"` } // SHostJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostJointsBase. @@ -651,9 +890,12 @@ type SHostJointsBase struct { type SHostnetwork struct { SHostJointsBase BaremetalId string `json:"baremetal_id"` - NetworkId string `json:"network_id"` - IpAddr string `json:"ip_addr"` - MacAddr string `json:"mac_addr"` + // Column(VARCHAR(36, charset='ascii'), nullable=False) + NetworkId string `json:"network_id"` + // Column(VARCHAR(36, charset='ascii'), nullable=False) + IpAddr string `json:"ip_addr"` + // Column(VARCHAR(16, charset='ascii')) + MacAddr string `json:"mac_addr"` } // SHostschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostschedtag. @@ -665,22 +907,32 @@ type SHostschedtag struct { // SHoststorage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHoststorage. type SHoststorage struct { SHostJointsBase - MountPoint string `json:"mount_point"` - HostId string `json:"host_id"` - StorageId string `json:"storage_id"` - Config interface{} `json:"config"` - RealCapacity int64 `json:"real_capacity"` + // 挂载点 + MountPoint string `json:"mount_point"` + // 宿主机Id + HostId string `json:"host_id"` + // 存储Id + StorageId string `json:"storage_id"` + // 配置信息 + Config interface{} `json:"config"` + // 真实容量大小 + RealCapacity int64 `json:"real_capacity"` } // SHostwire is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostwire. type SHostwire struct { SHostJointsBase - Bridge string `json:"bridge"` + Bridge string `json:"bridge"` + // 接口名称 Interface string `json:"interface"` - IsMaster bool `json:"is_master"` - MacAddr string `json:"mac_addr"` - HostId string `json:"host_id"` - WireId string `json:"wire_id"` + // 是否是主地址 + IsMaster bool `json:"is_master"` + // MAC地址 + MacAddr string `json:"mac_addr"` + // 宿主机Id + HostId string `json:"host_id"` + // 二层网络Id + WireId string `json:"wire_id"` } // SHuaweiCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHuaweiCachedLb. @@ -689,8 +941,10 @@ type SHuaweiCachedLb struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - BackendId string `json:"backend_id"` + BackendServerId string `json:"backend_server_id"` + // 后端服务器 实例ID + BackendId string `json:"backend_id"` + // 本地loadbalancebackend id CachedBackendGroupId string `json:"cached_backend_group_id"` } @@ -703,21 +957,31 @@ type SHuaweiCachedLbbg struct { LoadbalancerId string `json:"loadbalancer_id"` BackendGroupId string `json:"backend_group_id"` AssociatedId string `json:"associated_id"` + // 关联ID AssociatedType string `json:"associated_type"` - ProtocolType string `json:"protocol_type"` + // 关联类型, listener || rule + ProtocolType string `json:"protocol_type"` } // SInstanceSnapshot is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInstanceSnapshot. type SInstanceSnapshot struct { apis.SVirtualResourceBase - GuestId string `json:"guest_id"` - ServerConfig interface{} `json:"server_config"` + // 云主机Id + GuestId string `json:"guest_id"` + // 云主机配置 + ServerConfig interface{} `json:"server_config"` + // 云主机标签 ServerMetadata interface{} `json:"server_metadata"` - AutoDelete bool `json:"auto_delete"` - RefCount int `json:"ref_count"` - SecGroups interface{} `json:"sec_groups"` - KeypairId string `json:"keypair_id"` - OsType string `json:"os_type"` + // 是否自动删除 + AutoDelete bool `json:"auto_delete"` + // 引用次数 + RefCount int `json:"ref_count"` + // 安全组 + SecGroups interface{} `json:"sec_groups"` + // 秘钥Id + KeypairId string `json:"keypair_id"` + // 操作系统类型 + OsType string `json:"os_type"` } // SInstanceSnapshotJoint is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInstanceSnapshotJoint. @@ -731,10 +995,16 @@ type SInstanceSnapshotJoint struct { // SIsolatedDevice is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SIsolatedDevice. type SIsolatedDevice struct { apis.SStandaloneResourceBase - HostId string `json:"host_id"` - DevType string `json:"dev_type"` - Model string `json:"model"` - GuestId string `json:"guest_id"` + // 宿主机Id + HostId string `json:"host_id"` + // # PCI / GPU-HPC / GPU-VGA / USB / NIC + // 设备类型 + DevType string `json:"dev_type"` + // # Specific device name read from lspci command, e.g. `Tesla K40m` ... + Model string `json:"model"` + // 云主机Id + GuestId string `json:"guest_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"` } @@ -742,11 +1012,18 @@ type SIsolatedDevice struct { // SKeypair is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKeypair. type SKeypair struct { apis.SStandaloneResourceBase - Scheme string `json:"scheme"` + // 加密类型 + // example: RSA + Scheme string `json:"scheme"` + // 指纹信息 + // example: 1d:3a:83:4a:a1:f3:75:97:ec:d1:ef:f8:3f:a7:5d:9e Fingerprint string `json:"fingerprint"` - PrivateKey string `json:"private_key"` - PublicKey string `json:"public_key"` - OwnerId string `json:"owner_id"` + // 私钥 + PrivateKey string `json:"private_key"` + // 公钥 + PublicKey string `json:"public_key"` + // 用户Id + OwnerId string `json:"owner_id"` } // SLoadbalancer is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancer. @@ -757,16 +1034,25 @@ type SLoadbalancer struct { SCloudregionResourceBase SZoneResourceBase SLoadbalancerRateLimiter - Address string `json:"address"` - AddressType string `json:"address_type"` - NetworkType string `json:"network_type"` - NetworkId string `json:"network_id"` - VpcId string `json:"vpc_id"` - ClusterId string `json:"cluster_id"` - ChargeType string `json:"charge_type"` - LoadbalancerSpec string `json:"loadbalancer_spec"` - BackendGroupId string `json:"backend_group_id"` - LBInfo interface{} `json:"lb_info"` + // IP地址 + Address string `json:"address"` + // 地址类型 + AddressType string `json:"address_type"` + // 网络类型 + NetworkType string `json:"network_type"` + // 子网Id + NetworkId string `json:"network_id"` + // 虚拟私有网络Id + VpcId string `json:"vpc_id"` + // 负载均衡集群Id + ClusterId string `json:"cluster_id"` + // 计费类型 + ChargeType string `json:"charge_type"` + // 套餐名称 + LoadbalancerSpec string `json:"loadbalancer_spec"` + // 后端服务器组Id + BackendGroupId string `json:"backend_group_id"` + LBInfo interface{} `json:"lb_info"` } // SLoadbalancerAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAcl. @@ -791,9 +1077,10 @@ type SLoadbalancerAclEntry struct { // SLoadbalancerAgent is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgent. type SLoadbalancerAgent struct { apis.SStandaloneResourceBase - Version string `json:"version"` - IP string `json:"ip"` - HaState string `json:"ha_state"` + Version string `json:"version"` + IP string `json:"ip"` + HaState string `json:"ha_state"` + // LB_HA_STATE_UNKNOWN HbLastSeen time.Time `json:"hb_last_seen"` HbTimeout int `json:"hb_timeout"` Params *SLoadbalancerAgentParams `json:"params"` @@ -887,8 +1174,9 @@ type SLoadbalancerCertificate struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - Certificate string `json:"certificate"` - PrivateKey string `json:"private_key"` + Certificate string `json:"certificate"` + PrivateKey string `json:"private_key"` + // derived attributes PublicKeyAlgorithm string `json:"public_key_algorithm"` PublicKeyBitLen int `json:"public_key_bit_len"` SignatureAlgorithm string `json:"signature_algorithm"` @@ -908,27 +1196,36 @@ type SLoadbalancerCluster struct { // SLoadbalancerHTTPListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPListener. type SLoadbalancerHTTPListener struct { - StickySession string `json:"sticky_session"` - StickySessionType string `json:"sticky_session_type"` - StickySessionCookie string `json:"sticky_session_cookie"` - StickySessionCookieTimeout int `json:"sticky_session_cookie_timeout"` - XForwardedFor bool `json:"xforwarded_for"` - Gzip bool `json:"gzip"` + StickySession string `json:"sticky_session"` + // 会话保持开启状态 on|off + StickySessionType string `json:"sticky_session_type"` + // Cookie处理方式 insert(植入cookie)|server(重写cookie) + StickySessionCookie string `json:"sticky_session_cookie"` + // Cookie名称 + StickySessionCookieTimeout int `json:"sticky_session_cookie_timeout"` + XForwardedFor bool `json:"xforwarded_for"` + // 获取客户端真实IP + Gzip bool `json:"gzip"` } // SLoadbalancerHTTPRateLimiter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPRateLimiter. type SLoadbalancerHTTPRateLimiter struct { - HTTPRequestRate int `json:"http_request_rate"` + HTTPRequestRate int `json:"http_request_rate"` + // 限定监听接收请示速率 HTTPRequestRatePerSrc int `json:"http_request_rate_per_src"` } // SLoadbalancerHTTPRedirect is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPRedirect. type SLoadbalancerHTTPRedirect struct { - Redirect string `json:"redirect"` - RedirectCode int `json:"redirect_code"` + Redirect string `json:"redirect"` + // 跳转类型 + RedirectCode int `json:"redirect_code"` + // 跳转HTTP code RedirectScheme string `json:"redirect_scheme"` - RedirectHost string `json:"redirect_host"` - RedirectPath string `json:"redirect_path"` + // 跳转uri scheme + RedirectHost string `json:"redirect_host"` + // 跳转时变更Host + RedirectPath string `json:"redirect_path"` } // SLoadbalancerHTTPSListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPSListener. @@ -941,17 +1238,24 @@ type SLoadbalancerHTTPSListener struct { // SLoadbalancerHealthCheck is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHealthCheck. type SLoadbalancerHealthCheck struct { - HealthCheck string `json:"health_check"` - HealthCheckType string `json:"health_check_type"` - HealthCheckDomain string `json:"health_check_domain"` - HealthCheckURI string `json:"health_check_uri"` + HealthCheck string `json:"health_check"` + // 健康检查开启状态 on|off + HealthCheckType string `json:"health_check_type"` + HealthCheckDomain string `json:"health_check_domain"` + // 健康检查域名 yunion.cn + HealthCheckURI string `json:"health_check_uri"` + // 健康检查路径 / HealthCheckHttpCode string `json:"health_check_http_code"` HealthCheckRise int `json:"health_check_rise"` - HealthCheckFall int `json:"health_check_fall"` - HealthCheckTimeout int `json:"health_check_timeout"` + // 健康检查健康阈值 3秒 + HealthCheckFall int `json:"health_check_fall"` + // 健康检查不健康阈值 15秒 + HealthCheckTimeout int `json:"health_check_timeout"` + // 健康检查超时时间 10秒 HealthCheckInterval int `json:"health_check_interval"` HealthCheckReq string `json:"health_check_req"` - HealthCheckExp string `json:"health_check_exp"` + // UDP监听健康检查的请求串 + HealthCheckExp string `json:"health_check_exp"` } // SLoadbalancerListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListener. @@ -960,21 +1264,24 @@ type SLoadbalancerListener struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - LoadbalancerId string `json:"loadbalancer_id"` - ListenerType string `json:"listener_type"` - ListenerPort int `json:"listener_port"` - BackendGroupId string `json:"backend_group_id"` - BackendServerPort int `json:"backend_server_port"` - Scheduler string `json:"scheduler"` - SendProxy string `json:"send_proxy"` - ClientRequestTimeout int `json:"client_request_timeout"` - ClientIdleTimeout int `json:"client_idle_timeout"` - BackendConnectTimeout int `json:"backend_connect_timeout"` - BackendIdleTimeout int `json:"backend_idle_timeout"` - AclStatus string `json:"acl_status"` - AclType string `json:"acl_type"` - AclId string `json:"acl_id"` - CachedAclId string `json:"cached_acl_id"` + LoadbalancerId string `json:"loadbalancer_id"` + ListenerType string `json:"listener_type"` + ListenerPort int `json:"listener_port"` + BackendGroupId string `json:"backend_group_id"` + BackendServerPort int `json:"backend_server_port"` + Scheduler string `json:"scheduler"` + SendProxy string `json:"send_proxy"` + ClientRequestTimeout int `json:"client_request_timeout"` + // 连接请求超时时间 + ClientIdleTimeout int `json:"client_idle_timeout"` + // 连接空闲超时时间 + BackendConnectTimeout int `json:"backend_connect_timeout"` + // 后端连接超时时间 + BackendIdleTimeout int `json:"backend_idle_timeout"` + AclStatus string `json:"acl_status"` + AclType string `json:"acl_type"` + AclId string `json:"acl_id"` + CachedAclId string `json:"cached_acl_id"` SLoadbalancerRateLimiter SLoadbalancerTCPListener SLoadbalancerUDPListener @@ -991,13 +1298,15 @@ type SLoadbalancerListenerRule struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - IsDefault bool `json:"is_default"` + IsDefault bool `json:"is_default"` + // 默认转发策略,目前只有aws用到其它云都是false ListenerId string `json:"listener_id"` BackendGroupId string `json:"backend_group_id"` Domain string `json:"domain"` Path string `json:"path"` Condition string `json:"condition"` SLoadbalancerHealthCheck + // 目前只有腾讯云HTTP、HTTPS类型的健康检查是和规则绑定的。 SLoadbalancerHTTPRateLimiter SLoadbalancerHTTPRedirect } @@ -1050,23 +1359,33 @@ type SNatGateway struct { type SNetwork struct { apis.SSharableVirtualResourceBase apis.SExternalizedResourceBase - IfnameHint string `json:"ifname_hint"` - GuestIpStart string `json:"guest_ip_start"` - GuestIpEnd string `json:"guest_ip_end"` - GuestIpMask byte `json:"guest_ip_mask"` - GuestGateway string `json:"guest_gateway"` - GuestDns string `json:"guest_dns"` - GuestDhcp string `json:"guest_dhcp"` - GuestDomain string `json:"guest_domain"` - GuestIp6Start string `json:"guest_ip6_start"` - GuestIp6End string `json:"guest_ip6_end"` - GuestIp6Mask byte `json:"guest_ip6_mask"` - GuestGateway6 string `json:"guest_gateway6"` - GuestDns6 string `json:"guest_dns6"` - GuestDomain6 string `json:"guest_domain6"` - VlanId int `json:"vlan_id"` - WireId string `json:"wire_id"` - ServerType string `json:"server_type"` + IfnameHint string `json:"ifname_hint"` + // 起始IP地址 + GuestIpStart string `json:"guest_ip_start"` + // 接收IP地址 + GuestIpEnd string `json:"guest_ip_end"` + // 掩码 + GuestIpMask byte `json:"guest_ip_mask"` + // 网关地址 + GuestGateway string `json:"guest_gateway"` + // DNS + GuestDns string `json:"guest_dns"` + // allow multiple dhcp, seperated by "," + GuestDhcp string `json:"guest_dhcp"` + GuestDomain string `json:"guest_domain"` + GuestIp6Start string `json:"guest_ip6_start"` + GuestIp6End string `json:"guest_ip6_end"` + GuestIp6Mask byte `json:"guest_ip6_mask"` + GuestGateway6 string `json:"guest_gateway6"` + GuestDns6 string `json:"guest_dns6"` + GuestDomain6 string `json:"guest_domain6"` + VlanId int `json:"vlan_id"` + // 二层网络Id + WireId string `json:"wire_id"` + // 服务器类型 + // example: server + ServerType string `json:"server_type"` + // 分配策略 AllocPolicy string `json:"alloc_policy"` AllocTimoutSeconds int `json:"alloc_timout_seconds"` } @@ -1077,9 +1396,12 @@ type SNetworkInterface struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - Mac string `json:"mac"` + // MAC地址 + Mac string `json:"mac"` + // 绑定资源类型 AssociateType string `json:"associate_type"` - AssociateId string `json:"associate_id"` + // 绑定资源Id + AssociateId string `json:"associate_id"` } // SNetworkinterfacenetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkinterfacenetwork. @@ -1088,7 +1410,8 @@ type SNetworkinterfacenetwork struct { Primary bool `json:"primary"` IpAddr string `json:"ip_addr"` NetworkinterfaceId string `json:"networkinterface_id"` - NetworkId string `json:"network_id"` + // Column(VARCHAR(36, charset='ascii'), nullable=False) + NetworkId string `json:"network_id"` } // SNetworkschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkschedtag. @@ -1103,8 +1426,10 @@ type SQcloudCachedLb struct { apis.SExternalizedResourceBase SManagedResourceBase SCloudregionResourceBase - BackendServerId string `json:"backend_server_id"` - BackendId string `json:"backend_id"` + BackendServerId string `json:"backend_server_id"` + // 后端服务器 实例ID + BackendId string `json:"backend_id"` + // 本地loadbalancebackend id CachedBackendGroupId string `json:"cached_backend_group_id"` } @@ -1117,18 +1442,25 @@ type SQcloudCachedLbbg struct { LoadbalancerId string `json:"loadbalancer_id"` BackendGroupId string `json:"backend_group_id"` AssociatedId string `json:"associated_id"` + // 关联ID AssociatedType string `json:"associated_type"` } // SReservedip is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SReservedip. type SReservedip struct { apis.SResourceBase - Id int64 `json:"id"` - NetworkId string `json:"network_id"` - IpAddr string `json:"ip_addr"` - Notes string `json:"notes"` + // 自增Id + Id int64 `json:"id"` + // IP子网Id + NetworkId string `json:"network_id"` + // IP地址 + IpAddr string `json:"ip_addr"` + // 预留原因或描述 + Notes string `json:"notes"` + // 过期时间 ExpiredAt time.Time `json:"expired_at"` - Status string `json:"status"` + // 状态 + Status string `json:"status"` } // SRoute is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SRoute. @@ -1167,7 +1499,8 @@ type SSchedtag struct { apis.SStandaloneResourceBase apis.SScopedResourceBase DefaultStrategy string `json:"default_strategy"` - ResourceType string `json:"resource_type"` + // Column(VARCHAR(16, charset='ascii'), nullable=True, default='') + ResourceType string `json:"resource_type"` } // SSchedtagJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedtagJointsBase. @@ -1188,8 +1521,10 @@ type SSecurityGroupCache struct { apis.SExternalizedResourceBase SCloudregionResourceBase SManagedResourceBase + // 安全组Id SecgroupId string `json:"secgroup_id"` - VpcId string `json:"vpc_id"` + // 虚拟私有网络外部Id + VpcId string `json:"vpc_id"` } // SSecurityGroupRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSecurityGroupRule. @@ -1212,31 +1547,36 @@ type SServerSku struct { apis.SExternalizedResourceBase SCloudregionResourceBase SZoneResourceBase - Enabled bool `json:"enabled"` - InstanceTypeFamily string `json:"instance_type_family"` + Enabled bool `json:"enabled"` + // SkuId string `width:"64" charset:"ascii" nullable:"false" list:"user" create:"admin_required"` // x2.large + InstanceTypeFamily string `json:"instance_type_family"` + // x2 InstanceTypeCategory string `json:"instance_type_category"` - LocalCategory string `json:"local_category"` - PrepaidStatus string `json:"prepaid_status"` - PostpaidStatus string `json:"postpaid_status"` - CpuCoreCount int `json:"cpu_core_count"` - MemorySizeMB int `json:"memory_size_mb"` - OsName string `json:"os_name"` - SysDiskResizable *bool `json:"sys_disk_resizable,omitempty"` - SysDiskType string `json:"sys_disk_type"` - SysDiskMinSizeGB int `json:"sys_disk_min_size_gb"` - SysDiskMaxSizeGB int `json:"sys_disk_max_size_gb"` - AttachedDiskType string `json:"attached_disk_type"` - AttachedDiskSizeGB int `json:"attached_disk_size_gb"` - AttachedDiskCount int `json:"attached_disk_count"` - DataDiskTypes string `json:"data_disk_types"` - DataDiskMaxCount int `json:"data_disk_max_count"` - NicType string `json:"nic_type"` - NicMaxCount int `json:"nic_max_count"` - GpuAttachable *bool `json:"gpu_attachable,omitempty"` - GpuSpec string `json:"gpu_spec"` - GpuCount int `json:"gpu_count"` - GpuMaxCount int `json:"gpu_max_count"` - Provider string `json:"provider"` + // 通用型 + LocalCategory string `json:"local_category"` + PrepaidStatus string `json:"prepaid_status"` + // 预付费资源状态 available|soldout + PostpaidStatus string `json:"postpaid_status"` + CpuCoreCount int `json:"cpu_core_count"` + MemorySizeMB int `json:"memory_size_mb"` + OsName string `json:"os_name"` + SysDiskResizable *bool `json:"sys_disk_resizable,omitempty"` + SysDiskType string `json:"sys_disk_type"` + SysDiskMinSizeGB int `json:"sys_disk_min_size_gb"` + // not required。 windows比较新的版本都是50G左右。 + SysDiskMaxSizeGB int `json:"sys_disk_max_size_gb"` + AttachedDiskType string `json:"attached_disk_type"` + AttachedDiskSizeGB int `json:"attached_disk_size_gb"` + AttachedDiskCount int `json:"attached_disk_count"` + DataDiskTypes string `json:"data_disk_types"` + DataDiskMaxCount int `json:"data_disk_max_count"` + NicType string `json:"nic_type"` + NicMaxCount int `json:"nic_max_count"` + GpuAttachable *bool `json:"gpu_attachable,omitempty"` + GpuSpec string `json:"gpu_spec"` + GpuCount int `json:"gpu_count"` + GpuMaxCount int `json:"gpu_max_count"` + Provider string `json:"provider"` } // SServiceCatalog is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SServiceCatalog. @@ -1251,16 +1591,22 @@ type SSnapshot struct { apis.SVirtualResourceBase apis.SExternalizedResourceBase SManagedResourceBase - DiskId string `json:"disk_id"` - StorageId string `json:"storage_id"` - CreatedBy string `json:"created_by"` - Location string `json:"location"` - Size int `json:"size"` - OutOfChain bool `json:"out_of_chain"` - FakeDeleted bool `json:"fake_deleted"` - DiskType string `json:"disk_type"` - OsType string `json:"os_type"` - RefCount int `json:"ref_count"` + // 磁盘Id + DiskId string `json:"disk_id"` + // Only onecloud has StorageId + StorageId string `json:"storage_id"` + CreatedBy string `json:"created_by"` + Location string `json:"location"` + // 快照大小,单位Mb + Size int `json:"size"` + OutOfChain bool `json:"out_of_chain"` + FakeDeleted bool `json:"fake_deleted"` + DiskType string `json:"disk_type"` + // 操作系统类型 + OsType string `json:"os_type"` + // create disk from snapshot, snapshot as disk backing file + RefCount int `json:"ref_count"` + // 区域Id CloudregionId string `json:"cloudregion_id"` BackingDiskId string `json:"backing_disk_id"` ExpiredAt time.Time `json:"expired_at"` @@ -1269,10 +1615,12 @@ type SSnapshot struct { // SSnapshotPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSnapshotPolicy. type SSnapshotPolicy struct { apis.SVirtualResourceBase - RetentionDays int `json:"retention_days"` - RepeatWeekdays byte `json:"repeat_weekdays"` - TimePoints uint32 `json:"time_points"` - IsActivated *bool `json:"is_activated,omitempty"` + RetentionDays int `json:"retention_days"` + // 1~7, 1 is Monday + RepeatWeekdays byte `json:"repeat_weekdays"` + // 0~23 + TimePoints uint32 `json:"time_points"` + IsActivated *bool `json:"is_activated,omitempty"` } // SSnapshotPolicyCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSnapshotPolicyCache. @@ -1297,17 +1645,32 @@ type SStorage struct { apis.SStandaloneResourceBase apis.SExternalizedResourceBase SManagedResourceBase - Capacity int64 `json:"capacity"` - Reserved int64 `json:"reserved"` - StorageType string `json:"storage_type"` - MediumType string `json:"medium_type"` - Cmtbound float32 `json:"cmtbound"` - StorageConf interface{} `json:"storage_conf"` - ZoneId string `json:"zone_id"` - StoragecacheId string `json:"storagecache_id"` - Enabled *bool `json:"enabled,omitempty"` - Status string `json:"status"` - IsSysDiskStore *bool `json:"is_sys_disk_store,omitempty"` + // 容量大小,单位Mb + Capacity int64 `json:"capacity"` + // 预留容量大小 + Reserved int64 `json:"reserved"` + // 存储类型 + // example: local + StorageType string `json:"storage_type"` + // 介质类型 + // example: ssd + MediumType string `json:"medium_type"` + // 超售比 + Cmtbound float32 `json:"cmtbound"` + // 存储配置信息 + StorageConf interface{} `json:"storage_conf"` + // 可用区Id + ZoneId string `json:"zone_id"` + // 存储缓存Id + StoragecacheId string `json:"storagecache_id"` + // 是否启用 + Enabled *bool `json:"enabled,omitempty"` + // 状态 + Status string `json:"status"` + // indicating whether system disk can be allocated in this storage + // 是否可以用作系统盘存储 + // example: true + IsSysDiskStore *bool `json:"is_sys_disk_store,omitempty"` } // SStoragecache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStoragecache. @@ -1315,19 +1678,26 @@ type SStoragecache struct { apis.SStandaloneResourceBase apis.SExternalizedResourceBase SManagedResourceBase + // 镜像存储地址 Path string `json:"path"` } // SStoragecachedimage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStoragecachedimage. type SStoragecachedimage struct { apis.SJointResourceBase - StoragecacheId string `json:"storagecache_id"` - CachedimageId string `json:"cachedimage_id"` - ExternalId string `json:"external_id"` - Status string `json:"status"` - Path string `json:"path"` - LastDownload time.Time `json:"last_download"` - DownloadRefcnt int `json:"download_refcnt"` + // 存储缓存Id + StoragecacheId string `json:"storagecache_id"` + // 镜像缓存Id + CachedimageId string `json:"cachedimage_id"` + // 外部Id + ExternalId string `json:"external_id"` + // 镜像状态 + Status string `json:"status"` + Path string `json:"path"` + // 上次下载时间 + LastDownload time.Time `json:"last_download"` + // 下载引用次数 + DownloadRefcnt int `json:"download_refcnt"` } // SStorageschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStorageschedtag. @@ -1338,17 +1708,21 @@ type SStorageschedtag struct { // SSyncableBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSyncableBaseResource. type SSyncableBaseResource struct { - SyncStatus string `json:"sync_status"` - LastSync time.Time `json:"last_sync"` + SyncStatus string `json:"sync_status"` + LastSync time.Time `json:"last_sync"` + // = Column(DateTime, nullable=True) LastSyncEndAt time.Time `json:"last_sync_end_at"` } // SVCenter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVCenter. type SVCenter struct { apis.SEnabledStatusStandaloneResourceBase - Hostname string `json:"hostname"` - Port int `json:"port"` - Account string `json:"account"` + Hostname string `json:"hostname"` + // = Column(VARCHAR(64, charset='ascii'), nullable=False) + Port int `json:"port"` + // = Column(Integer, nullable=False) + Account string `json:"account"` + // = Column(VARCHAR(64, charset='ascii'), nullable=False) Password string `json:"password"` LastSync time.Time `json:"last_sync"` Version string `json:"version"` @@ -1360,31 +1734,44 @@ type SVpc struct { apis.SEnabledStatusStandaloneResourceBase apis.SExternalizedResourceBase SManagedResourceBase - IsDefault bool `json:"is_default"` - CidrBlock string `json:"cidr_block"` + // 是否是默认VPC + // example: true + IsDefault bool `json:"is_default"` + // CIDR地址段 + // example: 192.168.222.0/24 + CidrBlock string `json:"cidr_block"` + // 区域Id CloudregionId string `json:"cloudregion_id"` - GlobalvpcId string `json:"globalvpc_id"` + // 全局VPC Id + GlobalvpcId string `json:"globalvpc_id"` } // SWire is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWire. type SWire struct { apis.SStandaloneResourceBase apis.SExternalizedResourceBase - Bandwidth int `json:"bandwidth"` - Mtu int `json:"mtu"` - ScheduleRank int `json:"schedule_rank"` - ZoneId string `json:"zone_id"` - VpcId string `json:"vpc_id"` + // 带宽大小, 单位Mbps + // example: 1000 + Bandwidth int `json:"bandwidth"` + // MTU + // example: MTU + Mtu int `json:"mtu"` + ScheduleRank int `json:"schedule_rank"` + // 可用区Id + ZoneId string `json:"zone_id"` + // VPC Id + VpcId string `json:"vpc_id"` } // SZone is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SZone. type SZone struct { apis.SStatusStandaloneResourceBase apis.SExternalizedResourceBase - Location string `json:"location"` - Contacts string `json:"contacts"` - NameCn string `json:"name_cn"` - ManagerUri string `json:"manager_uri"` + Location string `json:"location"` + Contacts string `json:"contacts"` + NameCn string `json:"name_cn"` + ManagerUri string `json:"manager_uri"` + // 区域Id CloudregionId string `json:"cloudregion_id"` } diff --git a/pkg/apis/identity/zz_generated.model.go b/pkg/apis/identity/zz_generated.model.go index b168ed7cc1..dabaedf6e4 100644 --- a/pkg/apis/identity/zz_generated.model.go +++ b/pkg/apis/identity/zz_generated.model.go @@ -107,13 +107,14 @@ type SIdentityBaseResource struct { // SIdentityProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityProvider. type SIdentityProvider struct { apis.SEnabledStatusStandaloneResourceBase - Driver string `json:"driver"` - Template string `json:"template"` - TargetDomainId string `json:"target_domain_id"` - AutoCreateProject *bool `json:"auto_create_project,omitempty"` - ErrorCount int `json:"error_count"` - SyncStatus string `json:"sync_status"` - LastSync time.Time `json:"last_sync"` + Driver string `json:"driver"` + Template string `json:"template"` + TargetDomainId string `json:"target_domain_id"` + AutoCreateProject *bool `json:"auto_create_project,omitempty"` + ErrorCount int `json:"error_count"` + SyncStatus string `json:"sync_status"` + LastSync time.Time `json:"last_sync"` + // = Column(DateTime, nullable=True) LastSyncEndAt time.Time `json:"last_sync_end_at"` SyncIntervalSeconds int `json:"sync_interval_seconds"` } @@ -190,16 +191,17 @@ type SService struct { // SUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUser. type SUser struct { SEnabledIdentityBaseResource - Email string `json:"email"` - Mobile string `json:"mobile"` - Displayname string `json:"displayname"` - LastActiveAt time.Time `json:"last_active_at"` - LastLoginIp string `json:"last_login_ip"` - LastLoginSource string `json:"last_login_source"` - IsSystemAccount *bool `json:"is_system_account,omitempty"` - DefaultProjectId string `json:"default_project_id"` - AllowWebConsole *bool `json:"allow_web_console,omitempty"` - EnableMfa *bool `json:"enable_mfa,omitempty"` + Email string `json:"email"` + Mobile string `json:"mobile"` + Displayname string `json:"displayname"` + LastActiveAt time.Time `json:"last_active_at"` + LastLoginIp string `json:"last_login_ip"` + LastLoginSource string `json:"last_login_source"` + IsSystemAccount *bool `json:"is_system_account,omitempty"` + // deprecated + DefaultProjectId string `json:"default_project_id"` + AllowWebConsole *bool `json:"allow_web_console,omitempty"` + EnableMfa *bool `json:"enable_mfa,omitempty"` } // SUsergroupMembership is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUsergroupMembership. diff --git a/pkg/apis/image/zz_generated.model.go b/pkg/apis/image/zz_generated.model.go index f09c432476..386a5237c2 100644 --- a/pkg/apis/image/zz_generated.model.go +++ b/pkg/apis/image/zz_generated.model.go @@ -34,19 +34,32 @@ type SGuestImageJoint struct { // SImage is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImage. type SImage struct { apis.SSharableVirtualResourceBase - Size int64 `json:"size"` - Location string `json:"location"` - DiskFormat string `json:"disk_format"` - Checksum string `json:"checksum"` - FastHash string `json:"fast_hash"` - Owner string `json:"owner"` - MinDiskMB int32 `json:"min_disk"` - MinRamMB int32 `json:"min_ram"` - Protected *bool `json:"protected,omitempty"` - IsStandard *bool `json:"is_standard,omitempty"` - IsGuestImage *bool `json:"is_guest_image,omitempty"` - IsData *bool `json:"is_data,omitempty"` - OssChecksum string `json:"oss_checksum"` + // 镜像大小, 单位Byte + Size int64 `json:"size"` + // 存储地址 + Location string `json:"location"` + // 镜像格式 + DiskFormat string `json:"disk_format"` + // 校验和 + Checksum string `json:"checksum"` + FastHash string `json:"fast_hash"` + // 用户Id + Owner string `json:"owner"` + // 最小系统盘要求 + MinDiskMB int32 `json:"min_disk"` + // 最小内存要求 + MinRamMB int32 `json:"min_ram"` + // 是否有删除保护 + Protected *bool `json:"protected,omitempty"` + // 是否是标准镜像 + IsStandard *bool `json:"is_standard,omitempty"` + // 是否是主机镜像 + IsGuestImage *bool `json:"is_guest_image,omitempty"` + // 是否是数据盘镜像 + IsData *bool `json:"is_data,omitempty"` + // image copy from url, save origin checksum before probe + // 从镜像时长导入的镜像校验和 + OssChecksum string `json:"oss_checksum"` } // SImagePeripheral is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImagePeripheral. diff --git a/pkg/apis/zz_generated.model.go b/pkg/apis/zz_generated.model.go index 273fe88ea8..2354f5f377 100644 --- a/pkg/apis/zz_generated.model.go +++ b/pkg/apis/zz_generated.model.go @@ -26,6 +26,7 @@ type SAdminSharableVirtualResourceBase struct { // SDomainizedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SDomainizedResourceBase. type SDomainizedResourceBase struct { + // 域Id DomainId string `json:"domain_id"` } @@ -37,6 +38,7 @@ type SEnabledStatusStandaloneResourceBase struct { // SExternalizedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SExternalizedResourceBase. type SExternalizedResourceBase struct { + // 外部Id, 对用公有云私有资源自身的Id ExternalId string `json:"external_id"` } @@ -57,16 +59,22 @@ type SKeystoneCacheObject struct { // SProjectizedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SProjectizedResourceBase. type SProjectizedResourceBase struct { SDomainizedResourceBase + // 项目Id ProjectId string `json:"tenant_id"` } // SResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SResourceBase. type SResourceBase struct { - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - UpdateVersion int `json:"update_version"` - DeletedAt time.Time `json:"deleted_at"` - Deleted bool `json:"deleted"` + // 资源创建时间 + CreatedAt time.Time `json:"created_at"` + // 资源更新时间 + UpdatedAt time.Time `json:"updated_at"` + // 资源被更新次数 + UpdateVersion int `json:"update_version"` + // 资源删除时间 + DeletedAt time.Time `json:"deleted_at"` + // 资源是否被删除 + Deleted bool `json:"deleted"` } // SScopedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SScopedResourceBase. @@ -100,15 +108,21 @@ type SSharedResource struct { // SStandaloneResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SStandaloneResourceBase. type SStandaloneResourceBase struct { SResourceBase - Id string `json:"id"` - Name string `json:"name"` + // 资源UUID + Id string `json:"id"` + // 资源名称 + Name string `json:"name"` + // 资源描述信息 Description string `json:"description"` - IsEmulated bool `json:"is_emulated"` + // 是否是模拟资源, 部分从公有云上同步的资源并不真实存在, 例如宿主机 + // list 接口默认不会返回这类资源,除非显示指定 is_emulate=true 过滤参数 + IsEmulated bool `json:"is_emulated"` } // SStatusStandaloneResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SStatusStandaloneResourceBase. type SStatusStandaloneResourceBase struct { SStandaloneResourceBase + // 资源状态 Status string `json:"status"` } @@ -121,8 +135,12 @@ type SVirtualJointResourceBase struct { type SVirtualResourceBase struct { SStatusStandaloneResourceBase SProjectizedResourceBase - ProjectSrc string `json:"project_src"` + // 云上同步资源是否在本地被更改过配置, local: 更改过, cloud: 未更改过 + // example: local + ProjectSrc string `json:"project_src"` + // 是否是系统资源 IsSystem bool `json:"is_system"` PendingDeletedAt time.Time `json:"pending_deleted_at"` - PendingDeleted bool `json:"pending_deleted"` + // 资源是否处于回收站中 + PendingDeleted bool `json:"pending_deleted"` }