mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
fix(region): update swagger api
This commit is contained in:
@@ -17,26 +17,28 @@ package cloudevent
|
||||
import (
|
||||
time "time"
|
||||
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
// SCloudevent is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudevent/models.SCloudevent.
|
||||
type SCloudevent struct {
|
||||
apis.SDomainizedResourceBase
|
||||
EventId int64 `json:"event_id"`
|
||||
Name string `json:"name"`
|
||||
Service string `json:"service"`
|
||||
ResourceType string `json:"resource_type"`
|
||||
Action string `json:"action"`
|
||||
RequestId string `json:"request_id"`
|
||||
Request interface{} `json:"request"`
|
||||
Account string `json:"account"`
|
||||
Success bool `json:"success"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
CloudproviderId string `json:"cloudprovider_id"`
|
||||
Manager string `json:"manager"`
|
||||
Provider string `json:"provider"`
|
||||
Brand string `json:"brand"`
|
||||
EventId int64 `json:"event_id"`
|
||||
Name string `json:"name"`
|
||||
Service string `json:"service"`
|
||||
ResourceType string `json:"resource_type"`
|
||||
Action string `json:"action"`
|
||||
RequestId string `json:"request_id"`
|
||||
Request jsonutils.JSONObject `json:"request"`
|
||||
Account string `json:"account"`
|
||||
Success bool `json:"success"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
CloudproviderId string `json:"cloudprovider_id"`
|
||||
Manager string `json:"manager"`
|
||||
Provider string `json:"provider"`
|
||||
Brand string `json:"brand"`
|
||||
}
|
||||
|
||||
// SCloudprovider is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudevent/models.SCloudprovider.
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
package cloudid
|
||||
|
||||
import (
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
@@ -100,7 +102,7 @@ type SCloudpolicy struct {
|
||||
// | 腾讯云 | 支持 |
|
||||
Provider string `json:"provider"`
|
||||
// 策略内容
|
||||
Document interface{} `json:"document"`
|
||||
Document *jsonutils.JSONDict `json:"document"`
|
||||
// 是否锁定, 若锁定后, 此策略不允许被绑定到用户或权限组, 仅管理员可以设置是否锁定
|
||||
Locked *bool `json:"locked,omitempty"`
|
||||
CloudEnv string `json:"cloud_env"`
|
||||
@@ -142,8 +144,8 @@ type SCloudrole struct {
|
||||
SCloudaccountResourceBase
|
||||
SAMLProviderResourceBase
|
||||
SCloudgroupResourceBase
|
||||
Document interface{} `json:"document"`
|
||||
OwnerId string `json:"owner_id"`
|
||||
Document *jsonutils.JSONDict `json:"document"`
|
||||
OwnerId string `json:"owner_id"`
|
||||
}
|
||||
|
||||
// SClouduser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SClouduser.
|
||||
|
||||
@@ -14,6 +14,28 @@
|
||||
|
||||
package cloudprovider
|
||||
|
||||
// DefaultAction is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.DefaultAction.
|
||||
type DefaultAction struct {
|
||||
// Allow, Block, Log, Count, Alert, Detection, Prevention
|
||||
Action string `json:"action"`
|
||||
// 仅Action为Allow时生效
|
||||
InsertHeaders map[string]string `json:"insert_headers"`
|
||||
// 仅Action为Block时生效
|
||||
Response string `json:"response"`
|
||||
// 仅Action为Block时生效
|
||||
ResponseCode *int `json:"response_code"`
|
||||
// 仅Action为Block时生效
|
||||
ResponseHeaders map[string]string `json:"response_headers"`
|
||||
}
|
||||
|
||||
// SExcludeRule is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SExcludeRule.
|
||||
type SExcludeRule struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// SExcludeRules is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SExcludeRules.
|
||||
type SExcludeRules []SExcludeRule
|
||||
|
||||
// SGeographicInfo is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SGeographicInfo.
|
||||
type SGeographicInfo struct {
|
||||
// 纬度
|
||||
@@ -29,3 +51,64 @@ type SGeographicInfo struct {
|
||||
// example: CN
|
||||
CountryCode string `json:"country_code"`
|
||||
}
|
||||
|
||||
// SWafStatement is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SWafStatement.
|
||||
type SWafStatement struct {
|
||||
// 管理规则组名称
|
||||
ManagedRuleGroupName string `json:"managed_rule_group_name"`
|
||||
// 不包含的规则列表
|
||||
ExcludeRules *SExcludeRules `json:"exclude_rules"`
|
||||
// 表达式类别
|
||||
// enmu: ByteMatch, GeoMatch, IPSet, LabelMatch, ManagedRuleGroup, Rate, RegexSet, RuleGroup, Size, SqliMatch, XssMatch
|
||||
Type string `json:"type"`
|
||||
// 是否取反操作, 仅对Azure生效
|
||||
Negation bool `json:"negation"`
|
||||
// 操作类型
|
||||
// enum: EQ, NE, LE, LT, GE, GT
|
||||
Operator string `json:"operator"`
|
||||
// 匹配字段
|
||||
// enmu: Body, JsonBody, Query, Method, Header, UriPath, PostArgs, Cookie
|
||||
MatchField string `json:"match_field"`
|
||||
// 匹配字段的key
|
||||
MatchFieldKey string `json:"match_field_key"`
|
||||
// 匹配字段的值列表
|
||||
MatchFieldValues *TWafMatchFieldValues `json:"match_field_values"`
|
||||
// 进行转换操作
|
||||
// enmu: CompressWithSpace, HtmlEntityDecode, Lowercase, CmdLine, UrlDecode, Trim, UrlEncode, RemoveNulls
|
||||
Transformations *TextTransformations `json:"transformations"`
|
||||
ForwardedIPHeader string `json:"forwarded_ip_header"`
|
||||
// 搜索字段, 仅Aws有用
|
||||
SearchString string `json:"search_string"`
|
||||
IPSetId string `json:"ip_set_id"`
|
||||
// 正则表达式Id, 目前只读
|
||||
RegexSetId string `json:"regex_set_id"`
|
||||
// 自定义规则组Id, 目前只读
|
||||
RuleGroupId string `json:"rule_group_id"`
|
||||
}
|
||||
|
||||
// TWafAction is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafAction.
|
||||
type TWafAction string
|
||||
|
||||
// TWafMatchField is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafMatchField.
|
||||
type TWafMatchField string
|
||||
|
||||
// TWafMatchFieldValues is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafMatchFieldValues.
|
||||
type TWafMatchFieldValues []string
|
||||
|
||||
// TWafOperator is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafOperator.
|
||||
type TWafOperator string
|
||||
|
||||
// TWafStatementType is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafStatementType.
|
||||
type TWafStatementType string
|
||||
|
||||
// TWafTextTransformation is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TWafTextTransformation.
|
||||
type TWafTextTransformation string
|
||||
|
||||
// TextTransformations is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.TextTransformations.
|
||||
type TextTransformations []TWafTextTransformation
|
||||
|
||||
// WafAddresses is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.WafAddresses.
|
||||
type WafAddresses []string
|
||||
|
||||
// WafRegexPatterns is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.WafRegexPatterns.
|
||||
type WafRegexPatterns []string
|
||||
|
||||
@@ -57,17 +57,11 @@ type WafInstanceDetails struct {
|
||||
apis.EnabledStatusInfrasResourceBaseDetails
|
||||
ManagedResourceInfo
|
||||
CloudregionResourceInfo
|
||||
SWafInstance
|
||||
|
||||
Rules []SWafRule
|
||||
}
|
||||
|
||||
type SWafRule struct {
|
||||
Id string
|
||||
Name string
|
||||
Priority int
|
||||
Action *cloudprovider.DefaultAction
|
||||
}
|
||||
|
||||
type WafInstanceListInput struct {
|
||||
apis.EnabledStatusInfrasResourceBaseListInput
|
||||
apis.ExternalizedResourceBaseListInput
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
|
||||
package compute
|
||||
|
||||
import "yunion.io/x/onecloud/pkg/apis"
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
const (
|
||||
WAF_IPSET_STATUS_AVAILABLE = "available"
|
||||
@@ -24,6 +26,7 @@ const (
|
||||
|
||||
type WafIPSetDetails struct {
|
||||
apis.StatusInfrasResourceBaseDetails
|
||||
SWafIPSet
|
||||
}
|
||||
|
||||
type WafIPSetListInput struct {
|
||||
@@ -34,6 +37,7 @@ type WafIPSetCacheDetails struct {
|
||||
apis.StatusStandaloneResourceDetails
|
||||
ManagedResourceInfo
|
||||
CloudregionResourceInfo
|
||||
SWafIPSetCache
|
||||
}
|
||||
|
||||
type WafIPSetCacheListInput struct {
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
|
||||
package compute
|
||||
|
||||
import "yunion.io/x/onecloud/pkg/apis"
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
const (
|
||||
WAF_REGEX_SET_STATUS_AVAILABLE = "available"
|
||||
@@ -24,6 +26,7 @@ const (
|
||||
|
||||
type WafRegexSetDetails struct {
|
||||
apis.StatusInfrasResourceBaseDetails
|
||||
SWafRegexSet
|
||||
}
|
||||
|
||||
type WafRegexSetListInput struct {
|
||||
@@ -34,6 +37,7 @@ type WafRegexSetCacheDetails struct {
|
||||
apis.StatusStandaloneResourceDetails
|
||||
ManagedResourceInfo
|
||||
CloudregionResourceInfo
|
||||
SWafRegexSetCache
|
||||
}
|
||||
|
||||
type WafRegexSetCacheListInput struct {
|
||||
|
||||
@@ -23,6 +23,7 @@ const (
|
||||
|
||||
type WafRuleGroupDetails struct {
|
||||
apis.StatusInfrasResourceBaseDetails
|
||||
SWafRuleGroup
|
||||
}
|
||||
|
||||
type WafRuleGroupListInput struct {
|
||||
@@ -40,6 +41,7 @@ type WafRuleGroupCacheDetails struct {
|
||||
apis.StatusStandaloneResourceDetails
|
||||
ManagedResourceInfo
|
||||
CloudregionResourceInfo
|
||||
SWafRuleGroupCache
|
||||
}
|
||||
|
||||
type WafRuleGroupCacheListInput struct {
|
||||
|
||||
@@ -65,6 +65,7 @@ type WafRuleCreateInput struct {
|
||||
|
||||
type WafRuleDetails struct {
|
||||
apis.StatusStandaloneResourceDetails
|
||||
SWafRule
|
||||
|
||||
Statements []cloudprovider.SWafStatement
|
||||
}
|
||||
|
||||
@@ -17,10 +17,49 @@ package compute
|
||||
import (
|
||||
time "time"
|
||||
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
"yunion.io/x/onecloud/pkg/apis/cloudprovider"
|
||||
)
|
||||
|
||||
// SAccessGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroup.
|
||||
type SAccessGroup struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
IsDirty bool `json:"is_dirty"`
|
||||
}
|
||||
|
||||
// SAccessGroupCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroupCache.
|
||||
type SAccessGroupCache struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SCloudregionResourceBase
|
||||
SManagedResourceBase
|
||||
SAccessGroupResourceBase
|
||||
// 已关联的挂载点数量
|
||||
MountTargetCount int `json:"mount_target_count"`
|
||||
FileSystemType string `json:"file_system_type"`
|
||||
NetworkType string `json:"network_type"`
|
||||
}
|
||||
|
||||
// SAccessGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroupResourceBase.
|
||||
type SAccessGroupResourceBase struct {
|
||||
// 权限组Id
|
||||
AccessGroupId string `json:"access_group_id"`
|
||||
}
|
||||
|
||||
// SAccessGroupRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroupRule.
|
||||
type SAccessGroupRule struct {
|
||||
apis.SResourceBase
|
||||
SAccessGroupResourceBase
|
||||
Id string `json:"id"`
|
||||
Priority int `json:"priority"`
|
||||
Source string `json:"source"`
|
||||
RWAccessType string `json:"rw_access_type"`
|
||||
UserAccessType string `json:"user_access_type"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// SAwsCachedLb is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAwsCachedLb.
|
||||
type SAwsCachedLb struct {
|
||||
apis.SVirtualResourceBase
|
||||
@@ -78,20 +117,28 @@ type SBillingResourceBase struct {
|
||||
AutoRenew bool `json:"auto_renew"`
|
||||
}
|
||||
|
||||
// SBillingResourceCheck is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBillingResourceCheck.
|
||||
type SBillingResourceCheck struct {
|
||||
apis.SResourceBase
|
||||
ResourceId string `json:"resource_id"`
|
||||
ResourceType string `json:"resource_type"`
|
||||
AdvanceDays int `json:"advance_days"`
|
||||
}
|
||||
|
||||
// SBucket is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBucket.
|
||||
type SBucket struct {
|
||||
apis.SSharableVirtualResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SCloudregionResourceBase
|
||||
SManagedResourceBase
|
||||
StorageClass string `json:"storage_class"`
|
||||
Location string `json:"location"`
|
||||
Acl string `json:"acl"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
ObjectCnt int `json:"object_cnt"`
|
||||
SizeBytesLimit int64 `json:"size_bytes_limit"`
|
||||
ObjectCntLimit int `json:"object_cnt_limit"`
|
||||
AccessUrls interface{} `json:"access_urls"`
|
||||
StorageClass string `json:"storage_class"`
|
||||
Location string `json:"location"`
|
||||
Acl string `json:"acl"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
ObjectCnt int `json:"object_cnt"`
|
||||
SizeBytesLimit int64 `json:"size_bytes_limit"`
|
||||
ObjectCntLimit int `json:"object_cnt_limit"`
|
||||
AccessUrls jsonutils.JSONObject `json:"access_urls"`
|
||||
}
|
||||
|
||||
// SCachedLoadbalancerAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCachedLoadbalancerAcl.
|
||||
@@ -123,7 +170,7 @@ type SCachedimage struct {
|
||||
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"`
|
||||
Info jsonutils.JSONObject `json:"info"`
|
||||
// 上此同步时间
|
||||
// example: 2020-01-17T05:28:54.000000Z
|
||||
LastSync time.Time `json:"last_sync"`
|
||||
@@ -188,12 +235,12 @@ type SCloudaccount struct {
|
||||
// 云API版本
|
||||
Version string `json:"version"`
|
||||
// 云系统信息
|
||||
Sysinfo interface{} `json:"sysinfo"`
|
||||
Sysinfo jsonutils.JSONObject `json:"sysinfo"`
|
||||
// 品牌信息, 一般和provider相同
|
||||
// example: DStack
|
||||
Brand string `json:"brand"`
|
||||
// 额外信息
|
||||
Options interface{} `json:"options"`
|
||||
Options *jsonutils.JSONDict `json:"options"`
|
||||
// for backward compatiblity, keep is_public field, but not usable
|
||||
// IsPublic bool `default:"false" nullable:"false"`
|
||||
// add share_mode field to indicate the share range of this account
|
||||
@@ -203,6 +250,7 @@ type SCloudaccount struct {
|
||||
// 公有云子账号登录地址
|
||||
IamLoginUrl string `json:"iam_login_url"`
|
||||
SAMLAuth *bool `json:"saml_auth,omitempty"`
|
||||
SProjectMappingResourceBase
|
||||
}
|
||||
|
||||
// SCloudimage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudimage.
|
||||
@@ -236,6 +284,7 @@ type SCloudprovider struct {
|
||||
CloudaccountId string `json:"cloudaccount_id"`
|
||||
// 云账号的平台信息
|
||||
Provider string `json:"provider"`
|
||||
SProjectMappingResourceBase
|
||||
}
|
||||
|
||||
// SCloudproviderCapability is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudproviderCapability.
|
||||
@@ -279,9 +328,9 @@ type SCloudproviderregion struct {
|
||||
CloudproviderId string `json:"cloudprovider_id"`
|
||||
Enabled bool `json:"enabled"`
|
||||
// SyncIntervalSeconds int `list:"domain"`
|
||||
SyncResults interface{} `json:"sync_results"`
|
||||
LastDeepSyncAt time.Time `json:"last_deep_sync_at"`
|
||||
LastAutoSyncAt time.Time `json:"last_auto_sync_at"`
|
||||
SyncResults jsonutils.JSONObject `json:"sync_results"`
|
||||
LastDeepSyncAt time.Time `json:"last_deep_sync_at"`
|
||||
LastAutoSyncAt time.Time `json:"last_auto_sync_at"`
|
||||
}
|
||||
|
||||
// SCloudproviderschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudproviderschedtag.
|
||||
@@ -293,6 +342,7 @@ type SCloudproviderschedtag struct {
|
||||
// SCloudregion is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregion.
|
||||
type SCloudregion struct {
|
||||
apis.SEnabledStatusStandaloneResourceBase
|
||||
SI18nResourceBase
|
||||
SManagedResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
cloudprovider.SGeographicInfo
|
||||
@@ -504,6 +554,7 @@ type SDisk struct {
|
||||
SBillingResourceBase
|
||||
SStorageResourceBase
|
||||
apis.SMultiArchResourceBase
|
||||
apis.SAutoDeleteResourceBase
|
||||
// 磁盘存储类型
|
||||
// example: qcow2
|
||||
DiskFormat string `json:"disk_format"`
|
||||
@@ -512,9 +563,6 @@ type SDisk struct {
|
||||
DiskSize int `json:"disk_size"`
|
||||
// 磁盘路径
|
||||
AccessPath string `json:"access_path"`
|
||||
// 是否跟随云主机自动删除, 仅绑定到云主机时才生效
|
||||
// example: false
|
||||
AutoDelete bool `json:"auto_delete"`
|
||||
// 备份磁盘实例的存储ID
|
||||
BackupStorageId string `json:"backup_storage_id"`
|
||||
// 镜像Id
|
||||
@@ -569,18 +617,18 @@ type SDnsRecordSetTrafficPolicy struct {
|
||||
// SDnsTrafficPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsTrafficPolicy.
|
||||
type SDnsTrafficPolicy struct {
|
||||
apis.SEnabledStatusInfrasResourceBase
|
||||
Provider string `json:"provider"`
|
||||
PolicyType string `json:"policy_type"`
|
||||
PolicyValue string `json:"policy_value"`
|
||||
Options interface{} `json:"options"`
|
||||
Provider string `json:"provider"`
|
||||
PolicyType string `json:"policy_type"`
|
||||
PolicyValue string `json:"policy_value"`
|
||||
Options *jsonutils.JSONDict `json:"options"`
|
||||
}
|
||||
|
||||
// SDnsZone is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsZone.
|
||||
type SDnsZone struct {
|
||||
apis.SEnabledStatusInfrasResourceBase
|
||||
IsDirty bool `json:"is_dirty"`
|
||||
ZoneType string `json:"zone_type"`
|
||||
Options interface{} `json:"options"`
|
||||
IsDirty bool `json:"is_dirty"`
|
||||
ZoneType string `json:"zone_type"`
|
||||
Options *jsonutils.JSONDict `json:"options"`
|
||||
}
|
||||
|
||||
// SDnsZoneCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsZoneCache.
|
||||
@@ -615,6 +663,42 @@ type SDynamicschedtag struct {
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
}
|
||||
|
||||
// SElasticSearch is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticSearch.
|
||||
type SElasticSearch struct {
|
||||
apis.SVirtualResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SBillingResourceBase
|
||||
SCloudregionResourceBase
|
||||
SDeletePreventableResourceBase
|
||||
// 版本
|
||||
Version string `json:"version"`
|
||||
// 套餐名称
|
||||
// example: elasticsearch.sn2ne.xlarge
|
||||
InstanceType string `json:"instance_type"`
|
||||
// CPU数量
|
||||
// example: 1
|
||||
VcpuCount int `json:"vcpu_count"`
|
||||
// 内存大小
|
||||
// example: 1024
|
||||
VmemSizeGb int `json:"vmem_size_gb"`
|
||||
// 存储类型
|
||||
// example: local_ssd
|
||||
StorageType string `json:"storage_type"`
|
||||
// 存储大小
|
||||
// example: 1024
|
||||
DiskSizeGb int `json:"disk_size_gb"`
|
||||
// 实例类型
|
||||
// example: ha
|
||||
Category string `json:"category"`
|
||||
VpcId string `json:"vpc_id"`
|
||||
NetworkId string `json:"network_id"`
|
||||
// 可用区Id
|
||||
ZoneId string `json:"zone_id"`
|
||||
// 是否是多可用区部署
|
||||
IsMultiAz bool `json:"is_multi_az"`
|
||||
}
|
||||
|
||||
// SElasticcache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcache.
|
||||
type SElasticcache struct {
|
||||
apis.SVirtualResourceBase
|
||||
@@ -839,6 +923,32 @@ type SExternalProject struct {
|
||||
CloudaccountId string `json:"cloudaccount_id"`
|
||||
}
|
||||
|
||||
// SFileSystem is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SFileSystem.
|
||||
type SFileSystem struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SBillingResourceBase
|
||||
SCloudregionResourceBase
|
||||
SZoneResourceBase
|
||||
SDeletePreventableResourceBase
|
||||
// 文件系统类型
|
||||
// enmu: extreme, standard, cpfs
|
||||
FileSystemType string `json:"file_system_type"`
|
||||
// 存储类型
|
||||
// enmu: performance, capacity, standard, advance, advance_100, advance_200
|
||||
StorageType string `json:"storage_type"`
|
||||
// 协议类型
|
||||
// enum: NFS, SMB, cpfs
|
||||
Protocol string `json:"protocol"`
|
||||
// 容量, 单位Gb
|
||||
Capacity int64 `json:"capacity"`
|
||||
// 已使用容量, 单位Gb
|
||||
UsedCapacity int64 `json:"used_capacity"`
|
||||
// 最多支持挂载点数量, -1代表无限制
|
||||
MountTargetCountLimit int `json:"mount_target_count_limit"`
|
||||
}
|
||||
|
||||
// SGlobalVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGlobalVpc.
|
||||
type SGlobalVpc struct {
|
||||
apis.SEnabledStatusInfrasResourceBase
|
||||
@@ -932,7 +1042,8 @@ type SGuest struct {
|
||||
// example: kvm
|
||||
Hypervisor string `json:"hypervisor"`
|
||||
// 套餐名称
|
||||
InstanceType string `json:"instance_type"`
|
||||
InstanceType string `json:"instance_type"`
|
||||
SshableLastState *bool `json:"sshable_last_state,omitempty"`
|
||||
}
|
||||
|
||||
// SGuestJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestJointsBase.
|
||||
@@ -962,7 +1073,7 @@ type SGuestTemplate struct {
|
||||
// 计费方式
|
||||
BillingType string `json:"billing_type"`
|
||||
// 其他配置信息
|
||||
Content interface{} `json:"content"`
|
||||
Content jsonutils.JSONObject `json:"content"`
|
||||
}
|
||||
|
||||
// SGuestTemplateResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestTemplateResourceBase.
|
||||
@@ -1054,7 +1165,7 @@ type SHost struct {
|
||||
// 管理地址
|
||||
ManagerUri string `json:"manager_uri"`
|
||||
// 系统信息
|
||||
SysInfo interface{} `json:"sys_info"`
|
||||
SysInfo jsonutils.JSONObject `json:"sys_info"`
|
||||
// 物理机序列号信息
|
||||
SN string `json:"sn"`
|
||||
// CPU核数
|
||||
@@ -1088,11 +1199,11 @@ type SHost struct {
|
||||
// 存储驱动类型
|
||||
StorageDriver string `json:"storage_driver"`
|
||||
// 存储详情
|
||||
StorageInfo interface{} `json:"storage_info"`
|
||||
StorageInfo jsonutils.JSONObject `json:"storage_info"`
|
||||
// IPMI地址
|
||||
IpmiIp string `json:"ipmi_ip"`
|
||||
// IPMI详情
|
||||
IpmiInfo interface{} `json:"ipmi_info"`
|
||||
IpmiInfo jsonutils.JSONObject `json:"ipmi_info"`
|
||||
// 宿主机状态
|
||||
// example: online
|
||||
HostStatus string `json:"host_status"`
|
||||
@@ -1118,6 +1229,8 @@ type SHost struct {
|
||||
BootMode string `json:"boot_mode"`
|
||||
// IPv4地址,作为么有云vpc访问外网时的网关
|
||||
OvnMappedIpAddr string `json:"ovn_mapped_ip_addr"`
|
||||
// UEFI详情
|
||||
UefiInfo jsonutils.JSONObject `json:"uefi_info"`
|
||||
}
|
||||
|
||||
// SHostJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostJointsBase.
|
||||
@@ -1161,7 +1274,7 @@ type SHoststorage struct {
|
||||
// 是否是根分区
|
||||
IsRootPartition bool `json:"is_root_partition"`
|
||||
// 配置信息
|
||||
Config interface{} `json:"config"`
|
||||
Config *jsonutils.JSONArray `json:"config"`
|
||||
// 真实容量大小
|
||||
RealCapacity int64 `json:"real_capacity"`
|
||||
}
|
||||
@@ -1210,6 +1323,10 @@ type SHuaweiCachedLbbg struct {
|
||||
ProtocolType string `json:"protocol_type"`
|
||||
}
|
||||
|
||||
// SI18nResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SI18nResourceBase.
|
||||
type SI18nResourceBase struct {
|
||||
}
|
||||
|
||||
// SInstanceSnapshot is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInstanceSnapshot.
|
||||
type SInstanceSnapshot struct {
|
||||
apis.SVirtualResourceBase
|
||||
@@ -1220,15 +1337,15 @@ type SInstanceSnapshot struct {
|
||||
// 云主机Id
|
||||
GuestId string `json:"guest_id"`
|
||||
// 云主机配置
|
||||
ServerConfig interface{} `json:"server_config"`
|
||||
ServerConfig jsonutils.JSONObject `json:"server_config"`
|
||||
// 云主机标签
|
||||
ServerMetadata interface{} `json:"server_metadata"`
|
||||
ServerMetadata jsonutils.JSONObject `json:"server_metadata"`
|
||||
// 是否自动删除
|
||||
AutoDelete bool `json:"auto_delete"`
|
||||
// 引用次数
|
||||
RefCount int `json:"ref_count"`
|
||||
// 安全组
|
||||
SecGroups interface{} `json:"sec_groups"`
|
||||
SecGroups jsonutils.JSONObject `json:"sec_groups"`
|
||||
// 秘钥Id
|
||||
KeypairId string `json:"keypair_id"`
|
||||
// 操作系统类型
|
||||
@@ -1300,6 +1417,40 @@ type SIsolatedDevice struct {
|
||||
ReservedStorage int `json:"reserved_storage"`
|
||||
}
|
||||
|
||||
// SKafka is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKafka.
|
||||
type SKafka struct {
|
||||
apis.SVirtualResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SBillingResourceBase
|
||||
SCloudregionResourceBase
|
||||
SDeletePreventableResourceBase
|
||||
// 版本
|
||||
Version string `json:"version"`
|
||||
// 套餐名称
|
||||
// example: elasticsearch.sn2ne.xlarge
|
||||
InstanceType string `json:"instance_type"`
|
||||
// 存储类型
|
||||
// example: local_ssd
|
||||
StorageType string `json:"storage_type"`
|
||||
// 存储大小
|
||||
// example: 1024
|
||||
DiskSizeGb int `json:"disk_size_gb"`
|
||||
// 带宽峰值
|
||||
// example: 1024
|
||||
BandwidthMb int `json:"bandwidth_mb"`
|
||||
// 消息保留时长
|
||||
MsgRetentionMinute int `json:"msg_retention_minute"`
|
||||
// 连接端点
|
||||
Endpoint string `json:"endpoint"`
|
||||
VpcId string `json:"vpc_id"`
|
||||
NetworkId string `json:"network_id"`
|
||||
// 可用区Id
|
||||
ZoneId string `json:"zone_id"`
|
||||
// 是否是多可用区部署
|
||||
IsMultiAz bool `json:"is_multi_az"`
|
||||
}
|
||||
|
||||
// SKeypair is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKeypair.
|
||||
type SKeypair struct {
|
||||
apis.SUserResourceBase
|
||||
@@ -1345,7 +1496,7 @@ type SLoadbalancer struct {
|
||||
// 默认后端服务器组Id
|
||||
BackendGroupId string `json:"backend_group_id"`
|
||||
// LB的其他配置信息
|
||||
LBInfo interface{} `json:"lb_info"`
|
||||
LBInfo jsonutils.JSONObject `json:"lb_info"`
|
||||
}
|
||||
|
||||
// SLoadbalancerAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAcl.
|
||||
@@ -1647,6 +1798,85 @@ type SManagedResourceBase struct {
|
||||
ManagerId string `json:"manager_id"`
|
||||
}
|
||||
|
||||
// SMongoDB is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMongoDB.
|
||||
type SMongoDB struct {
|
||||
apis.SVirtualResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SBillingResourceBase
|
||||
SCloudregionResourceBase
|
||||
SZoneResourceBase
|
||||
SDeletePreventableResourceBase
|
||||
// CPU数量
|
||||
// example: 1
|
||||
VcpuCount int `json:"vcpu_count"`
|
||||
// 内存大小
|
||||
// example: 1024
|
||||
VmemSizeMb int `json:"vmem_size_mb"`
|
||||
// 存储大小, 单位Mb
|
||||
// example: 10240
|
||||
DiskSizeMb int `json:"disk_size_mb"`
|
||||
// 端口
|
||||
// example: 3306
|
||||
Port int `json:"port"`
|
||||
// 实例类型
|
||||
// example: ha
|
||||
Category string `json:"category"`
|
||||
// 分片数量
|
||||
// example: 3
|
||||
ReplicationNum int `json:"replication_num"`
|
||||
// 实例IP地址
|
||||
IpAddr string `json:"ip_addr"`
|
||||
// 引擎
|
||||
// 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: ed20d84e-3158-41b1-870c-1725e412e8b6
|
||||
VpcId string `json:"vpc_id"`
|
||||
// 所属网络ID
|
||||
NetworkId string `json:"network_id"`
|
||||
}
|
||||
|
||||
// SMountTarget is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMountTarget.
|
||||
type SMountTarget struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SVpcResourceBase
|
||||
SNetworkResourceBase
|
||||
SAccessGroupResourceBase
|
||||
NetworkType string `json:"network_type"`
|
||||
DomainName string `json:"domain_name"`
|
||||
FileSystemId string `json:"file_system_id"`
|
||||
}
|
||||
|
||||
// SNasSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNasSku.
|
||||
type SNasSku struct {
|
||||
apis.SEnabledStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SCloudregionResourceBase
|
||||
PrepaidStatus string `json:"prepaid_status"`
|
||||
// 预付费资源状态 available|soldout
|
||||
PostpaidStatus string `json:"postpaid_status"`
|
||||
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"`
|
||||
NetworkTypes string `json:"network_types"`
|
||||
FileSystemType string `json:"file_system_type"`
|
||||
Protocol string `json:"protocol"`
|
||||
Provider string `json:"provider"`
|
||||
ZoneIds string `json:"zone_ids"`
|
||||
}
|
||||
|
||||
// SNatDEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatDEntry.
|
||||
type SNatDEntry struct {
|
||||
SNatEntry
|
||||
@@ -1668,10 +1898,13 @@ type SNatEntry struct {
|
||||
type SNatGateway struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
// SManagedResourceBase
|
||||
SBillingResourceBase
|
||||
SVpcResourceBase
|
||||
NatSpec string `json:"nat_spec"`
|
||||
SDeletePreventableResourceBase
|
||||
NetworkId string `json:"network_id"`
|
||||
IpAddr string `json:"ip_addr"`
|
||||
BandwidthMb int `json:"bandwidth_mb"`
|
||||
NatSpec string `json:"nat_spec"`
|
||||
}
|
||||
|
||||
// SNatSEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatSEntry.
|
||||
@@ -1682,6 +1915,18 @@ type SNatSEntry struct {
|
||||
SourceCIDR string `json:"source_cidr"`
|
||||
}
|
||||
|
||||
// SNatSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatSku.
|
||||
type SNatSku struct {
|
||||
apis.SEnabledStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SCloudregionResourceBase
|
||||
PrepaidStatus string `json:"prepaid_status"`
|
||||
// 预付费资源状态 available|soldout
|
||||
PostpaidStatus string `json:"postpaid_status"`
|
||||
Provider string `json:"provider"`
|
||||
ZoneIds string `json:"zone_ids"`
|
||||
}
|
||||
|
||||
// SNatgatewayResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatgatewayResourceBase.
|
||||
type SNatgatewayResourceBase struct {
|
||||
NatgatewayId string `json:"natgateway_id"`
|
||||
@@ -1830,7 +2075,7 @@ type SPolicyDefinition struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
// 参数
|
||||
Parameters interface{} `json:"parameters"`
|
||||
Parameters *jsonutils.JSONDict `json:"parameters"`
|
||||
// 条件
|
||||
Condition string `json:"condition"`
|
||||
// 类别
|
||||
@@ -1843,6 +2088,17 @@ type SPolicyDefinitionResourceBase struct {
|
||||
PolicydefinitionId string `json:"policydefinition_id"`
|
||||
}
|
||||
|
||||
// SProjectMapping is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SProjectMapping.
|
||||
type SProjectMapping struct {
|
||||
apis.SEnabledStatusInfrasResourceBase
|
||||
Rules *MappingRules `json:"rules"`
|
||||
}
|
||||
|
||||
// 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
|
||||
@@ -2102,6 +2358,8 @@ type SSecurityGroupCache struct {
|
||||
SCloudregionResourceBase
|
||||
SManagedResourceBase
|
||||
SSecurityGroupResourceBase
|
||||
// 被其他安全组引用的次数
|
||||
ReferenceCount int `json:"reference_count"`
|
||||
// 虚拟私有网络外部Id
|
||||
VpcId string `json:"vpc_id"`
|
||||
ExternalProjectId string `json:"external_project_id"`
|
||||
@@ -2117,14 +2375,15 @@ type SSecurityGroupResourceBase struct {
|
||||
type SSecurityGroupRule struct {
|
||||
apis.SResourceBase
|
||||
SSecurityGroupResourceBase
|
||||
Id string `json:"id"`
|
||||
Priority int64 `json:"priority"`
|
||||
Protocol string `json:"protocol"`
|
||||
Ports string `json:"ports"`
|
||||
Direction string `json:"direction"`
|
||||
CIDR string `json:"cidr"`
|
||||
Action string `json:"action"`
|
||||
Description string `json:"description"`
|
||||
Id string `json:"id"`
|
||||
Priority int64 `json:"priority"`
|
||||
Protocol string `json:"protocol"`
|
||||
Ports string `json:"ports"`
|
||||
Direction string `json:"direction"`
|
||||
CIDR string `json:"cidr"`
|
||||
Action string `json:"action"`
|
||||
Description string `json:"description"`
|
||||
PeerSecgroupId string `json:"peer_secgroup_id"`
|
||||
}
|
||||
|
||||
// SServerSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SServerSku.
|
||||
@@ -2141,7 +2400,9 @@ type SServerSku struct {
|
||||
LocalCategory string `json:"local_category"`
|
||||
PrepaidStatus string `json:"prepaid_status"`
|
||||
// 预付费资源状态 available|soldout
|
||||
PostpaidStatus string `json:"postpaid_status"`
|
||||
PostpaidStatus string `json:"postpaid_status"`
|
||||
CpuArch string `json:"cpu_arch"`
|
||||
// CPU 架构 x86|xarm
|
||||
CpuCoreCount int `json:"cpu_core_count"`
|
||||
MemorySizeMB int `json:"memory_size_mb"`
|
||||
OsName string `json:"os_name"`
|
||||
@@ -2253,7 +2514,7 @@ type SStorage struct {
|
||||
// 超售比
|
||||
Cmtbound float32 `json:"cmtbound"`
|
||||
// 存储配置信息
|
||||
StorageConf interface{} `json:"storage_conf"`
|
||||
StorageConf jsonutils.JSONObject `json:"storage_conf"`
|
||||
// 存储缓存Id
|
||||
StoragecacheId string `json:"storagecache_id"`
|
||||
// indicating whether system disk can be allocated in this storage
|
||||
@@ -2331,10 +2592,10 @@ type SVCenter struct {
|
||||
// = 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"`
|
||||
Sysinfo interface{} `json:"sysinfo"`
|
||||
Password string `json:"password"`
|
||||
LastSync time.Time `json:"last_sync"`
|
||||
Version string `json:"version"`
|
||||
Sysinfo jsonutils.JSONObject `json:"sysinfo"`
|
||||
}
|
||||
|
||||
// SVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVpc.
|
||||
@@ -2371,10 +2632,99 @@ type SVpcResourceBase struct {
|
||||
VpcId string `json:"vpc_id"`
|
||||
}
|
||||
|
||||
// SWafIPSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafIPSet.
|
||||
type SWafIPSet struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
Addresses *cloudprovider.WafAddresses `json:"addresses"`
|
||||
}
|
||||
|
||||
// SWafIPSetCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafIPSetCache.
|
||||
type SWafIPSetCache struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SCloudregionResourceBase
|
||||
Type string `json:"type"`
|
||||
WafIPSetId string `json:"waf_ip_set_id"`
|
||||
}
|
||||
|
||||
// SWafInstance is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafInstance.
|
||||
type SWafInstance struct {
|
||||
apis.SEnabledStatusInfrasResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SCloudregionResourceBase
|
||||
Type string `json:"type"`
|
||||
DefaultAction *cloudprovider.DefaultAction `json:"default_action"`
|
||||
}
|
||||
|
||||
// SWafRegexSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRegexSet.
|
||||
type SWafRegexSet struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
RegexPatterns *cloudprovider.WafRegexPatterns `json:"regex_patterns"`
|
||||
}
|
||||
|
||||
// SWafRegexSetCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRegexSetCache.
|
||||
type SWafRegexSetCache struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SCloudregionResourceBase
|
||||
Type string `json:"type"`
|
||||
WafRegexSetId string `json:"waf_regex_set_id"`
|
||||
}
|
||||
|
||||
// SWafRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRule.
|
||||
type SWafRule struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
// 规则优先级
|
||||
Priority int `json:"priority"`
|
||||
// 规则默认行为
|
||||
Action *cloudprovider.DefaultAction `json:"action"`
|
||||
// 条件
|
||||
StatementConditon string `json:"statement_conditon"`
|
||||
// 规则组的id
|
||||
WafRuleGroupId string `json:"waf_rule_group_id"`
|
||||
// 所属waf实例id
|
||||
WafInstanceId string `json:"waf_instance_id"`
|
||||
}
|
||||
|
||||
// SWafRuleGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRuleGroup.
|
||||
type SWafRuleGroup struct {
|
||||
apis.SStatusInfrasResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
// 支持的WAF类型,仅is_system=true时有效
|
||||
WafType string `json:"waf_type"`
|
||||
Provider string `json:"provider"`
|
||||
CloudEnv string `json:"cloud_env"`
|
||||
IsSystem bool `json:"is_system"`
|
||||
}
|
||||
|
||||
// SWafRuleGroupCache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRuleGroupCache.
|
||||
type SWafRuleGroupCache struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SManagedResourceBase
|
||||
SCloudregionResourceBase
|
||||
Type string `json:"type"`
|
||||
WafRuleGroupId string `json:"waf_rule_group_id"`
|
||||
}
|
||||
|
||||
// SWafRuleStatement is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRuleStatement.
|
||||
type SWafRuleStatement struct {
|
||||
apis.SResourceBase
|
||||
Id string `json:"id"`
|
||||
cloudprovider.SWafStatement
|
||||
WafRuleId string `json:"waf_rule_id"`
|
||||
}
|
||||
|
||||
// SWire is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWire.
|
||||
type SWire struct {
|
||||
apis.SInfrasResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
apis.SStatusResourceBase
|
||||
// SManagedResourceBase
|
||||
SVpcResourceBase
|
||||
SZoneResourceBase
|
||||
// 带宽大小, 单位Mbps
|
||||
@@ -2397,6 +2747,7 @@ type SWireResourceBase struct {
|
||||
type SZone struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SExternalizedResourceBase
|
||||
SI18nResourceBase
|
||||
SCloudregionResourceBase
|
||||
Location string `json:"location"`
|
||||
Contacts string `json:"contacts"`
|
||||
|
||||
@@ -17,6 +17,8 @@ package identity
|
||||
import (
|
||||
time "time"
|
||||
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
@@ -33,33 +35,33 @@ type SAssignment struct {
|
||||
// SConfigOption is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SConfigOption.
|
||||
type SConfigOption struct {
|
||||
apis.SResourceBase
|
||||
ResType string `json:"res_type"`
|
||||
ResId string `json:"domain_id"`
|
||||
Group string `json:"group"`
|
||||
Option string `json:"option"`
|
||||
Value interface{} `json:"value"`
|
||||
ResType string `json:"res_type"`
|
||||
ResId string `json:"domain_id"`
|
||||
Group string `json:"group"`
|
||||
Option string `json:"option"`
|
||||
Value jsonutils.JSONObject `json:"value"`
|
||||
}
|
||||
|
||||
// SCredential is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SCredential.
|
||||
type SCredential struct {
|
||||
apis.SStandaloneResourceBase
|
||||
UserId string `json:"user_id"`
|
||||
ProjectId string `json:"project_id"`
|
||||
Type string `json:"type"`
|
||||
KeyHash string `json:"key_hash"`
|
||||
Extra interface{} `json:"extra"`
|
||||
EncryptedBlob string `json:"encrypted_blob"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
UserId string `json:"user_id"`
|
||||
ProjectId string `json:"project_id"`
|
||||
Type string `json:"type"`
|
||||
KeyHash string `json:"key_hash"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
EncryptedBlob string `json:"encrypted_blob"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
}
|
||||
|
||||
// SDomain is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SDomain.
|
||||
type SDomain struct {
|
||||
apis.SStandaloneResourceBase
|
||||
Extra interface{} `json:"extra"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
IsDomain *bool `json:"is_domain,omitempty"`
|
||||
DomainId string `json:"domain_id"`
|
||||
ParentId string `json:"parent_id"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
IsDomain *bool `json:"is_domain,omitempty"`
|
||||
DomainId string `json:"domain_id"`
|
||||
ParentId string `json:"parent_id"`
|
||||
}
|
||||
|
||||
// SEnabledIdentityBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SEnabledIdentityBaseResource.
|
||||
@@ -71,14 +73,14 @@ type SEnabledIdentityBaseResource struct {
|
||||
// SEndpoint is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SEndpoint.
|
||||
type SEndpoint struct {
|
||||
apis.SStandaloneResourceBase
|
||||
LegacyEndpointId string `json:"legacy_endpoint_id"`
|
||||
Interface string `json:"interface"`
|
||||
ServiceId string `json:"service_id"`
|
||||
Url string `json:"url"`
|
||||
Extra interface{} `json:"extra"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
RegionId string `json:"region_id"`
|
||||
ServiceCertificateId string `json:"service_certificate_id"`
|
||||
LegacyEndpointId string `json:"legacy_endpoint_id"`
|
||||
Interface string `json:"interface"`
|
||||
ServiceId string `json:"service_id"`
|
||||
Url string `json:"url"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
RegionId string `json:"region_id"`
|
||||
ServiceCertificateId string `json:"service_certificate_id"`
|
||||
}
|
||||
|
||||
// SFederatedUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFederatedUser.
|
||||
@@ -116,7 +118,7 @@ type SGroup struct {
|
||||
type SIdentityBaseResource struct {
|
||||
apis.SStandaloneResourceBase
|
||||
apis.SDomainizedResourceBase
|
||||
Extra interface{} `json:"extra"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
}
|
||||
|
||||
// SIdentityProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityProvider.
|
||||
@@ -202,7 +204,7 @@ type SPolicy struct {
|
||||
// Deprecated
|
||||
Type string `json:"type"`
|
||||
// 权限定义
|
||||
Blob interface{} `json:"blob"`
|
||||
Blob jsonutils.JSONObject `json:"blob"`
|
||||
// 权限范围
|
||||
Scope string `json:"scope"`
|
||||
// 是否为系统权限
|
||||
@@ -225,8 +227,8 @@ type SProjectExtended struct {
|
||||
// SRegion is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRegion.
|
||||
type SRegion struct {
|
||||
apis.SStandaloneResourceBase
|
||||
ParentRegionId string `json:"parent_region_id"`
|
||||
Extra interface{} `json:"extra"`
|
||||
ParentRegionId string `json:"parent_region_id"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
}
|
||||
|
||||
// SRole is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRole.
|
||||
@@ -264,10 +266,10 @@ type SScopeResource struct {
|
||||
// SService is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SService.
|
||||
type SService struct {
|
||||
apis.SStandaloneResourceBase
|
||||
Type string `json:"type"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Extra interface{} `json:"extra"`
|
||||
ConfigVersion int `json:"config_version"`
|
||||
Type string `json:"type"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Extra *jsonutils.JSONDict `json:"extra"`
|
||||
ConfigVersion int `json:"config_version"`
|
||||
}
|
||||
|
||||
// SServiceCertificate is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SServiceCertificate.
|
||||
|
||||
@@ -17,6 +17,8 @@ package monitor
|
||||
import (
|
||||
time "time"
|
||||
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
@@ -27,25 +29,26 @@ type SAlert struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
SMonitorScopedResource
|
||||
// Frequency is evaluate period
|
||||
Frequency int64 `json:"frequency"`
|
||||
Settings interface{} `json:"settings"`
|
||||
Level string `json:"level"`
|
||||
Message string `json:"message"`
|
||||
UsedBy string `json:"used_by"`
|
||||
Frequency int64 `json:"frequency"`
|
||||
Settings jsonutils.JSONObject `json:"settings"`
|
||||
Level string `json:"level"`
|
||||
Message string `json:"message"`
|
||||
UsedBy string `json:"used_by"`
|
||||
// Silenced bool
|
||||
ExecutionError string `json:"execution_error"`
|
||||
// If an alert rule has a configured `For` and the query violates the configured threshold
|
||||
// it will first go from `OK` to `Pending`. Going from `OK` to `Pending` will not send any
|
||||
// notifications. Once the alert rule has been firing for more than `For` duration, it will
|
||||
// change to `Alerting` and send alert notifications.
|
||||
For int64 `json:"for"`
|
||||
EvalData interface{} `json:"eval_data"`
|
||||
State string `json:"state"`
|
||||
NoDataState string `json:"no_data_state"`
|
||||
ExecutionErrorState string `json:"execution_error_state"`
|
||||
LastStateChange time.Time `json:"last_state_change"`
|
||||
StateChanges int `json:"state_changes"`
|
||||
CustomizeConfig interface{} `json:"customize_config"`
|
||||
For int64 `json:"for"`
|
||||
EvalData jsonutils.JSONObject `json:"eval_data"`
|
||||
State string `json:"state"`
|
||||
NoDataState string `json:"no_data_state"`
|
||||
ExecutionErrorState string `json:"execution_error_state"`
|
||||
LastStateChange time.Time `json:"last_state_change"`
|
||||
StateChanges int `json:"state_changes"`
|
||||
CustomizeConfig jsonutils.JSONObject `json:"customize_config"`
|
||||
ResType string `json:"res_type"`
|
||||
}
|
||||
|
||||
// SAlertDashBoard is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertDashBoard.
|
||||
@@ -74,8 +77,8 @@ type SAlertJointsBase struct {
|
||||
type SAlertPanel struct {
|
||||
apis.SStatusStandaloneResourceBase
|
||||
apis.SScopedResourceBase
|
||||
Settings interface{} `json:"settings"`
|
||||
Message string `json:"message"`
|
||||
Settings jsonutils.JSONObject `json:"settings"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// SAlertRecord is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertRecord.
|
||||
@@ -84,13 +87,26 @@ type SAlertRecord struct {
|
||||
apis.SEnabledResourceBase
|
||||
apis.SStatusStandaloneResourceBase
|
||||
SMonitorScopedResource
|
||||
AlertId string `json:"alert_id"`
|
||||
Level string `json:"level"`
|
||||
State string `json:"state"`
|
||||
SendState string `json:"send_state"`
|
||||
EvalData interface{} `json:"eval_data"`
|
||||
AlertRule interface{} `json:"alert_rule"`
|
||||
ResType string `json:"res_type"`
|
||||
AlertId string `json:"alert_id"`
|
||||
Level string `json:"level"`
|
||||
State string `json:"state"`
|
||||
SendState string `json:"send_state"`
|
||||
EvalData jsonutils.JSONObject `json:"eval_data"`
|
||||
AlertRule jsonutils.JSONObject `json:"alert_rule"`
|
||||
ResType string `json:"res_type"`
|
||||
}
|
||||
|
||||
// SAlertRecordShield is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertRecordShield.
|
||||
type SAlertRecordShield struct {
|
||||
// db.SVirtualResourceBase
|
||||
apis.SEnabledResourceBase
|
||||
apis.SStatusStandaloneResourceBase
|
||||
SMonitorScopedResource
|
||||
AlertId string `json:"alert_id"`
|
||||
ResId string `json:"res_id"`
|
||||
ResType string `json:"res_type"`
|
||||
StartTime time.Time `json:"start_time"`
|
||||
EndTime time.Time `json:"end_time"`
|
||||
}
|
||||
|
||||
// SAlertResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertResource.
|
||||
@@ -102,10 +118,10 @@ type SAlertResource struct {
|
||||
// SAlertResourceAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertResourceAlert.
|
||||
type SAlertResourceAlert struct {
|
||||
SAlertResourceJointsBase
|
||||
AlertId string `json:"alert_id"`
|
||||
AlertRecordId string `json:"alert_record_id"`
|
||||
TriggerTime time.Time `json:"trigger_time"`
|
||||
Data interface{} `json:"data"`
|
||||
AlertId string `json:"alert_id"`
|
||||
AlertRecordId string `json:"alert_record_id"`
|
||||
TriggerTime time.Time `json:"trigger_time"`
|
||||
Data jsonutils.JSONObject `json:"data"`
|
||||
}
|
||||
|
||||
// SAlertResourceJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertResourceJointsBase.
|
||||
@@ -117,11 +133,11 @@ type SAlertResourceJointsBase struct {
|
||||
// SAlertnotification is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertnotification.
|
||||
type SAlertnotification struct {
|
||||
SAlertJointsBase
|
||||
NotificationId string `json:"notification_id"`
|
||||
State string `json:"state"`
|
||||
Index byte `json:"index"`
|
||||
UsedBy string `json:"used_by"`
|
||||
Params interface{} `json:"params"`
|
||||
NotificationId string `json:"notification_id"`
|
||||
State string `json:"state"`
|
||||
Index byte `json:"index"`
|
||||
UsedBy string `json:"used_by"`
|
||||
Params jsonutils.JSONObject `json:"params"`
|
||||
}
|
||||
|
||||
// SCommonAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SCommonAlert.
|
||||
@@ -176,6 +192,28 @@ type SMetricMeasurement struct {
|
||||
Score int `json:"score"`
|
||||
}
|
||||
|
||||
// SMonitorResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorResource.
|
||||
type SMonitorResource struct {
|
||||
apis.SVirtualResourceBase
|
||||
apis.SEnabledResourceBase
|
||||
AlertState string `json:"alert_state"`
|
||||
ResId string `json:"res_id"`
|
||||
ResType string `json:"res_type"`
|
||||
}
|
||||
|
||||
// SMonitorResourceAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorResourceAlert.
|
||||
type SMonitorResourceAlert struct {
|
||||
apis.SJointResourceBase
|
||||
MonitorResourceId string `json:"monitor_resource_id"`
|
||||
AlertId string `json:"alert_id"`
|
||||
AlertRecordId string `json:"alert_record_id"`
|
||||
ResType string `json:"res_type"`
|
||||
AlertState string `json:"alert_state"`
|
||||
SendState string `json:"send_state"`
|
||||
TriggerTime time.Time `json:"trigger_time"`
|
||||
Data jsonutils.JSONObject `json:"data"`
|
||||
}
|
||||
|
||||
// SMonitorScopedResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorScopedResource.
|
||||
type SMonitorScopedResource struct {
|
||||
apis.SScopedResourceBase
|
||||
@@ -194,9 +232,9 @@ type SNotification struct {
|
||||
SendReminder bool `json:"send_reminder"`
|
||||
DisableResolveMessage bool `json:"disable_resolve_message"`
|
||||
// unit is second
|
||||
Frequency int64 `json:"frequency"`
|
||||
Settings interface{} `json:"settings"`
|
||||
LastSendNotification time.Time `json:"last_send_notification"`
|
||||
Frequency int64 `json:"frequency"`
|
||||
Settings jsonutils.JSONObject `json:"settings"`
|
||||
LastSendNotification time.Time `json:"last_send_notification"`
|
||||
}
|
||||
|
||||
// SV1Alert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SV1Alert.
|
||||
|
||||
+11
-11
@@ -20,7 +20,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
Event SEvent
|
||||
Event SNotifyEvent
|
||||
|
||||
ActionCreate SAction = "create"
|
||||
ActionDelete SAction = "delete"
|
||||
@@ -52,36 +52,36 @@ type SAction string
|
||||
|
||||
type SResult string
|
||||
|
||||
type SEvent struct {
|
||||
type SNotifyEvent struct {
|
||||
resourceType string
|
||||
action SAction
|
||||
result SResult
|
||||
}
|
||||
|
||||
func (se SEvent) WithResourceType(rt string) SEvent {
|
||||
func (se SNotifyEvent) WithResourceType(rt string) SNotifyEvent {
|
||||
se.resourceType = rt
|
||||
return se
|
||||
}
|
||||
|
||||
func (se SEvent) WithAction(a SAction) SEvent {
|
||||
func (se SNotifyEvent) WithAction(a SAction) SNotifyEvent {
|
||||
se.action = a
|
||||
return se
|
||||
}
|
||||
|
||||
func (se SEvent) WithResult(r SResult) SEvent {
|
||||
func (se SNotifyEvent) WithResult(r SResult) SNotifyEvent {
|
||||
se.result = r
|
||||
return se
|
||||
}
|
||||
|
||||
func (se SEvent) ResourceType() string {
|
||||
func (se SNotifyEvent) ResourceType() string {
|
||||
return se.resourceType
|
||||
}
|
||||
|
||||
func (se SEvent) Action() SAction {
|
||||
func (se SNotifyEvent) Action() SAction {
|
||||
return se.action
|
||||
}
|
||||
|
||||
func (se SEvent) ActionWithResult(delimiter string) string {
|
||||
func (se SNotifyEvent) ActionWithResult(delimiter string) string {
|
||||
ar := string(se.action)
|
||||
if len(se.result) > 0 {
|
||||
ar += delimiter + string(se.result)
|
||||
@@ -89,18 +89,18 @@ func (se SEvent) ActionWithResult(delimiter string) string {
|
||||
return strings.ToUpper(ar)
|
||||
}
|
||||
|
||||
func (se SEvent) Result() SResult {
|
||||
func (se SNotifyEvent) Result() SResult {
|
||||
if se.result == "" {
|
||||
return ResultSucceed
|
||||
}
|
||||
return se.result
|
||||
}
|
||||
|
||||
func (se SEvent) String() string {
|
||||
func (se SNotifyEvent) String() string {
|
||||
return se.StringWithDeli(DelimiterInEvent)
|
||||
}
|
||||
|
||||
func (se SEvent) StringWithDeli(delimiter string) string {
|
||||
func (se SNotifyEvent) StringWithDeli(delimiter string) string {
|
||||
str := strings.ToUpper(fmt.Sprintf("%s%s%s", se.ResourceType(), delimiter, se.Action()))
|
||||
if se.result != "" {
|
||||
str += delimiter + strings.ToUpper(string(se.result))
|
||||
|
||||
@@ -17,6 +17,8 @@ package notify
|
||||
import (
|
||||
time "time"
|
||||
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
@@ -24,9 +26,17 @@ import (
|
||||
type SConfig struct {
|
||||
apis.SStandaloneResourceBase
|
||||
apis.SDomainizedResourceBase
|
||||
Type string `json:"type"`
|
||||
Content interface{} `json:"content"`
|
||||
Attribution string `json:"attribution"`
|
||||
Type string `json:"type"`
|
||||
Content jsonutils.JSONObject `json:"content"`
|
||||
Attribution string `json:"attribution"`
|
||||
}
|
||||
|
||||
// SEvent is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.SEvent.
|
||||
type SEvent struct {
|
||||
apis.SStandaloneAnonResourceBase
|
||||
Message string `json:"message"`
|
||||
Event string `json:"event"`
|
||||
AdvanceDays int `json:"advance_days"`
|
||||
}
|
||||
|
||||
// SNotification is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.SNotification.
|
||||
@@ -37,12 +47,11 @@ type SNotification struct {
|
||||
Topic string `json:"topic"`
|
||||
Priority string `json:"priority"`
|
||||
// swagger:ignore
|
||||
Message string `json:"message"`
|
||||
ReceivedAt time.Time `json:"received_at"`
|
||||
Event string `json:"event"`
|
||||
AdvanceDays int `json:"advance_days"`
|
||||
SendTimes int `json:"send_times"`
|
||||
Tag string `json:"tag"`
|
||||
Message string `json:"message"`
|
||||
ReceivedAt time.Time `json:"received_at"`
|
||||
EventId string `json:"event_id"`
|
||||
SendTimes int `json:"send_times"`
|
||||
Tag string `json:"tag"`
|
||||
}
|
||||
|
||||
// SReceiver is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.SReceiver.
|
||||
@@ -101,13 +110,16 @@ type SSubContact struct {
|
||||
|
||||
// SSubscriber is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.SSubscriber.
|
||||
type SSubscriber struct {
|
||||
apis.SVirtualResourceBase
|
||||
apis.SStandaloneAnonResourceBase
|
||||
apis.SEnabledResourceBase
|
||||
TopicID string `json:"topic_id"`
|
||||
Type string `json:"type"`
|
||||
Identification string `json:"identification"`
|
||||
RoleScope string `json:"role_scope"`
|
||||
ResourceScope string `json:"resource_scope"`
|
||||
TopicID string `json:"topic_id"`
|
||||
Type string `json:"type"`
|
||||
Identification string `json:"identification"`
|
||||
RoleScope string `json:"role_scope"`
|
||||
ResourceScope string `json:"resource_scope"`
|
||||
ResourceAttributionId string `json:"resource_attribution_id"`
|
||||
Scope string `json:"scope"`
|
||||
DomainId string `json:"domain_id"`
|
||||
}
|
||||
|
||||
// SSubscriberDis is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.SSubscriberDis.
|
||||
@@ -126,7 +138,7 @@ type SSubscriberReceiver struct {
|
||||
|
||||
// STemplate is an autogenerated struct via yunion.io/x/onecloud/pkg/notify/models.STemplate.
|
||||
type STemplate struct {
|
||||
apis.SStandaloneResourceBase
|
||||
apis.SStandaloneAnonResourceBase
|
||||
ContactType string `json:"contact_type"`
|
||||
Topic string `json:"topic"`
|
||||
// title | content | remote
|
||||
@@ -143,6 +155,7 @@ type STopic struct {
|
||||
Type string `json:"type"`
|
||||
Resources uint64 `json:"resources"`
|
||||
Actions uint32 `json:"actions"`
|
||||
Results byte `json:"results"`
|
||||
AdvanceDays int `json:"advance_days"`
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
package yunionconf
|
||||
|
||||
import (
|
||||
jsonutils "yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
)
|
||||
|
||||
@@ -33,7 +35,7 @@ type SParameter struct {
|
||||
// Column(VARCHAR(length=128, charset='ascii'), nullable=False)
|
||||
Name string `json:"name"`
|
||||
// Column(VARCHAR(length=128, charset='ascii'), nullable=false)
|
||||
Value interface{} `json:"value"`
|
||||
Value jsonutils.JSONObject `json:"value"`
|
||||
}
|
||||
|
||||
// SScopedPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/yunionconf/models.SScopedPolicy.
|
||||
@@ -42,7 +44,7 @@ type SScopedPolicy struct {
|
||||
// 策略类别
|
||||
Category string `json:"category"`
|
||||
// 策略内容
|
||||
Policies interface{} `json:"policies"`
|
||||
Policies jsonutils.JSONObject `json:"policies"`
|
||||
}
|
||||
|
||||
// SScopedPolicyBinding is an autogenerated struct via yunion.io/x/onecloud/pkg/yunionconf/models.SScopedPolicyBinding.
|
||||
|
||||
@@ -215,15 +215,6 @@ func (manager *SAdminSharableVirtualResourceBaseManager) OrderByExtraFields(
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (model *SAdminSharableVirtualResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.AdminSharableVirtualResourceDetails, error) {
|
||||
return apis.AdminSharableVirtualResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SAdminSharableVirtualResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -259,20 +259,6 @@ func OrderByExtraFields(
|
||||
return ret[0].Interface().(*sqlchemy.SQuery), nil
|
||||
}
|
||||
|
||||
func GetExtraDetails(model IModel, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (*jsonutils.JSONDict, error) {
|
||||
ret, err := call(model, "GetExtraDetails", ctx, userCred, query, isList)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewGeneralError(err)
|
||||
}
|
||||
if len(ret) != 2 {
|
||||
return nil, httperrors.NewInternalServerError("Invalid GetExtraDetails return value count %d", len(ret))
|
||||
}
|
||||
if err := ValueToError(ret[1]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ValueToJSONDict(ret[0]), nil
|
||||
}
|
||||
|
||||
func FetchCustomizeColumns(
|
||||
manager IModelManager,
|
||||
ctx context.Context,
|
||||
|
||||
@@ -252,15 +252,6 @@ func (manager *SDomainLevelResourceBaseManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SDomainLevelResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.DomainLevelResourceDetails, error) {
|
||||
return apis.DomainLevelResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDomainLevelResourceBaseManager) GetIDomainLevelModelManager() IDomainLevelModelManager {
|
||||
return manager.GetVirtualObject().(IDomainLevelModelManager)
|
||||
}
|
||||
|
||||
@@ -140,15 +140,6 @@ func (manager *SEnabledStatusDomainLevelResourceBaseManager) FetchCustomizeColum
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusDomainLevelResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.EnabledStatusDomainLevelResourceDetails, error) {
|
||||
return apis.EnabledStatusDomainLevelResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusDomainLevelResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -186,15 +186,6 @@ func (manager *SEnabledStatusInfrasResourceBaseManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusInfrasResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.EnabledStatusInfrasResourceBaseDetails, error) {
|
||||
return apis.EnabledStatusInfrasResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusInfrasResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -134,15 +134,6 @@ func (manager *SEnabledStatusStandaloneResourceBaseManager) FetchCustomizeColumn
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusStandaloneResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.EnabledStatusStandaloneResourceDetails, error) {
|
||||
return apis.EnabledStatusStandaloneResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SEnabledStatusStandaloneResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -150,10 +150,6 @@ func (manager *SInfrasResourceBaseManager) OrderByExtraFields(ctx context.Contex
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (model *SInfrasResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.InfrasResourceBaseDetails, error) {
|
||||
return apis.InfrasResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SInfrasResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -158,8 +158,6 @@ type IModel interface {
|
||||
|
||||
// get hooks
|
||||
AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
|
||||
// GetExtraDetails dynamic call by model dispatcher
|
||||
// GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*jsonutils.JSONDict, error)
|
||||
GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) map[string]string
|
||||
|
||||
// create hooks
|
||||
|
||||
@@ -220,15 +220,6 @@ func (manager *SJointResourceBaseManager) ValidateCreateData(ctx context.Context
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (model *SJointResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.JointResourceBaseDetails, error) {
|
||||
return apis.JointResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SJointResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -298,10 +298,6 @@ func (manager *SModelBaseManager) GetSkipLog(ctx context.Context, userCred mccli
|
||||
return false
|
||||
}
|
||||
|
||||
func (model *SModelBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.ModelBaseDetails, error) {
|
||||
return apis.ModelBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SModelBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -91,23 +91,6 @@ func mustCheckModelManager(modelMan IModelManager) {
|
||||
panic(msg)
|
||||
}
|
||||
}
|
||||
requiredModelFuncNames := []string{
|
||||
"GetExtraDetails",
|
||||
}
|
||||
for _, name := range requiredModelFuncNames {
|
||||
model, err := NewModelObject(modelMan)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("model manager %T: new model object: %v", modelMan, err)
|
||||
panic(msg)
|
||||
}
|
||||
modelV := reflect.ValueOf(model)
|
||||
methV := modelV.MethodByName(name)
|
||||
if !methV.IsValid() {
|
||||
msg := fmt.Sprintf("model %T: has no valid %s, likely caused by ambiguity",
|
||||
model, name)
|
||||
panic(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,10 +173,6 @@ func (manager *SResourceBaseManager) FetchCustomizeColumns(
|
||||
return ret
|
||||
}
|
||||
|
||||
func (model *SResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.ResourceBaseDetails, error) {
|
||||
return apis.ResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.ResourceBaseUpdateInput) (apis.ResourceBaseUpdateInput, error) {
|
||||
var err error
|
||||
input.ModelBaseUpdateInput, err = model.SModelBase.ValidateUpdateData(ctx, userCred, query, input.ModelBaseUpdateInput)
|
||||
|
||||
@@ -138,10 +138,6 @@ func (manager *SSharableVirtualResourceBaseManager) OrderByExtraFields(ctx conte
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (model *SSharableVirtualResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.SharableVirtualResourceDetails, error) {
|
||||
return apis.SharableVirtualResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SSharableVirtualResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -144,10 +144,6 @@ func (manager *SStandaloneResourceBaseManager) ValidateCreateData(ctx context.Co
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (model *SStandaloneResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.StandaloneResourceDetails, error) {
|
||||
return apis.StandaloneResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SStandaloneResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -491,10 +491,6 @@ func (manager *SStandaloneAnonResourceBaseManager) ValidateCreateData(ctx contex
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (model *SStandaloneAnonResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.StandaloneAnonResourceDetails, error) {
|
||||
return apis.StandaloneAnonResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SStandaloneAnonResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -143,15 +143,6 @@ func (manager *SStatusDomainLevelResourceBaseManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SStatusDomainLevelResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.StatusDomainLevelResourceDetails, error) {
|
||||
return apis.StatusDomainLevelResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SStatusDomainLevelResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -189,15 +189,6 @@ func (manager *SStatusInfrasResourceBaseManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SStatusInfrasResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.StatusInfrasResourceBaseDetails, error) {
|
||||
return apis.StatusInfrasResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SStatusInfrasResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -172,12 +172,3 @@ func (manager *SStatusDomainLevelUserResourceBaseManager) FetchCustomizeColumns(
|
||||
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SStatusDomainLevelUserResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.StatusDomainLevelUserResourceDetails, error) {
|
||||
return apis.StatusDomainLevelUserResourceDetails{}, nil
|
||||
}
|
||||
|
||||
@@ -178,15 +178,6 @@ func (manager *SStatusStandaloneResourceBaseManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (model *SStatusStandaloneResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.StatusStandaloneResourceDetails, error) {
|
||||
return apis.StatusStandaloneResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (model *SStatusStandaloneResourceBase) ValidateUpdateData(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -112,15 +112,6 @@ func (manager *SVirtualJointResourceBaseManager) FilterByHiddenSystemAttributes(
|
||||
return q
|
||||
}
|
||||
|
||||
func (model *SVirtualJointResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (apis.VirtualJointResourceBaseDetails, error) {
|
||||
return apis.VirtualJointResourceBaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SVirtualJointResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -264,10 +264,6 @@ func (manager *SVirtualResourceBaseManager) AllowCreateItem(ctx context.Context,
|
||||
return true
|
||||
}
|
||||
|
||||
func (model *SVirtualResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (apis.VirtualResourceDetails, error) {
|
||||
return apis.VirtualResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SVirtualResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -155,15 +155,6 @@ func (manager *SCloudeventManager) ListItemFilter(
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SCloudevent) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudeventDetails, error) {
|
||||
return api.CloudeventDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudeventManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -127,15 +127,6 @@ func (self *SCloudgroup) ValidateUpdateData(ctx context.Context, userCred mcclie
|
||||
}
|
||||
|
||||
// 获取权限组详情
|
||||
func (self *SCloudgroup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudgroupDetails, error) {
|
||||
return api.CloudgroupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudgroupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -86,15 +86,6 @@ func (self *SCloudgroupPolicy) ValidateUpdateData(ctx context.Context, userCred
|
||||
}
|
||||
|
||||
// 用户组中权限详情
|
||||
func (self *SCloudgroupPolicy) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudgroupPolicyDetails, error) {
|
||||
return api.CloudgroupPolicyDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudgroupPolicyManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -87,15 +87,6 @@ func (self *SCloudgroupUser) ValidateUpdateData(ctx context.Context, userCred mc
|
||||
}
|
||||
|
||||
// 获取用户组中用户详情
|
||||
func (self *SCloudgroupUser) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudgroupUserDetails, error) {
|
||||
return api.CloudgroupUserDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudgroupUserManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -181,15 +181,6 @@ func (manager *SCloudgroupcacheManager) Register(group *SCloudgroup, account *SC
|
||||
}
|
||||
|
||||
// 获取权限组缓存详情
|
||||
func (self *SCloudgroupcache) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudgroupcacheDetails, error) {
|
||||
return api.CloudgroupcacheDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudgroupcacheManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -67,15 +67,6 @@ func (manager *SCloudgroupJointsManager) GetMasterFieldName() string {
|
||||
return "cloudgroup_id"
|
||||
}
|
||||
|
||||
func (self *SCloudgroupJointsBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
groupCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudgroupJointResourceDetails, error) {
|
||||
return api.CloudgroupJointResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudgroupJointsManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
groupCred mcclient.TokenCredential,
|
||||
|
||||
@@ -432,15 +432,6 @@ func (self *SCloudpolicy) AllowGetDetails(ctx context.Context, userCred mcclient
|
||||
}
|
||||
|
||||
// 获取公有云权限详情
|
||||
func (self *SCloudpolicy) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudpolicyDetails, error) {
|
||||
return api.CloudpolicyDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudpolicyManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -97,15 +97,6 @@ func (manager *SCloudpolicycacheManager) ListItemFilter(ctx context.Context, q *
|
||||
}
|
||||
|
||||
// 获取公有云权限缓存详情
|
||||
func (self *SCloudpolicycache) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudpolicycacheDetails, error) {
|
||||
return api.CloudpolicycacheDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudpolicycacheManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -91,15 +91,6 @@ func (manager *SCloudroleManager) ListItemFilter(ctx context.Context, q *sqlchem
|
||||
}
|
||||
|
||||
// 获取公有云角色详情
|
||||
func (self *SCloudrole) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudroleDetails, error) {
|
||||
return api.CloudroleDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudroleManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -188,15 +188,6 @@ func (manager *SClouduserManager) QueryDistinctExtraField(q *sqlchemy.SQuery, fi
|
||||
}
|
||||
|
||||
// 获取公有云用户详情
|
||||
func (self *SClouduser) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ClouduserDetails, error) {
|
||||
return api.ClouduserDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SClouduserManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -91,15 +91,6 @@ func (self *SClouduserPolicy) ValidateUpdateData(ctx context.Context, userCred m
|
||||
}
|
||||
|
||||
// 获取公有云用户权限详情
|
||||
func (self *SClouduserPolicy) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ClouduserPolicyDetails, error) {
|
||||
return api.ClouduserPolicyDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SClouduserPolicyManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -55,15 +55,6 @@ func (manager *SClouduserJointsManager) GetMasterFieldName() string {
|
||||
return "clouduser_id"
|
||||
}
|
||||
|
||||
func (self *SClouduserJointsBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ClouduserJointResourceDetails, error) {
|
||||
return api.ClouduserJointResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SClouduserJointsManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -144,6 +144,7 @@ type SWafRule struct {
|
||||
Statements []SWafStatement
|
||||
}
|
||||
|
||||
// +onecloud:model-api-gen
|
||||
type SWafStatement struct {
|
||||
// 管理规则组名称
|
||||
ManagedRuleGroupName string `width:"64" charset:"utf8" nullable:"false" list:"user"`
|
||||
@@ -195,6 +196,7 @@ func (self SWafStatement) GetExternalId() string {
|
||||
return self.GetGlobalId()
|
||||
}
|
||||
|
||||
// +onecloud:model-api-gen
|
||||
type DefaultAction struct {
|
||||
// Allow, Block, Log, Count, Alert, Detection, Prevention
|
||||
Action TWafAction
|
||||
@@ -211,6 +213,7 @@ type DefaultAction struct {
|
||||
|
||||
type WafSourceIps []string
|
||||
|
||||
// +onecloud:model-api-gen
|
||||
type WafRegexPatterns []string
|
||||
|
||||
func (self WafRegexPatterns) IsZero() bool {
|
||||
@@ -221,6 +224,7 @@ func (self WafRegexPatterns) String() string {
|
||||
return jsonutils.Marshal(self).String()
|
||||
}
|
||||
|
||||
// +onecloud:model-api-gen
|
||||
type WafAddresses []string
|
||||
|
||||
func (self WafAddresses) IsZero() bool {
|
||||
|
||||
@@ -199,10 +199,6 @@ func (self *SBaremetalagent) GetZone() *SZone {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SBaremetalagent) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.BaremetalagentDetails, error) {
|
||||
return api.BaremetalagentDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SBaremetalagentManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -109,14 +109,6 @@ type SCloudBillingInfo struct {
|
||||
InternetChargeType string `json:",omitempty"`
|
||||
}
|
||||
|
||||
func (self *SBillingResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
) api.BillingDetailsInfo {
|
||||
return api.BillingDetailsInfo{}
|
||||
}
|
||||
|
||||
func (manager *SBillingResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -559,10 +559,6 @@ func (bucket *SBucket) RemoteCreate(ctx context.Context, userCred mcclient.Token
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bucket *SBucket) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.BucketDetails, error) {
|
||||
return api.BucketDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SBucketManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -356,10 +356,6 @@ func (manager *SCachedimageManager) getImageInfo(ctx context.Context, userCred m
|
||||
return manager.getImageByName(ctx, userCred, imageId, refresh)
|
||||
}
|
||||
|
||||
func (self *SCachedimage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.CachedimageDetails, error) {
|
||||
return api.CachedimageDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCachedimageManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -1188,10 +1188,6 @@ func (self *SCloudaccount) getMoreDetails(out api.CloudaccountDetail) api.Clouda
|
||||
return out
|
||||
}
|
||||
|
||||
func (self *SCloudaccount) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.CloudaccountDetail, error) {
|
||||
return api.CloudaccountDetail{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudaccountManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -154,15 +154,6 @@ func (man *SCloudproviderQuotaManager) QueryDistinctExtraField(q *sqlchemy.SQuer
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (self *SCloudproviderQuota) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudproviderQuotaDetails, error) {
|
||||
return api.CloudproviderQuotaDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderQuotaManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -120,10 +120,6 @@ func (self *SCloudproviderregion) GetRegion() *SCloudregion {
|
||||
return regionObj.(*SCloudregion)
|
||||
}
|
||||
|
||||
func (self *SCloudproviderregion) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.CloudproviderregionDetails, error) {
|
||||
return api.CloudproviderregionDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderregionManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -974,16 +974,6 @@ func (self *SCloudprovider) getProject(ctx context.Context) *db.STenant {
|
||||
return proj
|
||||
}
|
||||
|
||||
func (self *SCloudprovider) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudproviderDetails, error) {
|
||||
|
||||
return api.CloudproviderDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -17,7 +17,6 @@ package models
|
||||
import (
|
||||
"context"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
@@ -64,15 +63,6 @@ func (obj *SCloudproviderschedtag) GetResourceId() string {
|
||||
return obj.CloudproviderId
|
||||
}
|
||||
|
||||
func (obj *SCloudproviderschedtag) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.CloudproviderschedtagDetails, error) {
|
||||
return api.CloudproviderschedtagDetails{}, nil
|
||||
}
|
||||
|
||||
func (obj *SCloudproviderschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error {
|
||||
return obj.SSchedtagJointsBase.delete(obj, ctx, userCred)
|
||||
}
|
||||
|
||||
@@ -60,15 +60,6 @@ func (self *SCloudregionResourceBase) GetRegion() *SCloudregion {
|
||||
return region.(*SCloudregion)
|
||||
}
|
||||
|
||||
func (self *SCloudregionResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) api.CloudregionResourceInfo {
|
||||
return api.CloudregionResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SCloudregionResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -301,10 +301,6 @@ func (self *SCloudregion) getUsage() api.SCloudregionUsage {
|
||||
return out
|
||||
}
|
||||
|
||||
func (self *SCloudregion) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.CloudregionDetails, error) {
|
||||
return api.CloudregionDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudregionManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -174,10 +174,6 @@ func (self *SDBInstanceAccount) getMoreDetails(ctx context.Context, userCred mcc
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DBInstanceAccountDetails, error) {
|
||||
return api.DBInstanceAccountDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceAccountManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -302,15 +302,6 @@ func (self *SDBInstanceBackup) GetDBInstance() (*SDBInstance, error) {
|
||||
return nil, fmt.Errorf("empty dbinstance id")
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DBInstanceBackupDetails, error) {
|
||||
return api.DBInstanceBackupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceBackupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -295,10 +295,6 @@ func (self *SDBInstanceDatabase) GetDBInstance() (*SDBInstance, error) {
|
||||
return instance.(*SDBInstance), nil
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DBInstancedatabaseDetails, error) {
|
||||
return api.DBInstancedatabaseDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceDatabaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -218,10 +218,6 @@ func (manager *SDBInstanceParameterManager) newFromCloudDBInstanceParameter(ctx
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SDBInstanceParameter) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DBInstanceparameterDetails, error) {
|
||||
return api.DBInstanceparameterDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceParameterManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -128,15 +128,6 @@ func (manager *SDBInstanceSecgroupManager) ListItemExportKeys(ctx context.Contex
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstanceSecgroup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DBInstanceSecgroupDetails, error) {
|
||||
return api.DBInstanceSecgroupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceSecgroupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -189,10 +189,6 @@ func (manager *SDBInstanceSkuManager) ListItemFilter(
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstanceSku) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DBInstanceSkuDetails, error) {
|
||||
return api.DBInstanceSkuDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceSkuManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -76,14 +76,6 @@ func (self *SDBInstanceResourceBase) GetCloudprovider() *SCloudprovider {
|
||||
return vpc.GetCloudprovider()
|
||||
}
|
||||
|
||||
func (self *SDBInstanceResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
) api.DBInstanceResourceInfo {
|
||||
return api.DBInstanceResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -516,15 +516,6 @@ func (self *SDBInstance) StartDBInstanceCreateTask(ctx context.Context, userCred
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DBInstanceDetails, error) {
|
||||
return api.DBInstanceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -85,10 +85,6 @@ func (self *SDiskResourceBase) GetRegion() *SCloudregion {
|
||||
return region
|
||||
}
|
||||
|
||||
func (self *SDiskResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) api.DiskResourceInfo {
|
||||
return api.DiskResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SDiskResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -1996,10 +1996,6 @@ func (self *SDisk) getMoreDetails(ctx context.Context, userCred mcclient.TokenCr
|
||||
return out
|
||||
}
|
||||
|
||||
func (self *SDisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DiskDetails, error) {
|
||||
return api.DiskDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDiskManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -275,15 +275,6 @@ func (manager *SDnsRecordSetManager) ListItemFilter(
|
||||
}
|
||||
|
||||
// 解析详情
|
||||
func (self *SDnsRecordSet) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DnsRecordSetDetails, error) {
|
||||
return api.DnsRecordSetDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDnsRecordSetManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -117,15 +117,6 @@ func (self *SDnsTrafficPolicy) AllowUpdateItem(ctx context.Context, userCred mcc
|
||||
}
|
||||
|
||||
// 详情
|
||||
func (self *SDnsTrafficPolicy) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DnsTrafficPolicyDetails, error) {
|
||||
return api.DnsTrafficPolicyDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDnsTrafficPolicyManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -138,15 +138,6 @@ func (manager *SDnsZoneCacheManager) ListItemFilter(
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SDnsZoneCache) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DnsZoneCacheDetails, error) {
|
||||
return api.DnsZoneCacheDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDnsZoneCacheManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -234,15 +234,6 @@ func (self *SDnsZone) PostUpdate(ctx context.Context, userCred mcclient.TokenCre
|
||||
}
|
||||
|
||||
// 解析详情
|
||||
func (self *SDnsZone) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DnsZoneDetails, error) {
|
||||
return api.DnsZoneDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDnsZoneManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -543,10 +543,6 @@ func (manager *SDnsRecordManager) QueryDistinctExtraField(q *sqlchemy.SQuery, fi
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (record *SDnsRecord) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DnsRecordDetails, error) {
|
||||
return api.DnsRecordDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDnsRecordManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -181,15 +181,6 @@ func (self *SDynamicschedtag) ValidateUpdateData(ctx context.Context, userCred m
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func (self *SDynamicschedtag) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.DynamicschedtagDetails, error) {
|
||||
return api.DynamicschedtagDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SDynamicschedtagManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -585,15 +585,6 @@ func (manager *SElasticcacheAccountManager) QueryDistinctExtraField(q *sqlchemy.
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (self *SElasticcacheAccount) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcacheAccountDetails, error) {
|
||||
return api.ElasticcacheAccountDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheAccountManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -404,15 +404,6 @@ func (manager *SElasticcacheAclManager) QueryDistinctExtraField(q *sqlchemy.SQue
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (self *SElasticcacheAcl) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcacheAclDetails, error) {
|
||||
return api.ElasticcacheAclDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheAclManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -418,15 +418,6 @@ func (manager *SElasticcacheBackupManager) QueryDistinctExtraField(q *sqlchemy.S
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (self *SElasticcacheBackup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcacheBackupDetails, error) {
|
||||
return api.ElasticcacheBackupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheBackupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -198,10 +198,6 @@ func (self *SElasticcache) getCloudProviderInfo() SCloudProviderInfo {
|
||||
return MakeCloudProviderInfo(region, zone, provider)
|
||||
}
|
||||
|
||||
func (self *SElasticcache) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.ElasticcacheDetails, error) {
|
||||
return api.ElasticcacheDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -61,15 +61,6 @@ func (manager *SElasticcacheJointsManager) GetMasterFieldName() string {
|
||||
return "elasticcache_id"
|
||||
}
|
||||
|
||||
func (self *SElasticcacheJointsBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcacheJointResourceDetails, error) {
|
||||
return api.ElasticcacheJointResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheJointsManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -317,15 +317,6 @@ func (manager *SElasticcacheParameterManager) QueryDistinctExtraField(q *sqlchem
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (self *SElasticcacheParameter) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcacheParameterDetails, error) {
|
||||
return api.ElasticcacheParameterDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheParameterManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -137,15 +137,6 @@ func (manager *SElasticcachesecgroupManager) ListItemExportKeys(ctx context.Cont
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SElasticcachesecgroup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticcachesecgroupDetails, error) {
|
||||
return api.ElasticcachesecgroupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcachesecgroupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -119,10 +119,6 @@ func (self SElasticcacheSku) GetGlobalId() string {
|
||||
return self.ExternalId
|
||||
}
|
||||
|
||||
func (self *SElasticcacheSku) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.ElasticcacheSkuDetails, error) {
|
||||
return api.ElasticcacheSkuDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheSkuManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -80,14 +80,6 @@ func (self *SElasticcacheResourceBase) GetIRegion() (cloudprovider.ICloudRegion,
|
||||
return vpc.GetIRegion()
|
||||
}
|
||||
|
||||
func (self *SElasticcacheResourceBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
) api.ElasticcacheResourceInfo {
|
||||
return api.ElasticcacheResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SElasticcacheResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -1180,15 +1180,6 @@ func (self *SElasticip) PerformSync(ctx context.Context, userCred mcclient.Token
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (self *SElasticip) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ElasticipDetails, error) {
|
||||
return api.ElasticipDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SElasticipManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -78,15 +78,6 @@ func (self *SExternalProject) AllowUpdateItem(ctx context.Context, userCred mccl
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *SExternalProject) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.ExternalProjectDetails, error) {
|
||||
return api.ExternalProjectDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SExternalProjectManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -61,10 +61,6 @@ func (self *SGlobalVpcResourceBase) GetGlobalVpc() (*SGlobalVpc, error) {
|
||||
return gv.(*SGlobalVpc), nil
|
||||
}
|
||||
|
||||
func (self *SGlobalVpcResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) api.GlobalVpcResourceInfo {
|
||||
return api.GlobalVpcResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SGlobalVpcResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -87,10 +87,6 @@ func (self *SGlobalVpc) GetVpcCount() (int, error) {
|
||||
return self.GetVpcQuery().CountWithError()
|
||||
}
|
||||
|
||||
func (self *SGlobalVpc) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.GlobalVpcDetails, error) {
|
||||
return api.GlobalVpcDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGlobalVpcManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -62,15 +62,6 @@ func (manager *SGroupguestManager) GetSlaveFieldName() string {
|
||||
return "guest_id"
|
||||
}
|
||||
|
||||
func (self *SGroupguest) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GroupguestDetails, error) {
|
||||
return api.GroupguestDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGroupguestManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -62,15 +62,6 @@ func (self *SGroupJointsBase) GetGroup() *SGroup {
|
||||
return guest.(*SGroup)
|
||||
}
|
||||
|
||||
func (self *SGroupJointsBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GroupJointResourceDetails, error) {
|
||||
return api.GroupJointResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGroupJointsManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -67,15 +67,6 @@ func (manager *SGroupnetworkManager) GetSlaveFieldName() string {
|
||||
return "network_id"
|
||||
}
|
||||
|
||||
func (self *SGroupnetwork) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GroupnetworkDetails, error) {
|
||||
return api.GroupnetworkDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGroupnetworkManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -60,10 +60,6 @@ func (self *SGroupResourceBase) GetGroup() *SGroup {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SGroupResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) api.GroupResourceInfo {
|
||||
return api.GroupResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SGroupResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -192,15 +192,6 @@ func (sm *SGroupManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (group *SGroup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.InstanceGroupDetail, error) {
|
||||
return api.InstanceGroupDetail{}, nil
|
||||
}
|
||||
|
||||
func (group *SGroup) GetGuestCount() int {
|
||||
q := GroupguestManager.Query().Equals("group_id", group.Id)
|
||||
count, _ := q.CountWithError()
|
||||
|
||||
@@ -328,15 +328,6 @@ func (manager *SGuestTemplateManager) FetchCustomizeColumns(
|
||||
return rows
|
||||
}
|
||||
|
||||
func (gt *SGuestTemplate) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (computeapis.GuestTemplateDetails, error) {
|
||||
return computeapis.GuestTemplateDetails{}, nil
|
||||
}
|
||||
|
||||
func (gt *SGuestTemplate) getMoreDetails(ctx context.Context, userCred mcclient.TokenCredential,
|
||||
out computeapis.GuestTemplateDetails) (computeapis.GuestTemplateDetails, error) {
|
||||
|
||||
|
||||
@@ -106,15 +106,6 @@ func (self *SGuestdisk) ValidateUpdateData(ctx context.Context, userCred mcclien
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (self *SGuestdisk) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GuestDiskDetails, error) {
|
||||
return api.GuestDiskDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestdiskManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -62,15 +62,6 @@ func (manager *SGuestJointsManager) GetMasterFieldName() string {
|
||||
return "guest_id"
|
||||
}
|
||||
|
||||
func (self *SGuestJointsBase) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GuestJointResourceDetails, error) {
|
||||
return api.GuestJointResourceDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestJointsManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -108,15 +108,6 @@ func (manager *SGuestnetworkManager) GetSlaveFieldName() string {
|
||||
return "network_id"
|
||||
}
|
||||
|
||||
func (self *SGuestnetwork) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GuestnetworkDetails, error) {
|
||||
return api.GuestnetworkDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestnetworkManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -85,10 +85,6 @@ func (self *SGuestResourceBase) GetRegion() *SCloudregion {
|
||||
return region
|
||||
}
|
||||
|
||||
func (self *SGuestResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) api.GuestResourceInfo {
|
||||
return api.GuestResourceInfo{}
|
||||
}
|
||||
|
||||
func (manager *SGuestResourceBaseManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
@@ -2012,10 +2012,6 @@ func (self *SGuestManager) GetMetadataHiddenKeys() []string {
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SGuest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.ServerDetails, error) {
|
||||
return api.ServerDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error) {
|
||||
var err error
|
||||
q, err = manager.SVirtualResourceBaseManager.ListItemExportKeys(ctx, q, userCred, keys)
|
||||
|
||||
@@ -136,15 +136,6 @@ func (manager *SGuestsecgroupManager) ListItemExportKeys(ctx context.Context,
|
||||
return q, nil
|
||||
}
|
||||
|
||||
func (self *SGuestsecgroup) GetExtraDetails(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
query jsonutils.JSONObject,
|
||||
isList bool,
|
||||
) (api.GuestsecgroupDetails, error) {
|
||||
return api.GuestsecgroupDetails{}, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestsecgroupManager) FetchCustomizeColumns(
|
||||
ctx context.Context,
|
||||
userCred mcclient.TokenCredential,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user