update for doc-gen

This commit is contained in:
Qiu Jian
2020-05-23 13:42:59 +08:00
parent b859eea7e6
commit 8a77030823
27 changed files with 275 additions and 57 deletions
+66 -27
View File
@@ -100,8 +100,7 @@ type SCachedLoadbalancerAcl struct {
apis.SExternalizedResourceBase
SManagedResourceBase
SCloudregionResourceBase
AclId string `json:"acl_id"`
// 本地ACL ID
SLoadbalancerAclResourceBase
ListenerId string `json:"listener_id"`
}
@@ -134,6 +133,9 @@ type SCachedimage struct {
// 引用次数
// example: 0
RefCount int `json:"ref_count"`
// 是否支持UEFI
// example: false
UEFI *bool `json:"uefi,omitempty"`
// 镜像类型, system: 公有云镜像, customized: 自定义镜像
// example: system
ImageType string `json:"image_type"`
@@ -264,6 +266,7 @@ type SCloudproviderregion struct {
// 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"`
}
// SCloudregion is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregion.
@@ -341,8 +344,6 @@ type SDBInstance struct {
Zone2 string `json:"zone2"`
// 可用区3
Zone3 string `json:"zone3"`
// 可用区Id(对应公有云的可用区Id)
ZoneId string `json:"zone_id"`
}
// SDBInstanceAccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceAccount.
@@ -863,6 +864,20 @@ type SGuestTemplateResourceBase struct {
GuestTemplateId string `json:"guest_template_id"`
}
// SGuestcdrom is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestcdrom.
type SGuestcdrom struct {
Id string `json:"id"`
// = Column(VARCHAR(36, charset='ascii'), primary_key=True)
ImageId string `json:"image_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Name string `json:"name"`
// Column(VARCHAR(64, charset='ascii'), nullable=True)
Path string `json:"path"`
// Column(VARCHAR(256, charset='ascii'), nullable=True)
Size int `json:"size"`
UpdateVersion int `json:"update_version"`
}
// SGuestdisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestdisk.
type SGuestdisk struct {
SGuestJointsBase
@@ -902,6 +917,8 @@ type SGuestnetwork struct {
Ifname string `json:"ifname"`
// bind配对网卡MAC地址
TeamWith string `json:"team_with"`
// IPv4映射地址,当子网属于私有云vpc的时候分配,用于访问外网
MappedIpAddr string `json:"mapped_ip_addr"`
}
// SGuestsecgroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestsecgroup.
@@ -978,10 +995,10 @@ type SHost struct {
OvnVersion string `json:"ovn_version"`
IsBaremetal bool `json:"is_baremetal"`
// 是否处于维护状态
IsMaintenance bool `json:"is_maintenance"`
LastPingAt time.Time `json:"last_ping_at"`
ResourceType string `json:"resource_type"`
RealExternalId string `json:"real_external_id"`
IsMaintenance bool `json:"is_maintenance"`
EnableHealthCheck bool `json:"enable_health_check"`
ResourceType string `json:"resource_type"`
RealExternalId string `json:"real_external_id"`
// 是否为导入的宿主机
IsImport bool `json:"is_import"`
// 是否允许PXE启动
@@ -990,6 +1007,8 @@ type SHost struct {
Uuid string `json:"uuid"`
// 主机启动模式, 可能值位PXE和ISO
BootMode string `json:"boot_mode"`
// IPv4地址,作为么有云vpc访问外网时的网关
OvnMappedIpAddr string `json:"ovn_mapped_ip_addr"`
}
// SHostJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostJointsBase.
@@ -1194,6 +1213,12 @@ type SLoadbalancerAclEntry struct {
Comment string `json:"comment"`
}
// SLoadbalancerAclResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAclResourceBase.
type SLoadbalancerAclResourceBase struct {
// 本地Acl ID
AclId string `json:"acl_id"`
}
// SLoadbalancerAgent is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgent.
type SLoadbalancerAgent struct {
apis.SStandaloneResourceBase
@@ -1224,12 +1249,9 @@ type SLoadbalancerAgentDeployment struct {
// SLoadbalancerAgentParams is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParams.
type SLoadbalancerAgentParams struct {
KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"`
HaproxyConfTmpl string `json:"haproxy_conf_tmpl"`
TelegrafConfTmpl string `json:"telegraf_conf_tmpl"`
Vrrp SLoadbalancerAgentParamsVrrp `json:"vrrp"`
Haproxy SLoadbalancerAgentParamsHaproxy `json:"haproxy"`
Telegraf SLoadbalancerAgentParamsTelegraf `json:"telegraf"`
KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"`
HaproxyConfTmpl string `json:"haproxy_conf_tmpl"`
TelegrafConfTmpl string `json:"telegraf_conf_tmpl"`
}
// SLoadbalancerAgentParamsHaproxy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsHaproxy.
@@ -1471,6 +1493,16 @@ type SManagedResourceBase struct {
ManagerId string `json:"manager_id"`
}
// SNatDEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatDEntry.
type SNatDEntry struct {
SNatEntry
ExternalIP string `json:"external_ip"`
ExternalPort int `json:"external_port"`
InternalIP string `json:"internal_ip"`
InternalPort int `json:"internal_port"`
IpProtocol string `json:"ip_protocol"`
}
// SNatEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatEntry.
type SNatEntry struct {
apis.SStatusInfrasResourceBase
@@ -1501,6 +1533,25 @@ type SNatgatewayResourceBase struct {
NatgatewayId string `json:"natgateway_id"`
}
// SNetInterface is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetInterface.
type SNetInterface struct {
Mac string `json:"mac"`
// Column(VARCHAR(36, charset='ascii'), primary_key=True)
BaremetalId string `json:"baremetal_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
WireId string `json:"wire_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Rate int `json:"rate"`
// Column(Integer, nullable=True) # Mbps
NicType string `json:"nic_type"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Index byte `json:"index"`
// Column(TINYINT, nullable=True)
LinkUp bool `json:"link_up"`
// Column(Boolean, nullable=True)
Mtu int16 `json:"mtu"`
}
// SNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetwork.
type SNetwork struct {
apis.SSharableVirtualResourceBase
@@ -1676,8 +1727,6 @@ type SScalingAlarm struct {
Value float64 `json:"value"`
// Real-time cumulate number
RealCumulate int `json:"real_cumulate"`
// Last trigger time
LastTriggerTime time.Time `json:"last_trigger_time"`
}
// SScalingGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroup.
@@ -1708,10 +1757,6 @@ type SScalingGroup struct {
HealthCheckGov int `json:"health_check_gov"`
LoadbalancerBackendPort int `json:"loadbalancer_backend_port"`
LoadbalancerBackendWeight int `json:"loadbalancer_backend_weight"`
// Time to allow scale
AllowScaleTime time.Time `json:"allow_scale_time"`
// NextCheckTime descripe the next time to check instance's health
NextCheckTime time.Time `json:"next_check_time"`
}
// SScalingGroupGuest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupGuest.
@@ -1770,13 +1815,7 @@ type SScalingTimer struct {
WeekDays byte `json:"week_days"`
// 0-31 0 is unlimited
MonthDays uint32 `json:"month_days"`
// StartTime represent the start time of this timer
StartTime time.Time `json:"start_time"`
// EndTime represent deadline of this timer
EndTime time.Time `json:"end_time"`
// NextTime represent the time timer should bell
NextTime time.Time `json:"next_time"`
IsExpired bool `json:"is_expired"`
IsExpired bool `json:"is_expired"`
}
// SSchedpolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedpolicy.
+67 -14
View File
@@ -92,6 +92,20 @@ type SFederatedUser struct {
DisplayName string `json:"display_name"`
}
// SFederationProtocol is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFederationProtocol.
type SFederationProtocol struct {
Id string `json:"id"`
IdpId string `json:"idp_id"`
MappingId string `json:"mapping_id"`
}
// SFernetKey is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFernetKey.
type SFernetKey struct {
Type string `json:"type"`
Index int `json:"index"`
Key string `json:"key"`
}
// SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SGroup.
type SGroup struct {
SIdentityBaseResource
@@ -129,28 +143,45 @@ type SIdmapping struct {
EntityType string `json:"entity_type"`
}
// SIdpRemoteIds is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdpRemoteIds.
type SIdpRemoteIds struct {
IdpId string `json:"idp_id"`
RemoteId string `json:"remote_id"`
}
// SImpliedRole is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SImpliedRole.
type SImpliedRole struct {
PriorRoleId string `json:"prior_role_id"`
ImpliedRoleId string `json:"implied_role_id"`
}
// SLocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SLocalUser.
type SLocalUser struct {
apis.SResourceBase
Id int `json:"id"`
UserId string `json:"user_id"`
DomainId string `json:"domain_id"`
Name string `json:"name"`
FailedAuthCount int `json:"failed_auth_count"`
FailedAuthAt time.Time `json:"failed_auth_at"`
Id int `json:"id"`
UserId string `json:"user_id"`
DomainId string `json:"domain_id"`
Name string `json:"name"`
FailedAuthCount int `json:"failed_auth_count"`
}
// SNonlocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SNonlocalUser.
type SNonlocalUser struct {
DomainId string `json:"domain_id"`
Name string `json:"name"`
UserId string `json:"user_id"`
}
// SPassword is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPassword.
type SPassword struct {
apis.SResourceBase
Id int `json:"id"`
LocalUserId int `json:"local_user_id"`
Password string `json:"password"`
ExpiresAt time.Time `json:"expires_at"`
SelfService bool `json:"self_service"`
PasswordHash string `json:"password_hash"`
CreatedAtInt int64 `json:"created_at_int"`
ExpiresAtInt int64 `json:"expires_at_int"`
Id int `json:"id"`
LocalUserId int `json:"local_user_id"`
Password string `json:"password"`
SelfService bool `json:"self_service"`
PasswordHash string `json:"password_hash"`
CreatedAtInt int64 `json:"created_at_int"`
ExpiresAtInt int64 `json:"expires_at_int"`
}
// SPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPolicy.
@@ -168,6 +199,21 @@ type SProject struct {
IsDomain *bool `json:"is_domain,omitempty"`
}
// SProjectExtended is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProjectExtended.
type SProjectExtended struct {
SProject
DomainName string `json:"domain_name"`
}
// SProjectResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProjectResource.
type SProjectResource struct {
ProjectId string `json:"project_id"`
RegionId string `json:"region_id"`
ServiceId string `json:"service_id"`
Resource string `json:"resource"`
Count int `json:"count"`
}
// SRegion is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRegion.
type SRegion struct {
apis.SStandaloneResourceBase
@@ -213,6 +259,13 @@ type SUser struct {
EnableMfa *bool `json:"enable_mfa,omitempty"`
}
// SUserOption is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUserOption.
type SUserOption struct {
UserId string `json:"user_id"`
OptionId string `json:"option_id"`
OptionValue string `json:"option_value"`
}
// SUsergroupMembership is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUsergroupMembership.
type SUsergroupMembership struct {
apis.SResourceBase
+35
View File
@@ -62,9 +62,44 @@ type SImage struct {
OssChecksum string `json:"oss_checksum"`
}
// SImageMember is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageMember.
type SImageMember struct {
SImagePeripheral
Member string `json:"member"`
CanShare bool `json:"can_share"`
}
// SImagePeripheral is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImagePeripheral.
type SImagePeripheral struct {
apis.SResourceBase
Id int `json:"id"`
ImageId string `json:"image_id"`
}
// SImageProperty is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageProperty.
type SImageProperty struct {
SImagePeripheral
Name string `json:"name"`
Value string `json:"value"`
}
// SImageSubformat is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageSubformat.
type SImageSubformat struct {
SImagePeripheral
Format string `json:"format"`
Size int64 `json:"size"`
Location string `json:"location"`
Checksum string `json:"checksum"`
FastHash string `json:"fast_hash"`
Status string `json:"status"`
TorrentSize int64 `json:"torrent_size"`
TorrentLocation string `json:"torrent_location"`
TorrentChecksum string `json:"torrent_checksum"`
TorrentStatus string `json:"torrent_status"`
}
// SImageTag is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageTag.
type SImageTag struct {
SImagePeripheral
Value string `json:"value"`
}
+16
View File
@@ -72,6 +72,16 @@ type SDataSource struct {
IsDefault *bool `json:"is_default,omitempty"`
}
// SMeterAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMeterAlert.
type SMeterAlert struct {
SV1Alert
}
// SNodeAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SNodeAlert.
type SNodeAlert struct {
SV1Alert
}
// SNotification is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SNotification.
type SNotification struct {
apis.SVirtualResourceBase
@@ -109,6 +119,12 @@ type SSuggestSysRule struct {
apis.SEnabledResourceBase
Type string `json:"type"`
Period string `json:"period"`
TimeFrom string `json:"time_from"`
Setting interface{} `json:"setting"`
ExecTime time.Time `json:"exec_time"`
}
// SV1Alert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SV1Alert.
type SV1Alert struct {
SAlert
}
+64 -3
View File
@@ -99,9 +99,60 @@ type SJointResourceBase struct {
// SKeystoneCacheObject is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SKeystoneCacheObject.
type SKeystoneCacheObject struct {
SStandaloneResourceBase
DomainId string `json:"domain_id"`
Domain string `json:"domain"`
LastCheck time.Time `json:"last_check"`
DomainId string `json:"domain_id"`
Domain string `json:"domain"`
}
// SMetadata is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SMetadata.
type SMetadata struct {
// 资源类型
// example: network
ObjType string `json:"obj_type"`
// 资源ID
// example: 87321a70-1ecb-422a-8b0c-c9aa632a46a7
ObjId string `json:"obj_id"`
// 资源组合ID
// example: network::87321a70-1ecb-422a-8b0c-c9aa632a46a7
Id string `json:"id"`
// 标签KEY
// exmaple: 部门
Key string `json:"key"`
// 标签值
// example: 技术部
Value string `json:"value"`
// 是否被删除
Deleted bool `json:"deleted"`
}
// SOpsLog is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SOpsLog.
type SOpsLog struct {
Id int64 `json:"id"`
// = Column(BigInteger, primary_key=True)
ObjType string `json:"obj_type"`
// = Column(VARCHAR(40, charset='ascii'), nullable=False)
ObjId string `json:"obj_id"`
// = Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
ObjName string `json:"obj_name"`
// = Column(VARCHAR(128, charset='utf8'), nullable=False)
Action string `json:"action"`
// = Column(VARCHAR(32, charset='ascii'), nullable=False)
Notes string `json:"notes"`
ProjectId string `json:"tenant_id"`
// = Column(VARCHAR(ID_LENGTH, charset='ascii'))
Project string `json:"tenant"`
ProjectDomainId string `json:"project_domain_id"`
ProjectDomain string `json:"project_domain"`
UserId string `json:"user_id"`
// = Column(VARCHAR(ID_LENGTH, charset='ascii'))
User string `json:"user"`
// = Column(VARCHAR(128, charset='utf8'))
DomainId string `json:"domain_id"`
Domain string `json:"domain"`
Roles string `json:"roles"`
// BillingType string `width:"64" charset:"ascii" default:"postpaid" list:"user" create:"user"` // billing_type = Column(VARCHAR(64, charset='ascii'), nullable=True)
OpsTime time.Time `json:"ops_time"`
OwnerDomainId string `json:"owner_domain_id"`
OwnerProjectId string `json:"owner_tenant_id"`
}
// SProjectizedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SProjectizedResourceBase.
@@ -196,6 +247,16 @@ type SStatusStandaloneResourceBase struct {
SStatusResourceBase
}
// STenant is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.STenant.
type STenant struct {
SKeystoneCacheObject
}
// SUser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SUser.
type SUser struct {
SKeystoneCacheObject
}
// SVirtualJointResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SVirtualJointResourceBase.
type SVirtualJointResourceBase struct {
SJointResourceBase
@@ -4,6 +4,7 @@ import (
"time"
)
// +onecloud:model-api-gen
type SCertificateResourceBase struct {
Certificate string `create:"required" list:"user" update:"user"`
PrivateKey string `create:"required" list:"admin" update:"user"`
+1
View File
@@ -24,6 +24,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
)
// +onecloud:model-api-gen
type SExternalizedResourceBase struct {
// 外部Id, 对用公有云私有资源自身的Id
ExternalId string `width:"256" charset:"utf8" index:"true" list:"user" create:"admin_optional" update:"admin" json:"external_id"`
+1
View File
@@ -34,6 +34,7 @@ type SScopedResourceBaseManager struct {
SProjectizedResourceBaseManager
}
// +onecloud:model-api-gen
type SScopedResourceBase struct {
SProjectizedResourceBase
// DomainId string `width:"64" charset:"ascii" nullable:"true" index:"true" list:"user"`
+1 -1
View File
@@ -61,7 +61,7 @@ type SVirtualResourceBase struct {
IsSystem bool `nullable:"true" default:"false" list:"admin" create:"optional" json:"is_system"`
// 资源放入回收站时间
PendingDeletedAt time.Time `json:"pending_deleted_at"`
PendingDeletedAt time.Time `json:"pending_deleted_at" list:"user"`
// 资源是否处于回收站中
PendingDeleted bool `nullable:"false" default:"false" index:"true" get:"user" list:"user" json:"pending_deleted"`
}
+1
View File
@@ -24,6 +24,7 @@ import (
"yunion.io/x/onecloud/pkg/cloudcommon/db"
)
// +onecloud:swagger-gen-ignore
type SGuestcdromManager struct {
db.SModelBaseManager
}
+1
View File
@@ -42,6 +42,7 @@ type SNetInterface struct {
Mtu int16 `nullable:"true"` // Column(SMALLINT, nullable=True)
}
// +onecloud:swagger-gen-ignore
type SNetInterfaceManager struct {
db.SModelBaseManager
}
+1
View File
@@ -24,6 +24,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
)
// +onecloud:swagger-gen-ignore
type SGuestImageJointManager struct {
db.SJointResourceBaseManager
}
+1
View File
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SImageMemberManager struct {
db.SResourceBaseManager
}
+1
View File
@@ -23,6 +23,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
)
// +onecloud:swagger-gen-ignore
type SImagePropertyManager struct {
db.SResourceBaseManager
}
+1
View File
@@ -31,6 +31,7 @@ import (
"yunion.io/x/onecloud/pkg/util/torrentutils"
)
// +onecloud:swagger-gen-ignore
type SImageSubformatManager struct {
db.SResourceBaseManager
}
+1
View File
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SImageTagManager struct {
db.SResourceBaseManager
}
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SFederationProtocolManager struct {
db.SModelBaseManager
}
+1
View File
@@ -30,6 +30,7 @@ import (
"yunion.io/x/onecloud/pkg/util/fileutils2"
)
// +onecloud:swagger-gen-ignore
type SFernetKeyManager struct {
db.SModelBaseManager
}
+3
View File
@@ -32,6 +32,7 @@ import (
"yunion.io/x/onecloud/pkg/util/stringutils2"
)
// +onecloud:swagger-gen-ignore
type IIdentityModelManager interface {
db.IStandaloneModelManager
@@ -46,6 +47,7 @@ type IIdentityModel interface {
GetIIdentityModel() IIdentityModel
}
// +onecloud:swagger-gen-ignore
type SIdentityBaseResourceManager struct {
db.SStandaloneResourceBaseManager
db.SDomainizedResourceBaseManager
@@ -65,6 +67,7 @@ type SIdentityBaseResource struct {
// DomainId string `width:"64" charset:"ascii" default:"default" nullable:"false" index:"true" list:"user"`
}
// +onecloud:swagger-gen-ignore
type SEnabledIdentityBaseResourceManager struct {
SIdentityBaseResourceManager
}
+1
View File
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SIdpRemoteIdsManager struct {
db.SModelBaseManager
}
+1
View File
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SImpliedRoleManager struct {
db.SModelBaseManager
}
+1
View File
@@ -18,6 +18,7 @@ import (
"yunion.io/x/onecloud/pkg/cloudcommon/db"
)
// +onecloud:swagger-gen-ignore
type SNonlocalUserManager struct {
db.SModelBaseManager
}
+2
View File
@@ -228,6 +228,7 @@ func (policy *SPolicy) AllowPerformPublic(ctx context.Context, userCred mcclient
return true
}
// 共享Policy
func (policy *SPolicy) PerformPublic(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPublicDomainInput) (jsonutils.JSONObject, error) {
err := db.SharablePerformPublic(policy, ctx, userCred, apis.PerformPublicProjectInput{PerformPublicDomainInput: input})
if err != nil {
@@ -241,6 +242,7 @@ func (policy *SPolicy) AllowPerformPrivate(ctx context.Context, userCred mcclien
return true
}
// 设置policy为私有
func (policy *SPolicy) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error) {
err := db.SharablePerformPrivate(policy, ctx, userCred)
if err != nil {
+1
View File
@@ -27,6 +27,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
)
// +onecloud:swagger-gen-ignore
type SProjectResourceBaseManager struct{}
func (manager *SProjectResourceBaseManager) ListItemFilter(
+2
View File
@@ -482,6 +482,7 @@ func (project *SProject) AllowPerformJoin(ctx context.Context,
return db.IsAdminAllowPerform(userCred, project, "join")
}
// 将用户或组加入项目
func (project *SProject) PerformJoin(
ctx context.Context,
userCred mcclient.TokenCredential,
@@ -567,6 +568,7 @@ func (project *SProject) AllowPerformLeave(ctx context.Context,
return db.IsAdminAllowPerform(userCred, project, "leave")
}
// 将用户或组移出项目
func (project *SProject) PerformLeave(
ctx context.Context,
userCred mcclient.TokenCredential,
+1
View File
@@ -16,6 +16,7 @@ package models
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
// +onecloud:swagger-gen-ignore
type SUserOptionManager struct {
db.SModelBaseManager
}
+2 -12
View File
@@ -126,20 +126,10 @@ class ModelAPI(FuncDispatcher):
def gen_cloudcommon(self):
self.run(pkg=["cloudcommon", "db"])
self.run(pkg=["cloudcommon", "db", "proxy"], out=["cloudcommon", "proxy"])
def gen_cloudprovider(self):
self.run_same("cloudprovider")
def gen_compute(self):
self.run_model("compute")
def gen_image(self):
self.run_model("image")
def gen_identity(self):
self.run(pkg=["keystone", "models"], out=["identity"])
def gen_monitor(self):
self.run_model("compute")
self.run_model("image")
self.run(pkg=["monitor", "models"], out=["monitor"])
class SwaggerCode(FuncDispatcher):