Documentation ¶
Overview ¶
Copyright 2019 Yunion
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AddScopeResourceCountHandler(prefix string, app *appsrv.Application)
- func AppDBInit(app *appsrv.Application)
- func ApplyFilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func ApplyListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func ApplyListItemsGeneralFilters(manager IModelManager, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func ApplyQueryDistinctExtraField(q *sqlchemy.SQuery, field string, managers ...QueryDistinctExtraFieldProvider) (*sqlchemy.SQuery, error)
- func AutoPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, startRun bool)
- func CalculateModelChecksum(dbObj IRecordChecksumModel) (string, error)
- func CallUpdateNotifyHook(ctx context.Context, userCred mcclient.TokenCredential, obj IModel)
- func CheckRecordChecksumConsistent(model IModel) error
- func CheckSync(autoSync bool, enableChecksumTables bool, skipInitChecksum bool) bool
- func CurrentTimestamp(t time.Time) int64
- func CustomizeDelete(model IModel, ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func DBStatsHandler(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func DeleteModel(ctx context.Context, userCred mcclient.TokenCredential, item IModel) error
- func DetachJoint(ctx context.Context, userCred mcclient.TokenCredential, item IJointModel) error
- func EnabledPerformEnable(model IEnabledBase, ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func EnsureAppSyncDB(app *appsrv.Application, opt *common_options.DBOptions, ...)
- func Fetch(model IModel) error
- func FetchCheckQueryOwnerScope(ctx context.Context, userCred mcclient.TokenCredential, ...) (mcclient.IIdentityProvider, rbacutils.TRbacScope, error, ...)
- func FetchCustomizeColumns(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, ...) ([]*jsonutils.JSONDict, error)
- func FetchDistinctField(modelManager IModelManager, field string) ([]string, error)
- func FetchDomainInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func FetchIdFieldMap(manager IStandaloneModelManager, field string, idMap map[string]string) (map[string]string, error)
- func FetchIdFieldMap2(manager IStandaloneModelManager, field string, ids []string) (map[string]string, error)
- func FetchIdNameMap(manager IStandaloneModelManager, idMap map[string]string) (map[string]string, error)
- func FetchIdNameMap2(manager IStandaloneModelManager, ids []string) (map[string]string, error)
- func FetchModelObjects(modelManager IModelManager, query *sqlchemy.SQuery, targets interface{}) error
- func FetchModelObjectsByIds(modelManager IModelManager, fieldName string, ids []string, ...) error
- func FetchProjectInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func FetchQueryDomain(ctx context.Context, userCred mcclient.TokenCredential, ...) (string, error)
- func FetchQueryObjectsByIds(q *sqlchemy.SQuery, fieldName string, ids []string, targets interface{}) error
- func FetchStandaloneObjectsByIds(modelManager IModelManager, ids []string, targets interface{}) error
- func FetchUsageOwnerScope(ctx context.Context, userCred mcclient.TokenCredential, ...) (mcclient.IIdentityProvider, rbacutils.TRbacScope, error, ...)
- func FetchUserInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func GenerateAlterName(model IModel, hint string) (string, error)
- func GenerateName(ctx context.Context, manager IModelManager, ownerId mcclient.IIdentityProvider, ...) (string, error)
- func GenerateName2(ctx context.Context, manager IModelManager, ownerId mcclient.IIdentityProvider, ...) (string, error)
- func GetDetailFields(manager IModelManager, userCred mcclient.TokenCredential) ([]string, []string)
- func GetItemDetails(manager IModelManager, item IModel, ctx context.Context, ...) (jsonutils.JSONObject, error)
- func GetLockClassKey(manager IModelManager, ownerId mcclient.IIdentityProvider) string
- func GetModelIdstr(model IModel) string
- func GetPropertyTagValuePairs(manager IModelManager, tagObjType string, tagIdField string, ...) (jsonutils.JSONObject, error)
- func GetPropertyTagValueTree(manager IModelManager, tagObjType string, tagIdField string, ...) (jsonutils.JSONObject, error)
- func GetVisiableMetadata(ctx context.Context, model IStandaloneModel, userCred mcclient.TokenCredential) (map[string]string, error)
- func GlobalModelManagerTables() map[string]IModelManager
- func IOwnerResourceBaseModelGetChangeOwnerCandidateDomains(model IOwnerResourceBaseModel) (apis.ChangeOwnerCandidateDomainsOutput, error)
- func ISharableChangeOwnerCandidateDomainIds(model ISharableBaseModel) []string
- func ISharableMergeChangeOwnerCandidateDomainIds(model ISharableBaseModel, candidates ...[]string) []string
- func ISharableMergeShareRequireDomainIds(requiredIds ...[]string) []string
- func InheritFromTo(ctx context.Context, src IClassMetadataOwner, dest IClassMetadataSetter) error
- func InitAllManagers()
- func InitManager(initfunc func())
- func InitOpsLog()
- func InjectModelsChecksum(man IRecordChecksumModelManager) error
- func IsAdminAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
- func IsAdminAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsAdminAllowDelete(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsAdminAllowGet(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsAdminAllowGetSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsAdminAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsAdminAllowPerform(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsAdminAllowUpdate(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsAdminAllowUpdateSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsAllowClassPerform(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, ...) rbacutils.SPolicyResult
- func IsAllowCreate(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, ...) rbacutils.SPolicyResult
- func IsAllowDelete(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsAllowGet(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsAllowGetSpec(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsAllowList(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, ...) rbacutils.SPolicyResult
- func IsAllowPerform(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsAllowUpdate(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsAllowUpdateSpec(ctx context.Context, scope rbacutils.TRbacScope, ...) bool
- func IsDomainAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
- func IsDomainAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsDomainAllowDelete(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsDomainAllowGet(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsDomainAllowGetSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsDomainAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsDomainAllowPerform(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsDomainAllowUpdate(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsDomainAllowUpdateSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsInSameClass(ctx context.Context, cmo1, cmo2 IClassMetadataOwner) (bool, error)
- func IsMetadataKeyPrivateKey(key string) bool
- func IsMetadataKeySysTag(key string) bool
- func IsMetadataKeySystemAdmin(key string) bool
- func IsMetadataKeyVisiable(key string) bool
- func IsObjectRbacAllowed(ctx context.Context, model IModel, userCred mcclient.TokenCredential, ...) error
- func IsProjectAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
- func IsProjectAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsProjectAllowDelete(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsProjectAllowGet(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsProjectAllowGetSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsProjectAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
- func IsProjectAllowPerform(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func IsProjectAllowUpdate(ctx context.Context, userCred mcclient.TokenCredential, obj IModel) bool
- func IsProjectAllowUpdateSpec(ctx context.Context, userCred mcclient.TokenCredential, obj IModel, ...) bool
- func JointMasterID(joint IJointModel) string
- func JointModelExtra(jointModel IJointModel) (string, string)
- func JointSlaveID(joint IJointModel) string
- func ListItemFilter(manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, ...) (*sqlchemy.SQuery, error)
- func ListItemQueryFilters(manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, ...) (*sqlchemy.SQuery, error)
- func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, ...) (*modulebase.ListResult, error)
- func ListQueryByArchitecture(q *sqlchemy.SQuery, fieldKey string, arch string) *sqlchemy.SQuery
- func NeedOrderQuery(fieldOrders []string) bool
- func NewNameValidator(manager IModelManager, ownerId mcclient.IIdentityProvider, name string, ...) error
- func ObjectIdQueryWithPolicyResult(q *sqlchemy.SQuery, manager IModelManager, result rbacutils.SPolicyResult) *sqlchemy.SQuery
- func ObjectIdQueryWithTagFilters(q *sqlchemy.SQuery, idField string, modelName string, ...) *sqlchemy.SQuery
- func OrderByExtraFields(manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, ...) (*sqlchemy.SQuery, error)
- func OrderByFields(q *sqlchemy.SQuery, fieldOrders []string, fields []sqlchemy.IQueryField) *sqlchemy.SQuery
- func OrderByStandaloneResourceName(q *sqlchemy.SQuery, modelManager IStandaloneModelManager, fieldName string, ...) *sqlchemy.SQuery
- func PerformSetScope(ctx context.Context, obj IScopedResourceModel, ...) (jsonutils.JSONObject, error)
- func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, ...) ([]jsonutils.JSONObject, error)
- func RegistUserCredCacheUpdater()
- func RegisterModelManager(modelMan IModelManager)
- func RegisterModelManagerWithKeyword(modelMan IModelManager, keyword string)
- func RequireSameClass(ctx context.Context, cmo1, cmo2 IClassMetadataOwner) error
- func SetChecksumTestFailedNotifier(notifier func(obj *jsonutils.JSONDict))
- func SetExternalId(model IExternalizedModel, userCred mcclient.TokenCredential, idStr string) error
- func SetUpdateNotifyHook(f updateNotifyHookFunc)
- func SharableGetSharedProjects(model ISharableBaseModel, targetType string) []string
- func SharableManagerFilterByOwner(manager IStandaloneModelManager, q *sqlchemy.SQuery, ...) *sqlchemy.SQuery
- func SharableManagerValidateCreateData(manager IStandaloneModelManager, ctx context.Context, ...) (apis.SharableResourceBaseCreateInput, error)
- func SharableModelCustomizeCreate(model ISharableBaseModel, ctx context.Context, ...) error
- func SharableModelIsSharable(model ISharableBaseModel, reqUsrId mcclient.IIdentityProvider) bool
- func SharableModelIsShared(model ISharableBaseModel) bool
- func SharablePerformPrivate(model ISharableBaseModel, ctx context.Context, ...) error
- func SharablePerformPublic(model ISharableBaseModel, ctx context.Context, ...) error
- func StartTenantCacheSync(ctx context.Context, intvalSeconds int)
- func StatusBasePerformStatus(model IStatusBaseModel, userCred mcclient.TokenCredential, ...) error
- func StatusBaseSetStatus(model IStatusBaseModel, userCred mcclient.TokenCredential, status string, ...) error
- func Update(model IModel, updateFunc func() error) (sqlchemy.UpdateDiffs, error)
- func UpdateModelChecksum(dbObj IRecordChecksumModel) error
- func UpdateWithLock(ctx context.Context, model IModel, updateFunc func() error) (sqlchemy.UpdateDiffs, error)
- func UsagePolicyCheck(userCred mcclient.TokenCredential, manager IScopedResourceManager, ...) rbacutils.SPolicyResult
- func ValidateCreateData(funcName string, manager IModelManager, ctx context.Context, ...) (*jsonutils.JSONDict, error)
- func ValidateCreateDomainId(domainId string) error
- func ValidateDeleteCondition(model IModel, ctx context.Context, data jsonutils.JSONObject) error
- func ValidateUpdateCondition(model IModel, ctx context.Context) error
- func ValidateUpdateData(model IModel, ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func ValueToError(out reflect.Value) error
- func ValueToJSONDict(out reflect.Value) *jsonutils.JSONDict
- func ValueToJSONObject(out reflect.Value) jsonutils.JSONObject
- type AllMetadataOwner
- type Caller
- type ClassMetadataOwner
- type CustomizeListFilterFunc
- type CustomizeListFilters
- type DBJointModelDispatcher
- func (dispatcher *DBJointModelDispatcher) Attach(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBJointModelDispatcher) Detach(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBJointModelDispatcher) Get(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (dispatcher *DBJointModelDispatcher) JointModelManager() IJointModelManager
- func (dispatcher *DBJointModelDispatcher) ListMasterDescendent(ctx context.Context, idStr string, query jsonutils.JSONObject) (*modulebase.ListResult, error)
- func (dispatcher *DBJointModelDispatcher) ListSlaveDescendent(ctx context.Context, idStr string, query jsonutils.JSONObject) (*modulebase.ListResult, error)
- func (dispatcher *DBJointModelDispatcher) MasterKeywordPlural() string
- func (dispatcher *DBJointModelDispatcher) SlaveKeywordPlural() string
- func (dispatcher *DBJointModelDispatcher) Update(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- type DBModelDispatcher
- func (dispatcher *DBModelDispatcher) BatchCreate(ctx context.Context, query jsonutils.JSONObject, data jsonutils.JSONObject, ...) ([]modulebase.SubmitResult, error)
- func (dispatcher *DBModelDispatcher) ContextKeywordPlurals() [][]string
- func (dispatcher *DBModelDispatcher) Create(ctx context.Context, query jsonutils.JSONObject, data jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) CustomizeHandlerInfo(handler *appsrv.SHandlerInfo)
- func (dispatcher *DBModelDispatcher) Delete(ctx context.Context, idstr string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) DeleteSpec(ctx context.Context, idstr string, spec string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) Filter(f appsrv.FilterHandler) appsrv.FilterHandler
- func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, query jsonutils.JSONObject, isHead bool) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) GetSpecific(ctx context.Context, idStr string, spec string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) Keyword() string
- func (dispatcher *DBModelDispatcher) KeywordPlural() string
- func (dispatcher *DBModelDispatcher) List(ctx context.Context, query jsonutils.JSONObject, ...) (*modulebase.ListResult, error)
- func (dispatcher *DBModelDispatcher) PerformAction(ctx context.Context, idStr string, action string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) PerformClassAction(ctx context.Context, action string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) Update(ctx context.Context, idStr string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (dispatcher *DBModelDispatcher) UpdateSpec(ctx context.Context, idStr string, spec string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- type FilterByOwnerProvider
- type IAdminSharableVirtualModel
- type IAdminSharableVirtualModelManager
- type IClassMetadataOwner
- type IClassMetadataSetter
- type IDomainLevelModel
- type IDomainLevelModelManager
- type IEnabledBase
- type IExternalizedModel
- type IExternalizedModelManager
- type IInfrasModel
- type IInfrasModelManager
- type IJointModel
- type IJointModelManager
- type IManagedResourceBase
- type IMetadataBaseModel
- type IMetadataBaseModelManager
- type IModel
- func DoCreate(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, ...) (IModel, error)
- func FetchById(manager IModelManager, idStr string) (IModel, error)
- func FetchByIdOrName(manager IModelManager, userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func FetchByName(manager IModelManager, userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func FetchIModelObjects(modelManager IModelManager, query *sqlchemy.SQuery) ([]IModel, error)
- func NewModelObject(modelManager IModelManager) (IModel, error)
- type IModelI18nBase
- type IModelI18nEntry
- type IModelI18nTable
- type IModelManager
- type IOwnerResourceBaseModel
- type IPendingDeletable
- type IRecordChecksumModel
- type IRecordChecksumModelManager
- type IRecordChecksumResourceBase
- type IResource
- type IResourceCountManager
- type IResourceModel
- type IResourceModelManager
- type IScopedResourceManager
- type IScopedResourceModel
- type ISharableBase
- type ISharableBaseModel
- type ISharableVirtualModel
- type ISharableVirtualModelManager
- type IStandaloneModel
- type IStandaloneModelManager
- type IStatusBase
- type IStatusBaseModel
- type IStatusDomainLevelModel
- type IStatusInfrasModel
- type IStatusStandaloneModel
- type ITableSpec
- type IUsage
- type IUserModelManager
- type IVirtualModel
- type IVirtualModelManager
- type ListItemExportKeysProvider
- type QueryDistinctExtraFieldProvider
- type SAdminSharableVirtualResourceBase
- func (model *SAdminSharableVirtualResourceBase) AddInfo(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SAdminSharableVirtualResourceBase) GetIAdminSharableVirtualModel() IAdminSharableVirtualModel
- func (model *SAdminSharableVirtualResourceBase) RemoveInfo(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SAdminSharableVirtualResourceBase) SetInfo(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SAdminSharableVirtualResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.AdminSharableVirtualResourceBaseUpdateInput, error)
- type SAdminSharableVirtualResourceBaseManager
- func (manager *SAdminSharableVirtualResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.AdminSharableVirtualResourceDetails
- func (manager *SAdminSharableVirtualResourceBaseManager) GetIAdminSharableVirtualModelManager() IAdminSharableVirtualModelManager
- func (manager *SAdminSharableVirtualResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SAdminSharableVirtualResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SAdminSharableVirtualResourceBaseManager) QueryDistinctExtraFields(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SAdminSharableVirtualResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.AdminSharableVirtualResourceBaseCreateInput, error)
- func (manager *SAdminSharableVirtualResourceBaseManager) ValidateRecordsData(man IAdminSharableVirtualModelManager, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
- type SAutoDeleteResourceBase
- type SAutoDeleteResourceBaseManager
- type SCachedTenant
- type SCertificateResourceBase
- type SDistinctField
- type SDistinctFieldManager
- type SDnsNameValidatorManager
- type SDomainLevelResourceBase
- func (model *SDomainLevelResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SDomainLevelResourceBase) DomainLevelModelManager() IDomainLevelModelManager
- func (model *SDomainLevelResourceBase) GetDetailsChangeOwnerCandidateDomains(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ChangeOwnerCandidateDomainsOutput, error)
- func (model *SDomainLevelResourceBase) GetIDomainLevelModel() IDomainLevelModel
- func (model *SDomainLevelResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
- func (model *SDomainLevelResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SDomainLevelResourceBase) SyncCloudDomainId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider)
- func (model *SDomainLevelResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.DomainLevelResourceBaseUpdateInput, error)
- type SDomainLevelResourceBaseManager
- func (manager *SDomainLevelResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.DomainLevelResourceDetails
- func (manager *SDomainLevelResourceBaseManager) GetIDomainLevelModelManager() IDomainLevelModelManager
- func (manager *SDomainLevelResourceBaseManager) GetPropertyDomainTagValuePairs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SDomainLevelResourceBaseManager) GetPropertyDomainTagValueTree(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (domainman *SDomainLevelResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
- func (manager *SDomainLevelResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainLevelResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainLevelResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainLevelResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SDomainLevelResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.DomainLevelResourceCreateInput, error)
- type SDomainizedResourceBase
- type SDomainizedResourceBaseManager
- func (manager *SDomainizedResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.DomainizedResourceInfo
- func (manager *SDomainizedResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SDomainizedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SDomainizedResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainizedResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainizedResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
- func (manager *SDomainizedResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDomainizedResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SDomainizedResourceBaseManager) ResourceScope() rbacutils.TRbacScope
- type SEnabledResourceBase
- type SEnabledResourceBaseManager
- type SEnabledStatusDomainLevelResourceBase
- func (self *SEnabledStatusDomainLevelResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SEnabledStatusDomainLevelResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SEnabledStatusDomainLevelResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusDomainLevelResourceBaseUpdateInput, error)
- type SEnabledStatusDomainLevelResourceBaseManager
- func (manager *SEnabledStatusDomainLevelResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.EnabledStatusDomainLevelResourceDetails
- func (manager *SEnabledStatusDomainLevelResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusDomainLevelResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusDomainLevelResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusDomainLevelResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusDomainLevelResourceCreateInput, error)
- type SEnabledStatusInfrasResourceBase
- func (self *SEnabledStatusInfrasResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SEnabledStatusInfrasResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SEnabledStatusInfrasResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusInfrasResourceBaseUpdateInput, error)
- type SEnabledStatusInfrasResourceBaseManager
- func (manager *SEnabledStatusInfrasResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.EnabledStatusInfrasResourceBaseDetails
- func (manager *SEnabledStatusInfrasResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) (*apis.StatusStatistic, error)
- func (manager *SEnabledStatusInfrasResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusInfrasResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusInfrasResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusInfrasResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusInfrasResourceBaseCreateInput, error)
- type SEnabledStatusStandaloneResourceBase
- func (self *SEnabledStatusStandaloneResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SEnabledStatusStandaloneResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SEnabledStatusStandaloneResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusStandaloneResourceBaseUpdateInput, error)
- type SEnabledStatusStandaloneResourceBaseManager
- func (manager *SEnabledStatusStandaloneResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.EnabledStatusStandaloneResourceDetails
- func (manager *SEnabledStatusStandaloneResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusStandaloneResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusStandaloneResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SEnabledStatusStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EnabledStatusStandaloneResourceCreateInput, error)
- type SEncryptedResource
- func (res *SEncryptedResource) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (res *SEncryptedResource) GetEncryptInfo(ctx context.Context, userCred mcclient.TokenCredential) (apis.SEncryptInfo, error)
- func (res *SEncryptedResource) IsEncrypted() bool
- func (res *SEncryptedResource) ValidateEncryption(ctx context.Context, userCred mcclient.TokenCredential) error
- type SEncryptedResourceManager
- func (manager *SEncryptedResourceManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.EncryptedResourceDetails
- func (manager *SEncryptedResourceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.EncryptedResourceCreateInput, error)
- type SExternalizedResourceBase
- type SExternalizedResourceBaseManager
- type SGetResourceTagValuePairsInput
- type SGetResourceTagValueTreeInput
- type SHostNameValidatorManager
- type SI18n
- type SI18nManager
- func (manager *SI18nManager) GetModelI18N(ctx context.Context, model IModel) ([]SI18n, error)
- func (manager *SI18nManager) GetModelKeyI18N(ctx context.Context, model IModel, keyName string) ([]SI18n, error)
- func (manager *SI18nManager) SyncI18ns(ctx context.Context, userCred mcclient.TokenCredential, model IModel, ...) error
- type SInfrasResourceBase
- func (model *SInfrasResourceBase) AllowPerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SInfrasResourceBase) AllowPerformPublic(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SInfrasResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SInfrasResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SInfrasResourceBase) GetIInfrasModel() IInfrasModel
- func (model *SInfrasResourceBase) GetRequiredSharedDomainIds() []string
- func (model *SInfrasResourceBase) GetSharableTargetDomainIds() []string
- func (model *SInfrasResourceBase) GetSharedDomains() []string
- func (model *SInfrasResourceBase) GetSharedInfo() apis.SShareInfo
- func (model *SInfrasResourceBase) IsSharable(reqUsrId mcclient.IIdentityProvider) bool
- func (model *SInfrasResourceBase) IsShared() bool
- func (model *SInfrasResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SInfrasResourceBase) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SInfrasResourceBase) PerformPublic(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SInfrasResourceBase) SaveSharedInfo(src apis.TOwnerSource, ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SInfrasResourceBase) SyncShareState(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SInfrasResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.InfrasResourceBaseUpdateInput, error)
- type SInfrasResourceBaseManager
- func (manager *SInfrasResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.InfrasResourceBaseDetails
- func (manager *SInfrasResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SInfrasResourceBaseManager) GetIInfrasModelManager() IInfrasModelManager
- func (manager *SInfrasResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SInfrasResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SInfrasResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SInfrasResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.InfrasResourceBaseCreateInput, error)
- type SJointResourceBase
- type SJointResourceBaseManager
- func (manager *SJointResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.JointResourceBaseDetails
- func (manager *SJointResourceBaseManager) FilterByParams(q *sqlchemy.SQuery, params jsonutils.JSONObject) *sqlchemy.SQuery
- func (manager *SJointResourceBaseManager) GetIJointModelManager() IJointModelManager
- func (manager *SJointResourceBaseManager) GetMasterManager() IStandaloneModelManager
- func (manager *SJointResourceBaseManager) GetSlaveManager() IStandaloneModelManager
- func (manager *SJointResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SJointResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
- func (manager *SJointResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SJointResourceBaseManager) ResourceScope() rbacutils.TRbacScope
- func (manager *SJointResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.JoinResourceBaseCreateInput, error)
- type SKeystoneCacheObject
- type SKeystoneCacheObjectManager
- type SMetadata
- type SMetadataManager
- func (manager *SMetadataManager) GetAll(ctx context.Context, obj IModel, keys []string, keyPrefix string, ...) (map[string]string, error)
- func (manager *SMetadataManager) GetJsonValue(ctx context.Context, model IModel, key string, ...) jsonutils.JSONObject
- func (manager *SMetadataManager) GetPropertyTagValuePairs(ctx context.Context, userCred mcclient.TokenCredential, ...) (*modulebase.ListResult, error)
- func (manager *SMetadataManager) GetStringValue(ctx context.Context, model IModel, key string, ...) string
- func (manager *SMetadataManager) GetSysadminKey(key string) string
- func (manager *SMetadataManager) InitializeData() error
- func (manager *SMetadataManager) IsSystemAdminKey(key string) bool
- func (manager *SMetadataManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SMetadataManager) Query(fields ...string) *sqlchemy.SQuery
- func (manager *SMetadataManager) RawQuery(fields ...string) *sqlchemy.SQuery
- func (manager *SMetadataManager) RemoveAll(ctx context.Context, model IModel, userCred mcclient.TokenCredential) error
- func (manager *SMetadataManager) SetAll(ctx context.Context, obj IModel, store map[string]interface{}, ...) error
- func (manager *SMetadataManager) SetValue(ctx context.Context, obj IModel, key string, value interface{}, ...) error
- func (manager *SMetadataManager) SetValuesWithLog(ctx context.Context, obj IModel, store map[string]interface{}, ...) error
- type SMetadataResourceBaseModelManager
- func (meta *SMetadataResourceBaseModelManager) FetchCustomizeColumns(manager IModelManager, userCred mcclient.TokenCredential, objs []interface{}, ...) []apis.MetadataResourceInfo
- func (meta *SMetadataResourceBaseModelManager) GetExportExtraKeys(keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict
- func (meta *SMetadataResourceBaseModelManager) ListItemExportKeys(manager IModelManager, q *sqlchemy.SQuery, keys stringutils2.SSortedStrings) *sqlchemy.SQuery
- func (meta *SMetadataResourceBaseModelManager) ListItemFilter(manager IModelManager, q *sqlchemy.SQuery, ...) *sqlchemy.SQuery
- func (meta *SMetadataResourceBaseModelManager) OrderByExtraFields(manager IModelManager, q *sqlchemy.SQuery, ...) *sqlchemy.SQuery
- func (meta *SMetadataResourceBaseModelManager) QueryDistinctExtraField(manager IModelManager, q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- type SModelBase
- func (model *SModelBase) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SModelBase) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SModelBase) AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) bool
- func (model *SModelBase) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (model *SModelBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SModelBase) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SModelBase) CustomizedGetDetailsBody(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SModelBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SModelBase) DeleteInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, ...) (jsonutils.JSONObject, error)
- func (model *SModelBase) GetDeleted() bool
- func (model *SModelBase) GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, ...) map[string]string
- func (model *SModelBase) GetI18N(ctx context.Context) *jsonutils.JSONDict
- func (model *SModelBase) GetIModel() IModel
- func (model SModelBase) GetId() string
- func (model *SModelBase) GetModelManager() IModelManager
- func (model SModelBase) GetName() string
- func (model *SModelBase) GetOwnerId() mcclient.IIdentityProvider
- func (model *SModelBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SModelBase) GetShortDescV2(ctx context.Context) *apis.ModelBaseShortDescDetail
- func (model *SModelBase) GetUniqValues() jsonutils.JSONObject
- func (model *SModelBase) GetUpdateVersion() int
- func (model *SModelBase) GetUpdatedAt() time.Time
- func (model *SModelBase) GetUsages() []IUsage
- func (model *SModelBase) IsSharable(ownerId mcclient.IIdentityProvider) bool
- func (model SModelBase) Keyword() string
- func (model SModelBase) KeywordPlural() string
- func (model *SModelBase) MarkDelete() error
- func (model *SModelBase) MarkDeletePreventionOff()
- func (model *SModelBase) MarkDeletePreventionOn()
- func (model *SModelBase) PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) (jsonutils.JSONObject, error)
- func (model *SModelBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SModelBase) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (model *SModelBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SModelBase) PreCheckPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) error
- func (model *SModelBase) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (model *SModelBase) PreUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SModelBase) RecoverUsages(ctx context.Context, userCred mcclient.TokenCredential)
- func (model *SModelBase) SetModelManager(man IModelManager, virtual IModel)
- func (model *SModelBase) UpdateInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, ...) (jsonutils.JSONObject, error)
- func (model *SModelBase) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- func (model *SModelBase) ValidateUpdateCondition(ctx context.Context) error
- func (model *SModelBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ModelBaseUpdateInput, error)
- type SModelBaseManager
- func NewModelBaseManager(model interface{}, tableName string, keyword string, keywordPlural string) SModelBaseManager
- func NewModelBaseManagerWithDBName(model interface{}, tableName string, keyword string, keywordPlural string, ...) SModelBaseManager
- func NewModelBaseManagerWithSplitable(model interface{}, tableName string, keyword string, keywordPlural string, ...) SModelBaseManager
- func NewModelBaseManagerWithSplitableDBName(model interface{}, tableName string, keyword string, keywordPlural string, ...) SModelBaseManager
- func (manager *SModelBaseManager) Alias() string
- func (manager *SModelBaseManager) AliasPlural() string
- func (manager *SModelBaseManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) AllowGetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) bool
- func (manager *SModelBaseManager) AllowPerformPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (manager *SModelBaseManager) BatchPreValidate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (manager *SModelBaseManager) CreateByInsertOrUpdate() bool
- func (manager *SModelBaseManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*CustomizeListFilters, error)
- func (manager *SModelBaseManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)
- func (manager *SModelBaseManager) EnableGenerateName() bool
- func (manager *SModelBaseManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
- func (manager *SModelBaseManager) FetchById(idStr string) (IModel, error)
- func (manager *SModelBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SModelBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SModelBaseManager) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.ModelBaseDetails
- func (manager *SModelBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SModelBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
- func (manager *SModelBaseManager) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterByNotId(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterByOwner(q *sqlchemy.SQuery, ownerId mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SModelBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, uniqValues jsonutils.JSONObject) *sqlchemy.SQuery
- func (manager *SModelBaseManager) GetContextManagers() [][]IModelManager
- func (manager *SModelBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, ...) *jsonutils.JSONDict
- func (manager *SModelBaseManager) GetI18N(ctx context.Context, idstr string, resObj jsonutils.JSONObject) *jsonutils.JSONDict
- func (manager *SModelBaseManager) GetIModelManager() IModelManager
- func (manager *SModelBaseManager) GetImmutableInstance(userCred mcclient.TokenCredential) IModelManager
- func (manager *SModelBaseManager) GetMutableInstance(userCred mcclient.TokenCredential) IModelManager
- func (manager *SModelBaseManager) GetPagingConfig() *SPagingConfig
- func (manager *SModelBaseManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) GetPropertySplitable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) GetPropertySplitableExport(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) GetSkipLog(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) GetSplitTable() *splitable.SSplitTableSpec
- func (manager *SModelBaseManager) HasName() bool
- func (manager *SModelBaseManager) InitializeData() error
- func (manager *SModelBaseManager) IsCustomizedGetDetailsBody() bool
- func (manager *SModelBaseManager) IsStandaloneManager() bool
- func (manager *SModelBaseManager) Keyword() string
- func (manager *SModelBaseManager) KeywordPlural() string
- func (manager *SModelBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SModelBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SModelBaseManager) ListSkipLog(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SModelBaseManager) NamespaceScope() rbacutils.TRbacScope
- func (manager *SModelBaseManager) OnCreateComplete(ctx context.Context, items []IModel, userCred mcclient.TokenCredential, ...)
- func (manager *SModelBaseManager) OnCreateFailed(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (manager *SModelBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SModelBaseManager) PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) PerformPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SModelBaseManager) Query(fieldNames ...string) *sqlchemy.SQuery
- func (manager *SModelBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SModelBaseManager) RawQuery(fieldNames ...string) *sqlchemy.SQuery
- func (manager *SModelBaseManager) ResourceScope() rbacutils.TRbacScope
- func (manager *SModelBaseManager) SetAlias(alias string, aliasPlural string)
- func (manager *SModelBaseManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration
- func (manager *SModelBaseManager) TableSpec() ITableSpec
- func (manager *SModelBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ModelBaseCreateInput, error)
- func (manager *SModelBaseManager) ValidateListConditions(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (manager *SModelBaseManager) ValidateName(name string) error
- type SModelI18nEntry
- type SModelI18nTable
- type SMultiArchResourceBase
- type SMultiArchResourceBaseManager
- type SOpsLog
- func (opslog *SOpsLog) BeforeInsert()
- func (log *SOpsLog) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (opslog *SOpsLog) Dump() string
- func (opslog *SOpsLog) GetId() string
- func (opslog *SOpsLog) GetModelManager() IModelManager
- func (opslog *SOpsLog) GetName() string
- func (self *SOpsLog) GetOwnerId() mcclient.IIdentityProvider
- func (log *SOpsLog) GetRecordTime() time.Time
- func (opslog *SOpsLog) GetUpdateVersion() int
- func (opslog *SOpsLog) GetUpdatedAt() time.Time
- func (self *SOpsLog) IsSharable(reqCred mcclient.IIdentityProvider) bool
- func (opslog *SOpsLog) Run()
- func (self *SOpsLog) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- type SOpsLogManager
- func (manager *SOpsLogManager) CreateByInsertOrUpdate() bool
- func (manager *SOpsLogManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)
- func (manager *SOpsLogManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.OpsLogDetails
- func (manager *SOpsLogManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (self *SOpsLogManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (self *SOpsLogManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (self *SOpsLogManager) FilterByNotId(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (self *SOpsLogManager) FilterByOwner(q *sqlchemy.SQuery, ownerId mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SOpsLogManager) GetPagingConfig() *SPagingConfig
- func (manager *SOpsLogManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SOpsLogManager) LogAttachEvent(ctx context.Context, m1, m2 IModel, userCred mcclient.TokenCredential, ...)
- func (manager *SOpsLogManager) LogDetachEvent(ctx context.Context, m1, m2 IModel, userCred mcclient.TokenCredential, ...)
- func (manager *SOpsLogManager) LogEvent(model IModel, action string, notes interface{}, ...)
- func (manager *SOpsLogManager) LogSyncUpdate(m IModel, uds sqlchemy.UpdateDiffs, userCred mcclient.TokenCredential)
- func (manager *SOpsLogManager) ResourceScope() rbacutils.TRbacScope
- func (manager *SOpsLogManager) SyncOwner(m IModel, former *STenant, userCred mcclient.TokenCredential)
- func (manager *SOpsLogManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.OpsLogCreateInput, error)
- type SOwnerId
- func (o *SOwnerId) GetDomainId() string
- func (o *SOwnerId) GetDomainName() string
- func (o *SOwnerId) GetProjectDomain() string
- func (o *SOwnerId) GetProjectDomainId() string
- func (o *SOwnerId) GetProjectId() string
- func (o *SOwnerId) GetProjectName() string
- func (o *SOwnerId) GetTenantId() string
- func (o *SOwnerId) GetTenantName() string
- func (o *SOwnerId) GetUserId() string
- func (o *SOwnerId) GetUserName() string
- func (ownerId SOwnerId) IsValid() bool
- type SPagingConfig
- type SProjectizedResourceBase
- type SProjectizedResourceBaseManager
- func (manager *SProjectizedResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.ProjectizedResourceInfo
- func (manager *SProjectizedResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SProjectizedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SProjectizedResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SProjectizedResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SProjectizedResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SProjectizedResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SProjectizedResourceBaseManager) ResourceScope() rbacutils.TRbacScope
- type SRecordChecksumResourceBase
- type SRecordChecksumResourceBaseManager
- type SResourceBase
- func (model *SResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SResourceBase) GetDeleted() bool
- func (model *SResourceBase) GetIResourceModel() IResourceModel
- func (self *SResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SResourceBase) GetUpdateVersion() int
- func (model *SResourceBase) GetUpdatedAt() time.Time
- func (model *SResourceBase) MarkDelete() error
- func (model *SResourceBase) MarkUnDelete() error
- func (model *SResourceBase) ResourceModelManager() IResourceModelManager
- func (model *SResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ResourceBaseUpdateInput, error)
- type SResourceBaseManager
- func (manager *SResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.ResourceBaseDetails
- func (manager *SResourceBaseManager) GetIResourceModelManager() IResourceModelManager
- func (manager *SResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SResourceBaseManager) Query(fields ...string) *sqlchemy.SQuery
- func (manager *SResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SResourceBaseManager) RawQuery(fields ...string) *sqlchemy.SQuery
- func (manager *SResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ResourceBaseCreateInput, error)
- type SRole
- type SRoleCacheManager
- func (manager *SRoleCacheManager) FetchRoleById(ctx context.Context, idStr string) (*SRole, error)
- func (manager *SRoleCacheManager) FetchRoleByIdOrName(ctx context.Context, idStr string) (*SRole, error)
- func (manager *SRoleCacheManager) FetchRoleByName(ctx context.Context, idStr string) (*SRole, error)
- func (manager *SRoleCacheManager) FetchRoleFromKeystone(ctx context.Context, idStr string) (*SRole, error)
- func (manager *SRoleCacheManager) OnAdd(obj *jsonutils.JSONDict)
- func (manager *SRoleCacheManager) OnDelete(obj *jsonutils.JSONDict)
- func (manager *SRoleCacheManager) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
- func (manager *SRoleCacheManager) Save(ctx context.Context, idStr string, name string, domainId string, domain string) (*SRole, error)
- func (manager *SRoleCacheManager) StartWatchRoleInKeystone() error
- type SScopeResourceCount
- type SScopedResourceBase
- func (s *SScopedResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (s *SScopedResourceBase) GetDomainId() string
- func (s *SScopedResourceBase) GetMoreColumns(extra *jsonutils.JSONDict) *jsonutils.JSONDict
- func (s *SScopedResourceBase) GetProjectId() string
- func (s *SScopedResourceBase) GetResourceScope() rbacutils.TRbacScope
- func (m *SScopedResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
- func (s *SScopedResourceBase) SetResourceScope(domainId, projectId string) error
- type SScopedResourceBaseManager
- func (manager *SScopedResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.ScopedResourceBaseInfo
- func (m *SScopedResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
- func (m *SScopedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (m *SScopedResourceBaseManager) FilterByScope(q *sqlchemy.SQuery, scope rbacutils.TRbacScope, scopeResId string) *sqlchemy.SQuery
- func (m *SScopedResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery
- func (m *SScopedResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SScopedResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SScopedResourceBaseManager) ValidateCreateData(man IScopedResourceManager, ctx context.Context, ...) (apis.ScopedResourceCreateInput, error)
- type SSharableBaseResource
- type SSharableBaseResourceManager
- func (manager *SSharableBaseResourceManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.SharableResourceBaseInfo
- func (manager *SSharableBaseResourceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- type SSharableVirtualResourceBase
- func (model *SSharableVirtualResourceBase) AllowPerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SSharableVirtualResourceBase) AllowPerformPublic(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SSharableVirtualResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SSharableVirtualResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SSharableVirtualResourceBase) GetISharableVirtualModel() ISharableVirtualModel
- func (model *SSharableVirtualResourceBase) GetRequiredSharedDomainIds() []string
- func (model *SSharableVirtualResourceBase) GetSharableTargetDomainIds() []string
- func (model *SSharableVirtualResourceBase) GetSharedDomains() []string
- func (model *SSharableVirtualResourceBase) GetSharedInfo() apis.SShareInfo
- func (model *SSharableVirtualResourceBase) GetSharedProjects() []string
- func (model *SSharableVirtualResourceBase) IsSharable(reqUsrId mcclient.IIdentityProvider) bool
- func (model *SSharableVirtualResourceBase) IsShared() bool
- func (model *SSharableVirtualResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SSharableVirtualResourceBase) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SSharableVirtualResourceBase) PerformPublic(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SSharableVirtualResourceBase) SaveSharedInfo(src apis.TOwnerSource, ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SSharableVirtualResourceBase) SyncShareState(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SSharableVirtualResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.SharableVirtualResourceBaseUpdateInput, error)
- type SSharableVirtualResourceBaseManager
- func (manager *SSharableVirtualResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.SharableVirtualResourceDetails
- func (manager *SSharableVirtualResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SSharableVirtualResourceBaseManager) GetISharableVirtualModelManager() ISharableVirtualModelManager
- func (manager *SSharableVirtualResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SSharableVirtualResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SSharableVirtualResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SSharableVirtualResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.SharableVirtualResourceCreateInput, error)
- type SSharedResource
- type SSharedResourceManager
- type SStandaloneAnonResourceBase
- func (model *SStandaloneAnonResourceBase) AppendDescription(userCred mcclient.TokenCredential, msg string) error
- func (model *SStandaloneAnonResourceBase) BeforeInsert()
- func (model *SStandaloneAnonResourceBase) ClearSchedDescCache() error
- func (model *SStandaloneAnonResourceBase) GetAllClassMetadata() (map[string]string, error)
- func (model *SStandaloneAnonResourceBase) GetAllCloudMetadata() (map[string]string, error)
- func (model *SStandaloneAnonResourceBase) GetAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) (map[string]string, error)
- func (model *SStandaloneAnonResourceBase) GetAllUserMetadata() (map[string]string, error)
- func (model *SStandaloneAnonResourceBase) GetDetailsClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.GetClassMetadataOutput, error)
- func (model *SStandaloneAnonResourceBase) GetDetailsMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.GetMetadataOutput, error)
- func (model *SStandaloneAnonResourceBase) GetIStandaloneModel() IStandaloneModel
- func (model SStandaloneAnonResourceBase) GetId() string
- func (model *SStandaloneAnonResourceBase) GetMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) string
- func (model *SStandaloneAnonResourceBase) GetMetadataJson(ctx context.Context, key string, userCred mcclient.TokenCredential) jsonutils.JSONObject
- func (model *SStandaloneAnonResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SStandaloneAnonResourceBase) GetShortDescV2(ctx context.Context) *apis.StandaloneAnonResourceShortDescDetail
- func (model *SStandaloneAnonResourceBase) InheritTo(ctx context.Context, dest IClassMetadataSetter) error
- func (model *SStandaloneAnonResourceBase) IsInSameClass(ctx context.Context, pModel *SStandaloneAnonResourceBase) (bool, error)
- func (model *SStandaloneAnonResourceBase) IsShared() bool
- func (model *SStandaloneAnonResourceBase) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)
- func (model *SStandaloneAnonResourceBase) PerformClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStandaloneAnonResourceBase) PerformMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStandaloneAnonResourceBase) PerformSetClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStandaloneAnonResourceBase) PerformSetUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStandaloneAnonResourceBase) PerformUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStandaloneAnonResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SStandaloneAnonResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SStandaloneAnonResourceBase) RemoveAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SStandaloneAnonResourceBase) RemoveMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) error
- func (model *SStandaloneAnonResourceBase) SetAllMetadata(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetClassMetadataAll(ctx context.Context, dictstore map[string]string, ...) error
- func (model *SStandaloneAnonResourceBase) SetClassMetadataValues(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetCloudMetadataAll(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetMetadata(ctx context.Context, key string, value interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetSysCloudMetadataAll(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetUserMetadataAll(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) SetUserMetadataValues(ctx context.Context, dictstore map[string]interface{}, ...) error
- func (model *SStandaloneAnonResourceBase) StandaloneModelManager() IStandaloneModelManager
- func (model *SStandaloneAnonResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StandaloneAnonResourceBaseUpdateInput, error)
- type SStandaloneAnonResourceBaseManager
- func (manager *SStandaloneAnonResourceBaseManager) CreateByInsertOrUpdate() bool
- func (manager *SStandaloneAnonResourceBaseManager) FetchById(idStr string) (IModel, error)
- func (manager *SStandaloneAnonResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StandaloneAnonResourceDetails
- func (manager *SStandaloneAnonResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SStandaloneAnonResourceBaseManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SStandaloneAnonResourceBaseManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (manager *SStandaloneAnonResourceBaseManager) FilterByNotId(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SStandaloneAnonResourceBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, ...) *jsonutils.JSONDict
- func (manager *SStandaloneAnonResourceBaseManager) GetIStandaloneModelManager() IStandaloneModelManager
- func (manager *SStandaloneAnonResourceBaseManager) GetMetadataHiddenKeys() []string
- func (manager *SStandaloneAnonResourceBaseManager) GetPropertyTagValuePairs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SStandaloneAnonResourceBaseManager) GetPropertyTagValueTree(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SStandaloneAnonResourceBaseManager) IsStandaloneManager() bool
- func (manager *SStandaloneAnonResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneAnonResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneAnonResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneAnonResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneAnonResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StandaloneAnonResourceCreateInput, error)
- type SStandaloneResourceBase
- func (model *SStandaloneResourceBase) GetIStandaloneModel() IStandaloneModel
- func (model *SStandaloneResourceBase) GetName() string
- func (model *SStandaloneResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SStandaloneResourceBase) GetShortDescV2(ctx context.Context) *apis.StandaloneResourceShortDescDetail
- func (model *SStandaloneResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StandaloneResourceBaseUpdateInput, error)
- type SStandaloneResourceBaseManager
- func (manager *SStandaloneResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SStandaloneResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SStandaloneResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StandaloneResourceDetails
- func (manager *SStandaloneResourceBaseManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (manager *SStandaloneResourceBaseManager) HasName() bool
- func (manager *SStandaloneResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StandaloneResourceCreateInput, error)
- func (manager *SStandaloneResourceBaseManager) ValidateName(name string) error
- type SStatusDomainLevelResourceBase
- func (self *SStatusDomainLevelResourceBase) GetIStatusDomainLevelModel() IStatusDomainLevelModel
- func (self *SStatusDomainLevelResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStatusDomainLevelResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
- func (model *SStatusDomainLevelResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusDomainLevelResourceBaseUpdateInput, error)
- type SStatusDomainLevelResourceBaseManager
- func (manager *SStatusDomainLevelResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StatusDomainLevelResourceDetails
- func (manager *SStatusDomainLevelResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusDomainLevelResourceCreateInput, error)
- type SStatusDomainLevelUserResourceBase
- type SStatusDomainLevelUserResourceBaseManager
- func (manager *SStatusDomainLevelUserResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StatusDomainLevelUserResourceDetails
- func (manager *SStatusDomainLevelUserResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SStatusDomainLevelUserResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelUserResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelUserResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelUserResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SStatusDomainLevelUserResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusDomainLevelUserResourceCreateInput, error)
- type SStatusInfrasResourceBase
- func (self *SStatusInfrasResourceBase) GetIStatusInfrasModel() IStatusInfrasModel
- func (self *SStatusInfrasResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStatusInfrasResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
- func (model *SStatusInfrasResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusInfrasResourceBaseUpdateInput, error)
- type SStatusInfrasResourceBaseManager
- func (manager *SStatusInfrasResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StatusInfrasResourceBaseDetails
- func (manager *SStatusInfrasResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) (*apis.StatusStatistic, error)
- func (manager *SStatusInfrasResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusInfrasResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusInfrasResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SStatusInfrasResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusInfrasResourceBaseCreateInput, error)
- type SStatusResourceBase
- func (model *SStatusResourceBase) GetDetailsStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.GetDetailsStatusOutput, error)
- func (model SStatusResourceBase) GetProgress() float32
- func (model SStatusResourceBase) GetStatus() string
- func (model *SStatusResourceBase) IsInStatus(status ...string) bool
- func (model *SStatusResourceBase) SetProgressValue(progress float32)
- func (model *SStatusResourceBase) SetStatusValue(status string)
- type SStatusResourceBaseManager
- func (manager *SStatusResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- type SStatusStandaloneResourceBase
- func (self *SStatusStandaloneResourceBase) GetIStatusStandaloneModel() IStatusStandaloneModel
- func (self *SStatusStandaloneResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SStatusStandaloneResourceBase) SetProgress(progress float32) error
- func (model *SStatusStandaloneResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
- func (model *SStatusStandaloneResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusStandaloneResourceBaseUpdateInput, error)
- type SStatusStandaloneResourceBaseManager
- func (manager *SStatusStandaloneResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.StatusStandaloneResourceDetails
- func (manager *SStatusStandaloneResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) (*apis.StatusStatistic, error)
- func (manager *SStatusStandaloneResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusStandaloneResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStatusStandaloneResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SStatusStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.StatusStandaloneResourceCreateInput, error)
- type STenant
- func NewDomain(idStr, name string) STenant
- func NewTenant(idStr string, name string, domainId string, domainName string) STenant
- func ValidateDomainizedResourceInput(ctx context.Context, input apis.DomainizedResourceInput) (*STenant, apis.DomainizedResourceInput, error)
- func ValidateProjectizedResourceInput(ctx context.Context, input apis.ProjectizedResourceInput) (*STenant, apis.ProjectizedResourceInput, error)
- func (tenant *STenant) GetAllClassMetadata() (map[string]string, error)
- func (tenant *STenant) GetDomainId() string
- func (tenant *STenant) GetDomainName() string
- func (tenant *STenant) GetModelManager() IModelManager
- func (tenant *STenant) GetProjectDomain() string
- func (tenant *STenant) GetProjectDomainId() string
- func (tenant *STenant) GetProjectId() string
- func (tenant *STenant) GetProjectName() string
- func (t *STenant) GetTags() tagutils.TTagSet
- func (tenant *STenant) GetTenantId() string
- func (tenant *STenant) GetTenantName() string
- func (tenant *STenant) GetUserId() string
- func (tenant *STenant) GetUserName() string
- func (tenant *STenant) IsDomain() bool
- func (t *STenant) IsExpired() bool
- type STenantCacheManager
- func (manager *STenantCacheManager) Delete(ctx context.Context, idStr string) error
- func (manager *STenantCacheManager) FetchDomainById(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchDomainByIdOrName(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchDomainByIdWithoutExpireCheck(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchDomainByName(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchTenantById(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchTenantByIdOrName(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchTenantByIdWithoutExpireCheck(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FetchTenantByName(ctx context.Context, idStr string) (*STenant, error)
- func (manager *STenantCacheManager) FindFirstProjectOfDomain(ctx context.Context, domainId string) (*STenant, error)
- func (manager *STenantCacheManager) GetDomainQuery(fields ...string) *sqlchemy.SQuery
- func (manager *STenantCacheManager) GetTenantQuery(fields ...string) *sqlchemy.SQuery
- func (manager *STenantCacheManager) InitializeData() error
- func (manager *STenantCacheManager) Save(ctx context.Context, item SCachedTenant, saveMeta bool) (*STenant, error)
- type SUser
- type SUserCacheManager
- func (manager *SUserCacheManager) FetchUserById(ctx context.Context, idStr string) (*SUser, error)
- func (manager *SUserCacheManager) FetchUserByIdOrName(ctx context.Context, idStr string) (*SUser, error)
- func (manager *SUserCacheManager) FetchUserByName(ctx context.Context, idStr string) (*SUser, error)
- func (manager *SUserCacheManager) FetchUserFromKeystone(ctx context.Context, idStr string) (*SUser, error)
- func (manager *SUserCacheManager) Save(ctx context.Context, idStr string, name string, domainId string, domain string) (*SUser, error)
- type SUserResourceBase
- type SUserResourceBaseManager
- func (manager *SUserResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SUserResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SUserResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.UserResourceDetails
- func (manager *SUserResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SUserResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SUserResourceBaseManager) GetIUserModelManager() IUserModelManager
- func (userman *SUserResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
- func (manager *SUserResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SUserResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
- func (manager *SUserResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SUserResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SUserResourceBaseManager) ResourceScope() rbacutils.TRbacScope
- func (manager *SUserResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.UserResourceCreateInput, error)
- type SVirtualJointResourceBase
- type SVirtualJointResourceBaseManager
- func (manager *SVirtualJointResourceBaseManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SVirtualJointResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.VirtualJointResourceBaseDetails
- func (manager *SVirtualJointResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SVirtualJointResourceBaseManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SVirtualJointResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (manager *SVirtualJointResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SVirtualJointResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SVirtualJointResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- type SVirtualResourceBase
- func (model *SVirtualResourceBase) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SVirtualResourceBase) CancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SVirtualResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) DoCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) GetDetailsChangeOwnerCandidateDomains(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.ChangeOwnerCandidateDomainsOutput, error)
- func (model *SVirtualResourceBase) GetIVirtualModel() IVirtualModel
- func (model *SVirtualResourceBase) GetPendingDeleted() bool
- func (model *SVirtualResourceBase) GetPendingDeletedAt() time.Time
- func (model *SVirtualResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SVirtualResourceBase) GetTenantCache(ctx context.Context) (*STenant, error)
- func (model *SVirtualResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
- func (model *SVirtualResourceBase) MarkCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) MarkPendingDelete(userCred mcclient.TokenCredential) error
- func (model *SVirtualResourceBase) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SVirtualResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SVirtualResourceBase) PerformFreeze(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SVirtualResourceBase) PerformUnfreeze(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SVirtualResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (model *SVirtualResourceBase) PreCheckPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) error
- func (model *SVirtualResourceBase) SetProjectInfo(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SVirtualResourceBase) SetSystemInfo(isSystem bool) error
- func (model *SVirtualResourceBase) SyncCloudProjectId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider)
- func (model *SVirtualResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.VirtualResourceBaseUpdateInput, error)
- func (model *SVirtualResourceBase) VirtualModelManager() IVirtualModelManager
- type SVirtualResourceBaseManager
- func (manager *SVirtualResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SVirtualResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
- func (manager *SVirtualResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []apis.VirtualResourceDetails
- func (manager *SVirtualResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SVirtualResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (manager *SVirtualResourceBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, ...) *jsonutils.JSONDict
- func (manager *SVirtualResourceBaseManager) GetIVirtualModelManager() IVirtualModelManager
- func (manager *SVirtualResourceBaseManager) GetPropertyDomainStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]apis.ProjectStatistic, error)
- func (manager *SVirtualResourceBaseManager) GetPropertyProjectStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]apis.ProjectStatistic, error)
- func (manager *SVirtualResourceBaseManager) GetPropertyProjectTagValuePairs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SVirtualResourceBaseManager) GetPropertyProjectTagValueTree(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SVirtualResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, ...) (*apis.StatusStatistic, error)
- func (virtman *SVirtualResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
- func (manager *SVirtualResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SVirtualResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SVirtualResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SVirtualResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SVirtualResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (apis.VirtualResourceCreateInput, error)
- type UUIDGenerator
Constants ¶
const ( MIN_DB_CONN_MAX = 5 ClickhouseDB = sqlchemy.DBName("clickhouse_db") )
const ( SYSTEM_ADMIN_PREFIX = "__sys_" SYS_TAG_PREFIX = "__" CLOUD_TAG_PREFIX = dbapi.CLOUD_TAG_PREFIX USER_TAG_PREFIX = dbapi.USER_TAG_PREFIX SYS_CLOUD_TAG_PREFIX = dbapi.SYS_CLOUD_TAG_PREFIX CLASS_TAG_PREFIX = dbapi.CLASS_TAT_PREFIX TAG_DELETE_RANGE_ALL = "all" OBJECT_TYPE_ID_SEP = "::" )
const ( COLUMN_RECORD_CHECKSUM = "record_checksum" COLUMN_UPDATE_VERSION = "update_version" COLUMN_UPDATED_AT = "updated_at" )
const ( ACT_CREATE = "create" ACT_DELETE = "delete" ACT_UPDATE = "update" ACT_FETCH = "fetch" ACT_ENABLE = "enable" ACT_DISABLE = "disable" ACT_OFFLINE = "offline" ACT_ONLINE = "online" ACT_ATTACH = "attach" ACT_DETACH = "detach" ACT_ATTACH_FAIL = "attach_fail" ACT_DETACH_FAIL = "detach_fail" ACT_DELETE_FAIL = "delete_fail" ACT_CANCEL = "cancel" ACT_DONE = "done" ACT_PUBLIC = "public" ACT_PRIVATE = "private" ACT_SYNC_UPDATE = "sync_update" ACT_SYNC_CREATE = "sync_create" ACT_START_CREATE_BACKUP = "start_create_backup" ACT_CREATE_BACKUP = "create_backup" ACT_CREATE_BACKUP_FAILED = "create_backup_failed" ACT_DELETE_BACKUP = "delete_backup" ACT_DELETE_BACKUP_FAILED = "delete_backup_failed" ACT_UPDATE_BACKUP_GUEST_STATUS = "update_backup_guest_status" ACT_UPDATE_STATUS = "updatestatus" ACT_STARTING = "starting" ACT_START = "start" ACT_START_FAIL = "start_fail" ACT_BACKUP_START = "backup_start" ACT_BACKUP_START_FAILED = "backup_start_fail" ACT_FREEZE = "freeze" ACT_FREEZE_FAIL = "freeze_fail" ACT_UNFREEZE = "unfreeze" ACT_RESTARING = "restarting" ACT_RESTART_FAIL = "restart_fail" ACT_STOPPING = "stopping" ACT_STOP = "stop" ACT_STOP_FAIL = "stop_fail" ACT_RESUMING = "resuming" ACT_RESUME = "resume" ACT_RESUME_FAIL = "resume_fail" ACT_RESIZING = "resizing" ACT_RESIZE = "resize" ACT_RESIZE_FAIL = "resize_fail" ACT_MIGRATING = "migrating" ACT_MIGRATE = "migrate" ACT_MIGRATE_FAIL = "migrate_fail" ACT_VM_CONVERT = "vm_convert" ACT_VM_CONVERTING = "vm_converting" ACT_VM_CONVERT_FAIL = "vm_convert_fail" ACT_SPLIT = "net_split" ACT_MERGE = "net_merge" ACT_SAVING = "saving" ACT_SAVE = "save" ACT_SAVE_FAIL = "save_fail" ACT_PROBE = "probe" ACT_PROBE_FAIL = "probe_fail" ACT_IMAGE_DELETE_FAIL = "delete_fail" ACT_SWITCHED = "switched" ACT_SWITCH_FAILED = "switch_failed" ACT_SNAPSHOTING = "snapshoting" ACT_SNAPSHOT_STREAM = "snapshot_stream" ACT_SNAPSHOT_DONE = "snapshot" ACT_SNAPSHOT_READY = "snapshot_ready" ACT_SNAPSHOT_SYNC = "snapshot_sync" ACT_SNAPSHOT_FAIL = "snapshot_fail" ACT_SNAPSHOT_DELETING = "snapshot_deling" ACT_SNAPSHOT_DELETE = "snapshot_del" ACT_SNAPSHOT_DELETE_FAIL = "snapshot_del_fail" ACT_SNAPSHOT_FAKE_DELETE = "snapshot_fake_del" ACT_SNAPSHOT_UNLINK = "snapshot_unlink" ACT_APPLY_SNAPSHOT_POLICY = "apply_snapshot_policy" ACT_APPLY_SNAPSHOT_POLICY_FAILED = "apply_snapshot_policy_failed" ACT_CANCEL_SNAPSHOT_POLICY = "cancel_snapshot_policy" ACT_CANCEL_SNAPSHOT_POLICY_FAILED = "cancel_snapshot_policy_failed" ACT_VM_SNAPSHOT_AND_CLONE = "vm_snapshot_and_clone" ACT_VM_SNAPSHOT_AND_CLONE_FAILED = "vm_snapshot_and_clone_failed" ACT_VM_RESET_SNAPSHOT = "instance_reset_snapshot" ACT_VM_RESET_SNAPSHOT_FAILED = "instance_reset_snapshot_failed" ACT_SNAPSHOT_POLICY_BIND_DISK = "snapshot_policy_bind_disk" ACT_SNAPSHOT_POLICY_BIND_DISK_FAIL = "snapshot_policy_bind_disk_fail" ACT_SNAPSHOT_POLICY_UNBIND_DISK = "snapshot_policy_unbind_disk" ACT_SNAPSHOT_POLICY_UNBIND_DISK_FAIL = "snapshot_policy_unbind_disk_fail" ACT_DISK_CLEAN_UP_SNAPSHOTS = "disk_clean_up_snapshots" ACT_DISK_CLEAN_UP_SNAPSHOTS_FAIL = "disk_clean_up_snapshots_fail" ACT_DISK_AUTO_SNAPSHOT = "disk_auto_snapshot" ACT_DISK_AUTO_SNAPSHOT_FAIL = "disk_auto_snapshot_fail" ACT_DISK_AUTO_SYNC_SNAPSHOT = "disk_auto_sync_snapshot" ACT_DISK_AUTO_SYNC_SNAPSHOT_FAIL = "disk_auto_sync_snapshot_fail" ACT_ALLOCATING = "allocating" ACT_BACKUP_ALLOCATING = "backup_allocating" ACT_ALLOCATE = "allocate" ACT_BACKUP_ALLOCATE = "backup_allocate" ACT_ALLOCATE_FAIL = "alloc_fail" ACT_BACKUP_ALLOCATE_FAIL = "backup_alloc_fail" ACT_REW_FAIL = "renew_fail" ACT_SET_AUTO_RENEW = "set_auto_renew" ACT_SET_AUTO_RENEW_FAIL = "set_auto_renew_fail" ACT_DELOCATING = "delocating" ACT_DELOCATE = "delocate" ACT_DELOCATE_FAIL = "delocate_fail" ACT_ISO_PREPARING = "iso_preparing" ACT_ISO_PREPARE_FAIL = "iso_prepare_fail" ACT_ISO_ATTACH = "iso_attach" ACT_ISO_DETACH = "iso_detach" ACT_EIP_ATTACH = "eip_attach" ACT_EIP_DETACH = "eip_detach" ACT_SET_METADATA = "set_meta" ACT_DEL_METADATA = "del_meta" ACT_VM_DEPLOY = "deploy" ACT_VM_DEPLOY_FAIL = "deploy_fail" ACT_SET_USER_PASSWORD = "set_user_password" ACT_SET_USER_PASSWORD_FAIL = "set_user_password_fail" ACT_VM_IO_THROTTLE = "io_throttle" ACT_VM_IO_THROTTLE_FAIL = "io_throttle_fail" ACT_REBUILDING_ROOT = "rebuilding_root" ACT_REBUILD_ROOT = "rebuild_root" ACT_REBUILD_ROOT_FAIL = "rebuild_root_fail" ACT_CHANGING_FLAVOR = "changing_flavor" ACT_CHANGE_FLAVOR = "change_flavor" ACT_CHANGE_FLAVOR_FAIL = "change_flavor_fail" ACT_SYNCING_CONF = "syncing_conf" ACT_SYNC_CONF = "sync_conf" ACT_SYNC_CONF_FAIL = "sync_conf_fail" ACT_SYNC_STATUS = "sync_status" ACT_CHANGE_OWNER = "change_owner" ACT_SYNC_OWNER = "sync_owner" ACT_SYNC_SHARE = "sync_share" ACT_RESERVE_IP = "reserve_ip" ACT_RELEASE_IP = "release_ip" ACT_CONVERT_START = "converting" ACT_CONVERT_COMPLETE = "converted" ACT_CONVERT_FAIL = "convert_fail" ACT_UNCONVERT_START = "unconverting" ACT_UNCONVERT_COMPLETE = "unconverted" ACT_UNCONVERT_FAIL = "unconvert_fail" ACT_SYNC_HOST_START = "sync_host_start" ACT_SYNCING_HOST = "syncing_host" ACT_SYNC_HOST_COMPLETE = "sync_host_end" ACT_SYNC_HOST_FAILED = "sync_host_fail" ACT_SYNC_NETWORK = "sync_network" ACT_SYNC_NETWORK_FAILED = "sync_network_failed" ACT_SYNC_PROJECT_COMPLETE = "sync_project_end" ACT_SYNC_LB_START = "sync_lb_start" ACT_SYNCING_LB = "syncing_lb" ACT_SYNC_LB_COMPLETE = "sync_lb_end" ACT_CACHING_IMAGE = "caching_image" ACT_CACHE_IMAGE_FAIL = "cache_image_fail" ACT_CACHED_IMAGE = "cached_image" ACT_UNCACHING_IMAGE = "uncaching_image" ACT_UNCACHE_IMAGE_FAIL = "uncache_image_fail" ACT_UNCACHED_IMAGE = "uncached_image" ACT_SYNC_CLOUD_DISK = "sync_cloud_disk" ACT_SYNC_CLOUD_SERVER = "sync_cloud_server" ACT_SYNC_CLOUD_SKUS = "sync_cloud_skus" ACT_SYNC_CLOUD_IMAGES = "sync_cloud_images" ACT_SYNC_CLOUD_EIP = "sync_cloud_eip" ACT_SYNC_CLOUD_PROJECT = "sync_cloud_project" ACT_SYNC_CLOUD_ELASTIC_CACHE = "sync_cloud_elastic_cache" ACT_PENDING_DELETE = "pending_delete" ACT_CANCEL_DELETE = "cancel_delete" // # isolated device (host) ACT_HOST_ATTACH_ISOLATED_DEVICE = "host_attach_isolated_deivce" ACT_HOST_ATTACH_ISOLATED_DEVICE_FAIL = "host_attach_isolated_deivce_fail" ACT_HOST_DETACH_ISOLATED_DEVICE = "host_detach_isolated_deivce" ACT_HOST_DETACH_ISOLATED_DEVICE_FAIL = "host_detach_isolated_deivce_fail" // # isolated device (guest) ACT_GUEST_ATTACH_ISOLATED_DEVICE = "guest_attach_isolated_deivce" ACT_GUEST_ATTACH_ISOLATED_DEVICE_FAIL = "guest_attach_isolated_deivce_fail" ACT_GUEST_DETACH_ISOLATED_DEVICE = "guest_detach_isolated_deivce" ACT_GUEST_DETACH_ISOLATED_DEVICE_FAIL = "guest_detach_isolated_deivce_fail" ACT_GUEST_SAVE_GUEST_IMAGE = "guest_save_guest_image" ACT_GUEST_SAVE_GUEST_IMAGE_FAIL = "guest_save_guest_image_fail" ACT_GUEST_SRC_CHECK = "guest_src_check" ACT_GUEST_CPUSET = "guest_cpuset" ACT_GUEST_CPUSET_FAIL = "guest_cpuset_fail" ACT_GUEST_CPUSET_REMOVE = "guest_cpuset_remove" ACT_GUEST_CPUSET_REMOVE_FAIL = "guest_cpuset_remove_fail" ACT_CHANGE_BANDWIDTH = "eip_change_bandwidth" ACT_EIP_CONVERT_FAIL = "eip_convert_fail" ACT_RENEW = "renew" ACT_SCHEDULE = "schedule" ACT_RECYCLE_PREPAID = "recycle_prepaid" ACT_UNDO_RECYCLE_PREPAID = "undo_recycle_prepaid" ACT_HOST_IMPORT_LIBVIRT_SERVERS = "host_import_libvirt_servers" ACT_HOST_IMPORT_LIBVIRT_SERVERS_FAIL = "host_import_libvirt_servers_fail" ACT_GUEST_CREATE_FROM_IMPORT_SUCC = "guest_create_from_import_succ" ACT_GUEST_CREATE_FROM_IMPORT_FAIL = "guest_create_from_import_fail" ACT_GUEST_PANICKED = "guest_panicked" ACT_HOST_MAINTENANCE = "host_maintenance" ACT_HOST_DOWN = "host_down" ACT_UPLOAD_OBJECT = "upload_obj" ACT_DELETE_OBJECT = "delete_obj" ACT_MKDIR = "mkdir" ACT_SET_WEBSITE = "set_website" ACT_DELETE_WEBSITE = "delete_website" ACT_SET_CORS = "set_cors" ACT_DELETE_CORS = "delete_cors" ACT_SET_REFERER = "set_referer" ACT_SET_POLICY = "set_policy" ACT_DELETE_POLICY = "delete_policy" ACT_GRANT_PRIVILEGE = "grant_privilege" ACT_REVOKE_PRIVILEGE = "revoke_privilege" ACT_SET_PRIVILEGES = "set_privileges" ACT_REBOOT = "reboot" ACT_RESTORE = "restore" ACT_CHANGE_CONFIG = "change_config" ACT_RESET_PASSWORD = "reset_password" ACT_SUBIMAGE_UPDATE_FAIL = "guest_image_subimages_update_fail" ACT_FLUSH_INSTANCE = "flush_instance" ACT_FLUSH_INSTANCE_FAIL = "flush_instance_fail" ACT_SYNC_VPCS = "sync_vpcs" ACT_SYNC_RECORD_SETS = "sync_record_sets" ACT_NETWORK_ADD_VPC = "network_add_vpc" ACT_NETWORK_ADD_VPC_FAILED = "network_add_vpc_failed" ACT_NETWORK_REMOVE_VPC = "network_remove_vpc" ACT_NETWORK_REMOVE_VPC_FAILED = "network_remove_vpc_failed" ACT_NETWORK_MODIFY_ROUTE = "network_modify_route" ACT_NETWORK_MODIFY_ROUTE_FAILED = "network_modify_route_failed" ACT_UPDATE_RULE = "update_config" ACT_UPDATE_TAGS = "update_tags" ACT_UPDATE_MONITOR_RESOURCE_JOINT = "update_monitor_resource_joint" ACT_DETACH_MONITOR_RESOURCE_JOINT = "detach_monitor_resource_joint" ACT_MERGE_NETWORK = "merge_network" ACT_MERGE_NETWORK_FAILED = "merge_network_failed" ACT_RECOVERY = "recovery" ACT_RECOVERY_FAIL = "recovery_fail" ACT_PACK = "pack" ACT_PACK_FAIL = "pack_fail" ACT_UNPACK = "unpack" ACT_UNPACK_FAIL = "unpack_fail" ACT_ENCRYPT_START = "encrypt_start" ACT_ENCRYPT_FAIL = "encrypt_fail" ACT_ENCRYPT_DONE = "encrypted" )
const ()
const (
DISTINCT_FIELD_SEP = "::"
)
const (
TAG_EXPORT_KEY_PREFIX = "tag:"
)
Variables ¶
var ( ErrInconsistentDataType = errors.Error("inconsistent data type") ErrQueryOutOfScope = errors.Error("query scope is out of resource scope") )
var ( DefaultProjectFetcher func(ctx context.Context, id string) (*STenant, error) DefaultDomainFetcher func(ctx context.Context, id string) (*STenant, error) DefaultProjectsFetcher func(ctx context.Context, idList []string, isDomain bool) map[string]STenant DefaultDomainQuery func(fields ...string) *sqlchemy.SQuery DefaultProjectQuery func(fields ...string) *sqlchemy.SQuery )
var ( CancelUsages func(ctx context.Context, userCred mcclient.TokenCredential, usages []IUsage) AddUsages func(ctx context.Context, userCred mcclient.TokenCredential, usages []IUsage) CancelPendingUsagesInContext func(ctx context.Context, userCred mcclient.TokenCredential) error InitPendingUsagesInContext func(ctx context.Context) context.Context )
var (
DefaultUUIDGenerator = stringutils.UUID4
)
Functions ¶
func AddScopeResourceCountHandler ¶
func AddScopeResourceCountHandler(prefix string, app *appsrv.Application)
func AppDBInit ¶
func AppDBInit(app *appsrv.Application)
func ApplyFilterByOwner ¶
func ApplyFilterByOwner( q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope, managers ...FilterByOwnerProvider, ) *sqlchemy.SQuery
func ApplyListItemExportKeys ¶
func ApplyListItemExportKeys( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings, managers ...ListItemExportKeysProvider, ) (*sqlchemy.SQuery, error)
func ApplyListItemsGeneralFilters ¶
func ApplyListItemsGeneralFilters(manager IModelManager, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, filters []string, filterAny bool) (*sqlchemy.SQuery, error)
func AutoPurgeSplitable ¶
func AutoPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, startRun bool)
func CalculateModelChecksum ¶
func CalculateModelChecksum(dbObj IRecordChecksumModel) (string, error)
func CallUpdateNotifyHook ¶
func CallUpdateNotifyHook(ctx context.Context, userCred mcclient.TokenCredential, obj IModel)
func CurrentTimestamp ¶
func CustomizeDelete ¶
func CustomizeDelete(model IModel, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func DBStatsHandler ¶
func DeleteModel ¶
func DetachJoint ¶
func DetachJoint(ctx context.Context, userCred mcclient.TokenCredential, item IJointModel) error
func EnabledPerformEnable ¶
func EnabledPerformEnable(model IEnabledBase, ctx context.Context, userCred mcclient.TokenCredential, enabled bool) error
func EnsureAppSyncDB ¶
func EnsureAppSyncDB(app *appsrv.Application, opt *common_options.DBOptions, modelInitDBFunc func() error)
func FetchCheckQueryOwnerScope ¶
func FetchCheckQueryOwnerScope( ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject, manager IScopedResourceManager, action string, doCheckRbac bool, ) (mcclient.IIdentityProvider, rbacutils.TRbacScope, error, rbacutils.SPolicyResult)
func FetchCustomizeColumns ¶
func FetchCustomizeColumns( manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) ([]*jsonutils.JSONDict, error)
func FetchDistinctField ¶
func FetchDistinctField(modelManager IModelManager, field string) ([]string, error)
func FetchDomainInfo ¶
func FetchDomainInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func FetchIdFieldMap ¶
func FetchIdFieldMap2 ¶
func FetchIdNameMap ¶
func FetchIdNameMap2 ¶
func FetchIdNameMap2(manager IStandaloneModelManager, ids []string) (map[string]string, error)
func FetchModelObjects ¶
func FetchModelObjects(modelManager IModelManager, query *sqlchemy.SQuery, targets interface{}) error
func FetchModelObjectsByIds ¶
func FetchModelObjectsByIds(modelManager IModelManager, fieldName string, ids []string, targets interface{}) error
func FetchProjectInfo ¶
func FetchProjectInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func FetchQueryDomain ¶
func FetchQueryDomain(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (string, error)
func FetchQueryObjectsByIds ¶
func FetchStandaloneObjectsByIds ¶
func FetchStandaloneObjectsByIds(modelManager IModelManager, ids []string, targets interface{}) error
func FetchUsageOwnerScope ¶
func FetchUsageOwnerScope(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (mcclient.IIdentityProvider, rbacutils.TRbacScope, error, rbacutils.SPolicyResult)
func FetchUserInfo ¶
func FetchUserInfo(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func GenerateName ¶
func GenerateName(ctx context.Context, manager IModelManager, ownerId mcclient.IIdentityProvider, hint string) (string, error)
func GenerateName2 ¶
func GenerateName2(ctx context.Context, manager IModelManager, ownerId mcclient.IIdentityProvider, hint string, model IModel, baseIndex int) (string, error)
func GetDetailFields ¶
func GetDetailFields(manager IModelManager, userCred mcclient.TokenCredential) ([]string, []string)
func GetItemDetails ¶
func GetItemDetails(manager IModelManager, item IModel, ctx context.Context, userCred mcclient.TokenCredential) (jsonutils.JSONObject, error)
func GetLockClassKey ¶
func GetLockClassKey(manager IModelManager, ownerId mcclient.IIdentityProvider) string
func GetModelIdstr ¶
func GetPropertyTagValuePairs ¶
func GetPropertyTagValuePairs( manager IModelManager, tagObjType string, tagIdField string, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func GetPropertyTagValueTree ¶
func GetPropertyTagValueTree( manager IModelManager, tagObjType string, tagIdField string, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func GetVisiableMetadata ¶
func GetVisiableMetadata(ctx context.Context, model IStandaloneModel, userCred mcclient.TokenCredential) (map[string]string, error)
func GlobalModelManagerTables ¶
func GlobalModelManagerTables() map[string]IModelManager
func IOwnerResourceBaseModelGetChangeOwnerCandidateDomains ¶
func IOwnerResourceBaseModelGetChangeOwnerCandidateDomains(model IOwnerResourceBaseModel) (apis.ChangeOwnerCandidateDomainsOutput, error)
func ISharableChangeOwnerCandidateDomainIds ¶
func ISharableChangeOwnerCandidateDomainIds(model ISharableBaseModel) []string
func ISharableMergeChangeOwnerCandidateDomainIds ¶
func ISharableMergeChangeOwnerCandidateDomainIds(model ISharableBaseModel, candidates ...[]string) []string
func InheritFromTo ¶
func InheritFromTo(ctx context.Context, src IClassMetadataOwner, dest IClassMetadataSetter) error
func InitAllManagers ¶
func InitAllManagers()
func InitManager ¶
func InitManager(initfunc func())
func InitOpsLog ¶
func InitOpsLog()
func InjectModelsChecksum ¶
func InjectModelsChecksum(man IRecordChecksumModelManager) error
func IsAdminAllowClassPerform ¶
func IsAdminAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
func IsAdminAllowCreate ¶
func IsAdminAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsAdminAllowDelete ¶
func IsAdminAllowGet ¶
func IsAdminAllowGetSpec ¶
func IsAdminAllowList ¶
func IsAdminAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsAdminAllowPerform ¶
func IsAdminAllowUpdate ¶
func IsAdminAllowUpdateSpec ¶
func IsAllowClassPerform ¶
func IsAllowClassPerform(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
func IsAllowCreate ¶
func IsAllowCreate(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsAllowDelete ¶
func IsAllowDelete(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel) bool
func IsAllowGet ¶
func IsAllowGet(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel) bool
func IsAllowGetSpec ¶
func IsAllowGetSpec(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel, spec string) bool
func IsAllowList ¶
func IsAllowList(scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsAllowPerform ¶
func IsAllowPerform(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel, action string) bool
func IsAllowUpdate ¶
func IsAllowUpdate(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel) bool
func IsAllowUpdateSpec ¶
func IsAllowUpdateSpec(ctx context.Context, scope rbacutils.TRbacScope, userCred mcclient.TokenCredential, obj IModel, spec string) bool
func IsDomainAllowClassPerform ¶
func IsDomainAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
func IsDomainAllowCreate ¶
func IsDomainAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsDomainAllowDelete ¶
func IsDomainAllowGet ¶
func IsDomainAllowGetSpec ¶
func IsDomainAllowList ¶
func IsDomainAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsDomainAllowPerform ¶
func IsDomainAllowUpdate ¶
func IsDomainAllowUpdateSpec ¶
func IsInSameClass ¶
func IsInSameClass(ctx context.Context, cmo1, cmo2 IClassMetadataOwner) (bool, error)
func IsMetadataKeyPrivateKey ¶
func IsMetadataKeySysTag ¶
func IsMetadataKeyVisiable ¶
func IsObjectRbacAllowed ¶
func IsProjectAllowClassPerform ¶
func IsProjectAllowClassPerform(userCred mcclient.TokenCredential, manager IResource, action string) rbacutils.SPolicyResult
func IsProjectAllowCreate ¶
func IsProjectAllowCreate(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsProjectAllowDelete ¶
func IsProjectAllowGet ¶
func IsProjectAllowGetSpec ¶
func IsProjectAllowList ¶
func IsProjectAllowList(userCred mcclient.TokenCredential, manager IResource) rbacutils.SPolicyResult
func IsProjectAllowPerform ¶
func IsProjectAllowUpdate ¶
func JointMasterID ¶
func JointMasterID(joint IJointModel) string
func JointModelExtra ¶
func JointModelExtra(jointModel IJointModel) (string, string)
func JointSlaveID ¶
func JointSlaveID(joint IJointModel) string
func ListItemFilter ¶
func ListItemFilter(manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func ListItemQueryFilters ¶
func ListItemQueryFilters(manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, action string, ) (*sqlchemy.SQuery, error)
func ListItems ¶
func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (*modulebase.ListResult, error)
func ListQueryByArchitecture ¶
func NeedOrderQuery ¶
func NewNameValidator ¶
func NewNameValidator(manager IModelManager, ownerId mcclient.IIdentityProvider, name string, uniqValues jsonutils.JSONObject) error
func ObjectIdQueryWithPolicyResult ¶
func ObjectIdQueryWithPolicyResult(q *sqlchemy.SQuery, manager IModelManager, result rbacutils.SPolicyResult) *sqlchemy.SQuery
func OrderByExtraFields ¶
func OrderByExtraFields( manager IModelManager, ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (*sqlchemy.SQuery, error)
func OrderByFields ¶
func PerformSetScope ¶
func PerformSetScope( ctx context.Context, obj IScopedResourceModel, userCred mcclient.TokenCredential, data jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func Query2List ¶
func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery, query jsonutils.JSONObject, delayFetch bool) ([]jsonutils.JSONObject, error)
func RegistUserCredCacheUpdater ¶
func RegistUserCredCacheUpdater()
func RegisterModelManager ¶
func RegisterModelManager(modelMan IModelManager)
func RegisterModelManagerWithKeyword ¶
func RegisterModelManagerWithKeyword(modelMan IModelManager, keyword string)
func RequireSameClass ¶
func RequireSameClass(ctx context.Context, cmo1, cmo2 IClassMetadataOwner) error
func SetExternalId ¶
func SetExternalId(model IExternalizedModel, userCred mcclient.TokenCredential, idStr string) error
func SetUpdateNotifyHook ¶
func SetUpdateNotifyHook(f updateNotifyHookFunc)
func SharableGetSharedProjects ¶
func SharableGetSharedProjects(model ISharableBaseModel, targetType string) []string
func SharableManagerFilterByOwner ¶
func SharableManagerFilterByOwner(manager IStandaloneModelManager, q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func SharableManagerValidateCreateData ¶
func SharableManagerValidateCreateData( manager IStandaloneModelManager, ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.SharableResourceBaseCreateInput, ) (apis.SharableResourceBaseCreateInput, error)
func SharableModelCustomizeCreate ¶
func SharableModelCustomizeCreate(model ISharableBaseModel, ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func SharableModelIsSharable ¶
func SharableModelIsSharable(model ISharableBaseModel, reqUsrId mcclient.IIdentityProvider) bool
func SharableModelIsShared ¶
func SharableModelIsShared(model ISharableBaseModel) bool
func SharablePerformPrivate ¶
func SharablePerformPrivate(model ISharableBaseModel, ctx context.Context, userCred mcclient.TokenCredential) error
func SharablePerformPublic ¶
func SharablePerformPublic(model ISharableBaseModel, ctx context.Context, userCred mcclient.TokenCredential, input apis.PerformPublicProjectInput) error
func StartTenantCacheSync ¶
func StatusBasePerformStatus ¶
func StatusBasePerformStatus(model IStatusBaseModel, userCred mcclient.TokenCredential, input apis.PerformStatusInput) error
func StatusBaseSetStatus ¶
func StatusBaseSetStatus(model IStatusBaseModel, userCred mcclient.TokenCredential, status string, reason string) error
func UpdateModelChecksum ¶
func UpdateModelChecksum(dbObj IRecordChecksumModel) error
func UpdateWithLock ¶
func UsagePolicyCheck ¶
func UsagePolicyCheck(userCred mcclient.TokenCredential, manager IScopedResourceManager, scope rbacutils.TRbacScope) rbacutils.SPolicyResult
func ValidateCreateData ¶
func ValidateCreateData(funcName string, manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func ValidateCreateDomainId ¶
func ValidateDeleteCondition ¶
func ValidateUpdateCondition ¶
func ValidateUpdateData ¶
func ValueToError ¶
func ValueToJSONObject ¶
func ValueToJSONObject(out reflect.Value) jsonutils.JSONObject
Types ¶
type AllMetadataOwner ¶
func (AllMetadataOwner) GetAllClassMetadata ¶
func (w AllMetadataOwner) GetAllClassMetadata() (map[string]string, error)
type ClassMetadataOwner ¶
func (ClassMetadataOwner) GetAllClassMetadata ¶
func (w ClassMetadataOwner) GetAllClassMetadata() (map[string]string, error)
type CustomizeListFilterFunc ¶
type CustomizeListFilterFunc func(item jsonutils.JSONObject) (bool, error)
type CustomizeListFilters ¶
type CustomizeListFilters struct {
// contains filtered or unexported fields
}
func NewCustomizeListFilters ¶
func NewCustomizeListFilters() *CustomizeListFilters
func (*CustomizeListFilters) Append ¶
func (f *CustomizeListFilters) Append(funcs ...CustomizeListFilterFunc) *CustomizeListFilters
func (CustomizeListFilters) DoApply ¶
func (f CustomizeListFilters) DoApply(objs []jsonutils.JSONObject) ([]jsonutils.JSONObject, error)
func (CustomizeListFilters) IsEmpty ¶
func (f CustomizeListFilters) IsEmpty() bool
func (CustomizeListFilters) Len ¶
func (f CustomizeListFilters) Len() int
type DBJointModelDispatcher ¶
type DBJointModelDispatcher struct {
DBModelDispatcher
}
func NewJointModelHandler ¶
func NewJointModelHandler(manager IJointModelManager) *DBJointModelDispatcher
func (*DBJointModelDispatcher) Attach ¶
func (dispatcher *DBJointModelDispatcher) Attach(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBJointModelDispatcher) Detach ¶
func (dispatcher *DBJointModelDispatcher) Detach(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBJointModelDispatcher) Get ¶
func (dispatcher *DBJointModelDispatcher) Get(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBJointModelDispatcher) JointModelManager ¶
func (dispatcher *DBJointModelDispatcher) JointModelManager() IJointModelManager
func (*DBJointModelDispatcher) ListMasterDescendent ¶
func (dispatcher *DBJointModelDispatcher) ListMasterDescendent(ctx context.Context, idStr string, query jsonutils.JSONObject) (*modulebase.ListResult, error)
func (*DBJointModelDispatcher) ListSlaveDescendent ¶
func (dispatcher *DBJointModelDispatcher) ListSlaveDescendent(ctx context.Context, idStr string, query jsonutils.JSONObject) (*modulebase.ListResult, error)
func (*DBJointModelDispatcher) MasterKeywordPlural ¶
func (dispatcher *DBJointModelDispatcher) MasterKeywordPlural() string
func (*DBJointModelDispatcher) SlaveKeywordPlural ¶
func (dispatcher *DBJointModelDispatcher) SlaveKeywordPlural() string
func (*DBJointModelDispatcher) Update ¶
func (dispatcher *DBJointModelDispatcher) Update(ctx context.Context, id1 string, id2 string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
type DBModelDispatcher ¶
type DBModelDispatcher struct {
// contains filtered or unexported fields
}
func NewModelHandler ¶
func NewModelHandler(manager IModelManager) *DBModelDispatcher
func (*DBModelDispatcher) BatchCreate ¶
func (dispatcher *DBModelDispatcher) BatchCreate(ctx context.Context, query jsonutils.JSONObject, data jsonutils.JSONObject, count int, ctxIds []dispatcher.SResourceContext) ([]modulebase.SubmitResult, error)
func (*DBModelDispatcher) ContextKeywordPlurals ¶
func (dispatcher *DBModelDispatcher) ContextKeywordPlurals() [][]string
func (*DBModelDispatcher) Create ¶
func (dispatcher *DBModelDispatcher) Create(ctx context.Context, query jsonutils.JSONObject, data jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) CustomizeHandlerInfo ¶
func (dispatcher *DBModelDispatcher) CustomizeHandlerInfo(handler *appsrv.SHandlerInfo)
func (*DBModelDispatcher) Delete ¶
func (dispatcher *DBModelDispatcher) Delete(ctx context.Context, idstr string, query jsonutils.JSONObject, data jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) DeleteSpec ¶
func (dispatcher *DBModelDispatcher) DeleteSpec(ctx context.Context, idstr string, spec string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) FetchCreateHeaderData ¶
func (dispatcher *DBModelDispatcher) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) FetchUpdateHeaderData ¶
func (dispatcher *DBModelDispatcher) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) Filter ¶
func (dispatcher *DBModelDispatcher) Filter(f appsrv.FilterHandler) appsrv.FilterHandler
func (*DBModelDispatcher) Get ¶
func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, query jsonutils.JSONObject, isHead bool) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) GetSpecific ¶
func (dispatcher *DBModelDispatcher) GetSpecific(ctx context.Context, idStr string, spec string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) Keyword ¶
func (dispatcher *DBModelDispatcher) Keyword() string
func (*DBModelDispatcher) KeywordPlural ¶
func (dispatcher *DBModelDispatcher) KeywordPlural() string
func (*DBModelDispatcher) List ¶
func (dispatcher *DBModelDispatcher) List(ctx context.Context, query jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (*modulebase.ListResult, error)
func (*DBModelDispatcher) PerformAction ¶
func (dispatcher *DBModelDispatcher) PerformAction(ctx context.Context, idStr string, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) PerformClassAction ¶
func (dispatcher *DBModelDispatcher) PerformClassAction(ctx context.Context, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) Update ¶
func (dispatcher *DBModelDispatcher) Update(ctx context.Context, idStr string, query jsonutils.JSONObject, data jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (jsonutils.JSONObject, error)
func (*DBModelDispatcher) UpdateSpec ¶
func (dispatcher *DBModelDispatcher) UpdateSpec(ctx context.Context, idStr string, spec string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
type FilterByOwnerProvider ¶
type FilterByOwnerProvider interface {
FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
}
type IAdminSharableVirtualModel ¶
type IAdminSharableVirtualModel interface { ISharableVirtualModel GetInfo() []string GetIAdminSharableVirtualModel() IAdminSharableVirtualModel }
type IAdminSharableVirtualModelManager ¶
type IAdminSharableVirtualModelManager interface { ISharableVirtualModelManager GetIAdminSharableVirtualModelManager() IAdminSharableVirtualModelManager GetRecordsSeparator() string GetRecordsLimit() int ParseInputInfo(data *jsonutils.JSONDict) ([]string, error) }
type IClassMetadataOwner ¶
type IClassMetadataSetter ¶
type IClassMetadataSetter interface { // a setter should first be a owner IClassMetadataOwner SetClassMetadataAll(context.Context, map[string]string, mcclient.TokenCredential) error }
type IDomainLevelModel ¶
type IDomainLevelModel interface { IStandaloneModel IsOwner(userCred mcclient.TokenCredential) bool SyncCloudDomainId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider) GetIDomainLevelModel() IDomainLevelModel IOwnerResourceBaseModel }
type IDomainLevelModelManager ¶
type IDomainLevelModelManager interface { IStandaloneModelManager GetIDomainLevelModelManager() IDomainLevelModelManager GetResourceCount() ([]SScopeResourceCount, error) }
type IEnabledBase ¶
type IExternalizedModel ¶
func FetchByExternalId ¶
func FetchByExternalId(manager IModelManager, idStr string) (IExternalizedModel, error)
func FetchByExternalIdAndManagerId ¶
func FetchByExternalIdAndManagerId(manager IModelManager, idStr string, filter func(q *sqlchemy.SQuery) *sqlchemy.SQuery) (IExternalizedModel, error)
type IExternalizedModelManager ¶
type IExternalizedModelManager interface { IModelManager FetchByExternalId(idStr string) IExternalizedModel }
type IInfrasModel ¶
type IInfrasModel interface { IDomainLevelModel ISharableBase GetIInfrasModel() IInfrasModel }
type IInfrasModelManager ¶
type IInfrasModelManager interface { IDomainLevelModelManager GetIInfrasModelManager() IInfrasModelManager }
type IJointModel ¶
type IJointModel interface { IResourceModel GetJointModelManager() IJointModelManager GetIJointModel() IJointModel Detach(ctx context.Context, userCred mcclient.TokenCredential) error }
func FetchJointByIds ¶
func FetchJointByIds(manager IJointModelManager, masterId, slaveId string, query jsonutils.JSONObject) (IJointModel, error)
type IJointModelManager ¶
type IJointModelManager interface { IResourceModelManager GetIJointModelManager() IJointModelManager GetMasterManager() IStandaloneModelManager GetSlaveManager() IStandaloneModelManager GetMasterFieldName() string GetSlaveFieldName() string // FetchByIds(masterId string, slaveId string, query jsonutils.JSONObject) (IJointModel, error) FilterByParams(q *sqlchemy.SQuery, params jsonutils.JSONObject) *sqlchemy.SQuery }
type IManagedResourceBase ¶
type IManagedResourceBase interface {
IsManaged() bool
}
type IMetadataBaseModel ¶
type IMetadataBaseModel interface {
OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)
}
type IMetadataBaseModelManager ¶
type IMetadataBaseModelManager interface {
GetMetadataHiddenKeys() []string
}
type IModel ¶
type IModel interface { lockman.ILockedObject object.IObject GetName() string GetUpdateVersion() int GetUpdatedAt() time.Time GetDeleted() bool KeywordPlural() string GetModelManager() IModelManager SetModelManager(IModelManager, IModel) GetIModel() IModel GetShortDesc(ctx context.Context) *jsonutils.JSONDict // get hooks // AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) map[string]string // create hooks CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) // allow perform action // AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) bool PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) PreCheckPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) error // update hooks ValidateUpdateCondition(ctx context.Context) error // AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool // ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) PreUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) UpdateInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) // delete hooks // AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool // ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error // CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error PreDelete(ctx context.Context, userCred mcclient.TokenCredential) MarkDelete() error Delete(ctx context.Context, userCred mcclient.TokenCredential) error PostDelete(ctx context.Context, userCred mcclient.TokenCredential) DeleteInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) GetOwnerId() mcclient.IIdentityProvider GetUniqValues() jsonutils.JSONObject IsSharable(reqCred mcclient.IIdentityProvider) bool CustomizedGetDetailsBody(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error) MarkDeletePreventionOn() MarkDeletePreventionOff() GetUsages() []IUsage GetI18N(ctx context.Context) *jsonutils.JSONDict }
func DoCreate ¶
func DoCreate(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject, ownerId mcclient.IIdentityProvider) (IModel, error)
func FetchByIdOrName ¶
func FetchByIdOrName(manager IModelManager, userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func FetchByName ¶
func FetchByName(manager IModelManager, userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func FetchIModelObjects ¶
func FetchIModelObjects(modelManager IModelManager, query *sqlchemy.SQuery) ([]IModel, error)
func NewModelObject ¶
func NewModelObject(modelManager IModelManager) (IModel, error)
type IModelI18nBase ¶
type IModelI18nEntry ¶
type IModelI18nEntry interface { IModelI18nBase GetGlobalId() string GetObjType() string GetObjId() string GetKeyName() string }
type IModelI18nTable ¶
type IModelI18nTable interface {
GetI18nEntries() map[string]IModelI18nEntry
}
type IModelManager ¶
type IModelManager interface { lockman.ILockedClass object.IObject IsStandaloneManager() bool GetContextManagers() [][]IModelManager GetIModelManager() IModelManager GetMutableInstance(userCred mcclient.TokenCredential) IModelManager GetImmutableInstance(userCred mcclient.TokenCredential) IModelManager // Table() *sqlchemy.STable TableSpec() ITableSpec // Keyword() string KeywordPlural() string Alias() string AliasPlural() string SetAlias(alias string, aliasPlural string) HasName() bool ValidateName(name string) error EnableGenerateName() bool // list hooks // AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool ValidateListConditions(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (*jsonutils.JSONDict, error) // ListItemFilter dynamic called by dispatcher // ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*CustomizeListFilters, error) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error) // fetch hook Query(val ...string) *sqlchemy.SQuery RawQuery(val ...string) *sqlchemy.SQuery FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery FilterByNotId(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery FilterByUniqValues(q *sqlchemy.SQuery, uniqValues jsonutils.JSONObject) *sqlchemy.SQuery // RawFetchById(idStr string) (IModel, error) FetchById(idStr string) (IModel, error) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error) // create hooks // AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool // BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) // ValidateCreateData dynamic called by dispatcher // ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) OnCreateComplete(ctx context.Context, items []IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) BatchPreValidate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict, count int) error OnCreateFailed(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error // allow perform action // AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) bool // AllowPerformCheckCreateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) InitializeData() error CustomizeHandlerInfo(info *appsrv.SHandlerInfo) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error) IsCustomizedGetDetailsBody() bool ListSkipLog(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool GetSkipLog(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool // fetch owner Id from query when create resource FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject /* name uniqueness scope, system/domain/project, default is system */ NamespaceScope() rbacutils.TRbacScope ResourceScope() rbacutils.TRbacScope // 如果error为非空,说明没有匹配的field,如果为空,说明匹配上了 QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error) GetPagingConfig() *SPagingConfig GetI18N(ctx context.Context, idstr string, resObj jsonutils.JSONObject) *jsonutils.JSONDict GetSplitTable() *splitable.SSplitTableSpec CreateByInsertOrUpdate() bool }
func GetModelManager ¶
func GetModelManager(keyword string) IModelManager
type IOwnerResourceBaseModel ¶
type IPendingDeletable ¶
type IRecordChecksumModel ¶
type IRecordChecksumModel interface { IModel IRecordChecksumResourceBase }
func IsModelEnableRecordChecksum ¶
func IsModelEnableRecordChecksum(model IModel) (IRecordChecksumModel, bool)
type IRecordChecksumModelManager ¶
type IRecordChecksumModelManager interface { IModelManager EnableRecordChecksum() bool SetEnableRecordChecksum(bool) }
type IResourceCountManager ¶
type IResourceCountManager interface { GetResourceCount() ([]SScopeResourceCount, error) KeywordPlural() string }
type IResourceModel ¶
type IResourceModel interface { IModel GetIResourceModel() IResourceModel }
type IResourceModelManager ¶
type IResourceModelManager interface { IModelManager GetIResourceModelManager() IResourceModelManager }
type IScopedResourceManager ¶
type IScopedResourceManager interface { KeywordPlural() string ResourceScope() rbacutils.TRbacScope FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error) }
type IScopedResourceModel ¶
type ISharableBase ¶
type ISharableBase interface { GetIsPublic() bool GetPublicScope() rbacutils.TRbacScope GetSharableTargetDomainIds() []string }
type ISharableBaseModel ¶
type ISharableBaseModel interface { IStandaloneModel ISharableBase }
type ISharableVirtualModel ¶
type ISharableVirtualModel interface { IVirtualModel ISharableBase GetISharableVirtualModel() ISharableVirtualModel }
type ISharableVirtualModelManager ¶
type ISharableVirtualModelManager interface { IVirtualModelManager GetISharableVirtualModelManager() ISharableVirtualModelManager }
type IStandaloneModel ¶
type IStandaloneModel interface { IResourceModel StandaloneModelManager() IStandaloneModelManager GetIStandaloneModel() IStandaloneModel ClearSchedDescCache() error GetMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) string GetMetadataJson(ctx context.Context, key string, userCred mcclient.TokenCredential) jsonutils.JSONObject SetMetadata(ctx context.Context, key string, value interface{}, userCred mcclient.TokenCredential) error SetAllMetadata(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error SetUserMetadataValues(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error SetUserMetadataAll(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error SetCloudMetadataAll(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error RemoveMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) error RemoveAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) error GetAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) (map[string]string, error) GetAllClassMetadata() (map[string]string, error) IMetadataBaseModel }
func JointMaster ¶
func JointMaster(joint IJointModel) IStandaloneModel
func JointSlave ¶
func JointSlave(joint IJointModel) IStandaloneModel
type IStandaloneModelManager ¶
type IStandaloneModelManager interface { IResourceModelManager GetIStandaloneModelManager() IStandaloneModelManager IMetadataBaseModelManager }
type IStatusBase ¶
type IStatusBaseModel ¶
type IStatusBaseModel interface { IModel IStatusBase }
type IStatusDomainLevelModel ¶
type IStatusDomainLevelModel interface { IDomainLevelModel IStatusBase }
type IStatusInfrasModel ¶
type IStatusInfrasModel interface { IInfrasModel IStatusBase }
type IStatusStandaloneModel ¶
type IStatusStandaloneModel interface { IStandaloneModel IStatusBase }
type ITableSpec ¶
type ITableSpec interface { Name() string Columns() []sqlchemy.IColumnSpec PrimaryColumns() []sqlchemy.IColumnSpec DataType() reflect.Type // CreateSQL() string Instance() *sqlchemy.STable ColumnSpec(name string) sqlchemy.IColumnSpec Insert(ctx context.Context, dt interface{}) error InsertOrUpdate(ctx context.Context, dt interface{}) error Update(ctx context.Context, dt interface{}, doUpdate func() error) (sqlchemy.UpdateDiffs, error) Fetch(dt interface{}) error // FetchAll(dest interface{}) error SyncSQL() []string DropForeignKeySQL() []string AddIndex(unique bool, cols ...string) bool Increment(ctx context.Context, diff interface{}, target interface{}) error Decrement(ctx context.Context, diff interface{}, target interface{}) error GetSplitTable() *splitable.SSplitTableSpec GetTableSpec() *sqlchemy.STableSpec GetDBName() sqlchemy.DBName }
type IUserModelManager ¶
type IUserModelManager interface { IStandaloneModelManager GetIUserModelManager() IUserModelManager GetResourceCount() ([]SScopeResourceCount, error) }
type IVirtualModel ¶
type IVirtualModel interface { IStandaloneModel IPendingDeletable IsOwner(userCred mcclient.TokenCredential) bool SyncCloudProjectId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider) GetIVirtualModel() IVirtualModel IOwnerResourceBaseModel }
type IVirtualModelManager ¶
type IVirtualModelManager interface { IStandaloneModelManager GetIVirtualModelManager() IVirtualModelManager GetResourceCount() ([]SScopeResourceCount, error) }
type ListItemExportKeysProvider ¶
type ListItemExportKeysProvider interface {
ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
}
type SAdminSharableVirtualResourceBase ¶
type SAdminSharableVirtualResourceBase struct { SSharableVirtualResourceBase Records string `charset:"utf8" list:"user" create:"optional" update:"user"` }
func (*SAdminSharableVirtualResourceBase) AddInfo ¶
func (model *SAdminSharableVirtualResourceBase) AddInfo( ctx context.Context, userCred mcclient.TokenCredential, man IAdminSharableVirtualModelManager, obj IAdminSharableVirtualModel, data jsonutils.JSONObject, ) error
func (*SAdminSharableVirtualResourceBase) GetIAdminSharableVirtualModel ¶
func (model *SAdminSharableVirtualResourceBase) GetIAdminSharableVirtualModel() IAdminSharableVirtualModel
func (*SAdminSharableVirtualResourceBase) RemoveInfo ¶
func (model *SAdminSharableVirtualResourceBase) RemoveInfo( ctx context.Context, userCred mcclient.TokenCredential, man IAdminSharableVirtualModelManager, obj IAdminSharableVirtualModel, data jsonutils.JSONObject, allowEmpty bool, ) error
func (*SAdminSharableVirtualResourceBase) SetInfo ¶
func (model *SAdminSharableVirtualResourceBase) SetInfo( ctx context.Context, userCred mcclient.TokenCredential, man IAdminSharableVirtualModelManager, obj IAdminSharableVirtualModel, data *jsonutils.JSONDict, ) error
func (*SAdminSharableVirtualResourceBase) ValidateUpdateData ¶
func (model *SAdminSharableVirtualResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.AdminSharableVirtualResourceBaseUpdateInput, ) (apis.AdminSharableVirtualResourceBaseUpdateInput, error)
type SAdminSharableVirtualResourceBaseManager ¶
type SAdminSharableVirtualResourceBaseManager struct { SSharableVirtualResourceBaseManager RecordsSeparator string RecordsLimit int }
func NewAdminSharableVirtualResourceBaseManager ¶
func NewAdminSharableVirtualResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SAdminSharableVirtualResourceBaseManager
func (*SAdminSharableVirtualResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SAdminSharableVirtualResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.AdminSharableVirtualResourceDetails
func (*SAdminSharableVirtualResourceBaseManager) GetIAdminSharableVirtualModelManager ¶
func (manager *SAdminSharableVirtualResourceBaseManager) GetIAdminSharableVirtualModelManager() IAdminSharableVirtualModelManager
func (*SAdminSharableVirtualResourceBaseManager) ListItemFilter ¶
func (manager *SAdminSharableVirtualResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.AdminSharableVirtualResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SAdminSharableVirtualResourceBaseManager) OrderByExtraFields ¶
func (manager *SAdminSharableVirtualResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.AdminSharableVirtualResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SAdminSharableVirtualResourceBaseManager) QueryDistinctExtraFields ¶
func (*SAdminSharableVirtualResourceBaseManager) ValidateCreateData ¶
func (manager *SAdminSharableVirtualResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.AdminSharableVirtualResourceBaseCreateInput, ) (apis.AdminSharableVirtualResourceBaseCreateInput, error)
func (*SAdminSharableVirtualResourceBaseManager) ValidateRecordsData ¶
func (manager *SAdminSharableVirtualResourceBaseManager) ValidateRecordsData(man IAdminSharableVirtualModelManager, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SAutoDeleteResourceBase ¶
type SAutoDeleteResourceBase struct { // 是否跟随资源自动删除 // example: false AutoDelete bool `nullable:"false" default:"false" get:"user" update:"user" json:"auto_delete"` }
+onecloud:model-api-gen
func (*SAutoDeleteResourceBase) SetAutoDelete ¶
func (self *SAutoDeleteResourceBase) SetAutoDelete(model IModel, userCred mcclient.TokenCredential, autoDelete bool) error
type SAutoDeleteResourceBaseManager ¶
type SAutoDeleteResourceBaseManager struct{}
func (*SAutoDeleteResourceBaseManager) ListItemFilter ¶
func (manager *SAutoDeleteResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.AutoDeleteResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SCachedTenant ¶
type SCertificateResourceBase ¶
type SCertificateResourceBase struct { Certificate string `create:"required" list:"user" update:"user"` PrivateKey string `create:"required" list:"admin" update:"user"` // derived attributes PublicKeyAlgorithm string `create:"optional" list:"user" update:"user"` PublicKeyBitLen int `create:"optional" list:"user" update:"user"` SignatureAlgorithm string `create:"optional" list:"user" update:"user"` Fingerprint string `create:"optional" list:"user" update:"user"` NotBefore time.Time `create:"optional" list:"user" update:"user"` NotAfter time.Time `create:"optional" list:"user" update:"user"` CommonName string `create:"optional" list:"user" update:"user"` SubjectAlternativeNames string `create:"optional" list:"user" update:"user"` }
+onecloud:model-api-gen
type SDistinctField ¶
type SDistinctField struct { SModelBase // 资源类型 // example: network ObjType string `width:"40" charset:"ascii" index:"true" list:"user" get:"user"` // 资源组合ID // example: obj_type::key::value Id string `width:"128" charset:"utf8" primary:"true" list:"user" get:"user"` // Distinct Field // exmaple: 部门 Key string `width:"64" charset:"utf8" primary:"true" list:"user" get:"user"` // Distinct Value // example: 技术部 Value string `charset:"utf8" list:"user" get:"user"` }
type SDistinctFieldManager ¶
type SDistinctFieldManager struct {
SModelBaseManager
}
var DistinctFieldManager *SDistinctFieldManager
func (*SDistinctFieldManager) GetObjectDistinctFields ¶
func (manager *SDistinctFieldManager) GetObjectDistinctFields(objType string) ([]SDistinctField, error)
func (*SDistinctFieldManager) InsertOrUpdate ¶
func (manager *SDistinctFieldManager) InsertOrUpdate(ctx context.Context, modelManager IModelManager, key, value string) error
type SDnsNameValidatorManager ¶
type SDnsNameValidatorManager struct{}
func (*SDnsNameValidatorManager) ValidateName ¶
func (manager *SDnsNameValidatorManager) ValidateName(name string) error
type SDomainLevelResourceBase ¶
type SDomainLevelResourceBase struct { SStandaloneResourceBase SDomainizedResourceBase // 归属Domain信息的来源, local: 本地设置, cloud: 从云上同步过来 // example: local DomainSrc string `width:"10" charset:"ascii" nullable:"true" list:"user" default:"" json:"domain_src"` }
func (*SDomainLevelResourceBase) CustomizeCreate ¶
func (model *SDomainLevelResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SDomainLevelResourceBase) DomainLevelModelManager ¶
func (model *SDomainLevelResourceBase) DomainLevelModelManager() IDomainLevelModelManager
func (*SDomainLevelResourceBase) GetDetailsChangeOwnerCandidateDomains ¶
func (model *SDomainLevelResourceBase) GetDetailsChangeOwnerCandidateDomains(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (apis.ChangeOwnerCandidateDomainsOutput, error)
func (*SDomainLevelResourceBase) GetIDomainLevelModel ¶
func (model *SDomainLevelResourceBase) GetIDomainLevelModel() IDomainLevelModel
func (*SDomainLevelResourceBase) IsOwner ¶
func (model *SDomainLevelResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
func (*SDomainLevelResourceBase) PerformChangeOwner ¶
func (model *SDomainLevelResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformChangeDomainOwnerInput) (jsonutils.JSONObject, error)
func (*SDomainLevelResourceBase) SyncCloudDomainId ¶
func (model *SDomainLevelResourceBase) SyncCloudDomainId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider)
func (*SDomainLevelResourceBase) ValidateUpdateData ¶
func (model *SDomainLevelResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.DomainLevelResourceBaseUpdateInput, ) (apis.DomainLevelResourceBaseUpdateInput, error)
type SDomainLevelResourceBaseManager ¶
type SDomainLevelResourceBaseManager struct { SStandaloneResourceBaseManager SDomainizedResourceBaseManager }
func NewDomainLevelResourceBaseManager ¶
func NewDomainLevelResourceBaseManager( dt interface{}, tableName string, keyword string, keywordPlural string, ) SDomainLevelResourceBaseManager
func (*SDomainLevelResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SDomainLevelResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.DomainLevelResourceDetails
func (*SDomainLevelResourceBaseManager) GetIDomainLevelModelManager ¶
func (manager *SDomainLevelResourceBaseManager) GetIDomainLevelModelManager() IDomainLevelModelManager
func (*SDomainLevelResourceBaseManager) GetPropertyDomainTagValuePairs ¶
func (manager *SDomainLevelResourceBaseManager) GetPropertyDomainTagValuePairs( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SDomainLevelResourceBaseManager) GetPropertyDomainTagValueTree ¶
func (manager *SDomainLevelResourceBaseManager) GetPropertyDomainTagValueTree( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SDomainLevelResourceBaseManager) GetResourceCount ¶
func (domainman *SDomainLevelResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
func (*SDomainLevelResourceBaseManager) ListItemExportKeys ¶
func (manager *SDomainLevelResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SDomainLevelResourceBaseManager) ListItemFilter ¶
func (manager *SDomainLevelResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.DomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SDomainLevelResourceBaseManager) OrderByExtraFields ¶
func (manager *SDomainLevelResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.DomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SDomainLevelResourceBaseManager) QueryDistinctExtraField ¶
func (*SDomainLevelResourceBaseManager) ValidateCreateData ¶
func (manager *SDomainLevelResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.DomainLevelResourceCreateInput, ) (apis.DomainLevelResourceCreateInput, error)
type SDomainizedResourceBase ¶
type SDomainizedResourceBase struct { // 域Id DomainId string `width:"64" charset:"ascii" default:"default" nullable:"false" index:"true" list:"user" json:"domain_id"` }
func (*SDomainizedResourceBase) GetChangeOwnerCandidateDomainIds ¶
func (model *SDomainizedResourceBase) GetChangeOwnerCandidateDomainIds() []string
returns candiate domain Id list that the resource can change owner to nil or empty means any domain
func (*SDomainizedResourceBase) GetChangeOwnerRequiredDomainIds ¶
func (model *SDomainizedResourceBase) GetChangeOwnerRequiredDomainIds() []string
func (*SDomainizedResourceBase) GetOwnerId ¶
func (model *SDomainizedResourceBase) GetOwnerId() mcclient.IIdentityProvider
type SDomainizedResourceBaseManager ¶
type SDomainizedResourceBaseManager struct { }
func (*SDomainizedResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SDomainizedResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.DomainizedResourceInfo
func (*SDomainizedResourceBaseManager) FetchOwnerId ¶
func (manager *SDomainizedResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SDomainizedResourceBaseManager) FilterByOwner ¶
func (manager *SDomainizedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SDomainizedResourceBaseManager) ListItemExportKeys ¶
func (manager *SDomainizedResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SDomainizedResourceBaseManager) ListItemFilter ¶
func (manager *SDomainizedResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.DomainizedResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SDomainizedResourceBaseManager) NamespaceScope ¶
func (manager *SDomainizedResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
func (*SDomainizedResourceBaseManager) OrderByExtraFields ¶
func (manager *SDomainizedResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.DomainizedResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SDomainizedResourceBaseManager) QueryDistinctExtraField ¶
func (*SDomainizedResourceBaseManager) ResourceScope ¶
func (manager *SDomainizedResourceBaseManager) ResourceScope() rbacutils.TRbacScope
type SEnabledResourceBase ¶
type SEnabledResourceBase struct { // 资源是否启用 Enabled tristate.TriState `default:"false" list:"user" create:"optional"` }
func (*SEnabledResourceBase) GetEnabled ¶
func (m *SEnabledResourceBase) GetEnabled() bool
func (*SEnabledResourceBase) SetEnabled ¶
func (m *SEnabledResourceBase) SetEnabled(enabled bool)
type SEnabledResourceBaseManager ¶
type SEnabledResourceBaseManager struct{}
func (*SEnabledResourceBaseManager) ListItemFilter ¶
func (manager *SEnabledResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SEnabledStatusDomainLevelResourceBase ¶
type SEnabledStatusDomainLevelResourceBase struct { SStatusDomainLevelResourceBase SEnabledResourceBase }
func (*SEnabledStatusDomainLevelResourceBase) PerformDisable ¶
func (self *SEnabledStatusDomainLevelResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)
禁用资源
func (*SEnabledStatusDomainLevelResourceBase) PerformEnable ¶
func (self *SEnabledStatusDomainLevelResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)
启用资源
func (*SEnabledStatusDomainLevelResourceBase) ValidateUpdateData ¶
func (model *SEnabledStatusDomainLevelResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.EnabledStatusDomainLevelResourceBaseUpdateInput, ) (apis.EnabledStatusDomainLevelResourceBaseUpdateInput, error)
type SEnabledStatusDomainLevelResourceBaseManager ¶
type SEnabledStatusDomainLevelResourceBaseManager struct { SStatusDomainLevelResourceBaseManager SEnabledResourceBaseManager }
func NewEnabledStatusDomainLevelResourceBaseManager ¶
func NewEnabledStatusDomainLevelResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SEnabledStatusDomainLevelResourceBaseManager
func (*SEnabledStatusDomainLevelResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SEnabledStatusDomainLevelResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.EnabledStatusDomainLevelResourceDetails
func (*SEnabledStatusDomainLevelResourceBaseManager) ListItemFilter ¶
func (manager *SEnabledStatusDomainLevelResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusDomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusDomainLevelResourceBaseManager) OrderByExtraFields ¶
func (manager *SEnabledStatusDomainLevelResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusDomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusDomainLevelResourceBaseManager) QueryDistinctExtraField ¶
func (*SEnabledStatusDomainLevelResourceBaseManager) ValidateCreateData ¶
func (manager *SEnabledStatusDomainLevelResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.EnabledStatusDomainLevelResourceCreateInput, ) (apis.EnabledStatusDomainLevelResourceCreateInput, error)
type SEnabledStatusInfrasResourceBase ¶
type SEnabledStatusInfrasResourceBase struct { SStatusInfrasResourceBase SEnabledResourceBase }
func (*SEnabledStatusInfrasResourceBase) PerformDisable ¶
func (self *SEnabledStatusInfrasResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)
禁用资源
func (*SEnabledStatusInfrasResourceBase) PerformEnable ¶
func (self *SEnabledStatusInfrasResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)
启用资源
func (*SEnabledStatusInfrasResourceBase) ValidateUpdateData ¶
func (model *SEnabledStatusInfrasResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.EnabledStatusInfrasResourceBaseUpdateInput, ) (apis.EnabledStatusInfrasResourceBaseUpdateInput, error)
type SEnabledStatusInfrasResourceBaseManager ¶
type SEnabledStatusInfrasResourceBaseManager struct { SStatusInfrasResourceBaseManager SEnabledResourceBaseManager }
func NewEnabledStatusInfrasResourceBaseManager ¶
func NewEnabledStatusInfrasResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SEnabledStatusInfrasResourceBaseManager
func (*SEnabledStatusInfrasResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SEnabledStatusInfrasResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.EnabledStatusInfrasResourceBaseDetails
func (*SEnabledStatusInfrasResourceBaseManager) GetPropertyStatistics ¶
func (manager *SEnabledStatusInfrasResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error)
func (*SEnabledStatusInfrasResourceBaseManager) ListItemFilter ¶
func (manager *SEnabledStatusInfrasResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusInfrasResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusInfrasResourceBaseManager) OrderByExtraFields ¶
func (manager *SEnabledStatusInfrasResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusInfrasResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusInfrasResourceBaseManager) QueryDistinctExtraField ¶
func (*SEnabledStatusInfrasResourceBaseManager) ValidateCreateData ¶
func (manager *SEnabledStatusInfrasResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.EnabledStatusInfrasResourceBaseCreateInput, ) (apis.EnabledStatusInfrasResourceBaseCreateInput, error)
type SEnabledStatusStandaloneResourceBase ¶
type SEnabledStatusStandaloneResourceBase struct { SStatusStandaloneResourceBase SEnabledResourceBase }
func (*SEnabledStatusStandaloneResourceBase) PerformDisable ¶
func (self *SEnabledStatusStandaloneResourceBase) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)
禁用资源
func (*SEnabledStatusStandaloneResourceBase) PerformEnable ¶
func (self *SEnabledStatusStandaloneResourceBase) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)
启用资源
func (*SEnabledStatusStandaloneResourceBase) ValidateUpdateData ¶
func (model *SEnabledStatusStandaloneResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.EnabledStatusStandaloneResourceBaseUpdateInput, ) (apis.EnabledStatusStandaloneResourceBaseUpdateInput, error)
type SEnabledStatusStandaloneResourceBaseManager ¶
type SEnabledStatusStandaloneResourceBaseManager struct { SStatusStandaloneResourceBaseManager SEnabledResourceBaseManager }
func NewEnabledStatusStandaloneResourceBaseManager ¶
func NewEnabledStatusStandaloneResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SEnabledStatusStandaloneResourceBaseManager
func (*SEnabledStatusStandaloneResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SEnabledStatusStandaloneResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.EnabledStatusStandaloneResourceDetails
func (*SEnabledStatusStandaloneResourceBaseManager) ListItemFilter ¶
func (manager *SEnabledStatusStandaloneResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusStandaloneResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusStandaloneResourceBaseManager) OrderByExtraFields ¶
func (manager *SEnabledStatusStandaloneResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.EnabledStatusStandaloneResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SEnabledStatusStandaloneResourceBaseManager) QueryDistinctExtraField ¶
func (*SEnabledStatusStandaloneResourceBaseManager) ValidateCreateData ¶
func (manager *SEnabledStatusStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.EnabledStatusStandaloneResourceCreateInput) (apis.EnabledStatusStandaloneResourceCreateInput, error)
type SEncryptedResource ¶
type SEncryptedResource struct { // 加密密钥ID EncryptKeyId string `width:"32" charset:"ascii" nullable:"true" get:"user" list:"user" create:"optional"` }
+onecloud:model-api-gen
func (*SEncryptedResource) CustomizeCreate ¶
func (res *SEncryptedResource) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data jsonutils.JSONObject, nameHint string) error
func (*SEncryptedResource) GetEncryptInfo ¶
func (res *SEncryptedResource) GetEncryptInfo( ctx context.Context, userCred mcclient.TokenCredential, ) (apis.SEncryptInfo, error)
func (*SEncryptedResource) IsEncrypted ¶
func (res *SEncryptedResource) IsEncrypted() bool
func (*SEncryptedResource) ValidateEncryption ¶
func (res *SEncryptedResource) ValidateEncryption(ctx context.Context, userCred mcclient.TokenCredential) error
type SEncryptedResourceManager ¶
type SEncryptedResourceManager struct { }
func (*SEncryptedResourceManager) FetchCustomizeColumns ¶
func (manager *SEncryptedResourceManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.EncryptedResourceDetails
func (*SEncryptedResourceManager) ValidateCreateData ¶
func (manager *SEncryptedResourceManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.EncryptedResourceCreateInput, ) (apis.EncryptedResourceCreateInput, error)
type SExternalizedResourceBase ¶
type SExternalizedResourceBase struct { // 云上Id, 对应云上资源自身Id ExternalId string `width:"256" charset:"utf8" index:"true" list:"user" create:"domain_optional" update:"admin" json:"external_id"` // 资源导入时间 ImportedAt time.Time `nullable:"true" created_at:"true" index:"true" get:"user" list:"user" json:"imported_at"` // 资源来源, cloud: 从云上同步下来的资源, local: 从本地创建的资源或资源在本地更改过项目 Source string `width:"12" charset:"ascii" get:"user" list:"user" create:"optional" json:"source"` }
+onecloud:model-api-gen
func (*SExternalizedResourceBase) BeforeInsert ¶
func (model *SExternalizedResourceBase) BeforeInsert()
func (SExternalizedResourceBase) GetExternalId ¶
func (model SExternalizedResourceBase) GetExternalId() string
func (*SExternalizedResourceBase) SetExternalId ¶
func (model *SExternalizedResourceBase) SetExternalId(idStr string)
type SExternalizedResourceBaseManager ¶
type SExternalizedResourceBaseManager struct{}
func (*SExternalizedResourceBaseManager) ListItemFilter ¶
func (manager *SExternalizedResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ExternalizedResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SGetResourceTagValuePairsInput ¶
type SGetResourceTagValuePairsInput struct { apis.MetadataBaseFilterInput // Return keys only KeyOnly *bool `json:"key_only"` // Order by key of tags OrderByTagKey string `json:"order_by_tag_key"` }
type SHostNameValidatorManager ¶
type SHostNameValidatorManager struct{}
func (*SHostNameValidatorManager) ValidateName ¶
func (manager *SHostNameValidatorManager) ValidateName(name string) error
type SI18n ¶
type SI18n struct { SModelBase // 资源类型 // example: network ObjType string `width:"40" charset:"ascii" list:"user" get:"user" primary:"true"` // 资源ID // example: 87321a70-1ecb-422a-8b0c-c9aa632a46a7 ObjId string `width:"88" charset:"ascii" list:"user" get:"user" primary:"true"` // 资源KEY // exmaple: name KeyName string `width:"64" charset:"utf8" list:"user" get:"user" primary:"true"` // 资源原始值 // example: 技术部 KeyValue string `charset:"utf8" list:"user" get:"user"` // KeyValue 对应中文翻译 Cn string `charset:"utf8" list:"user" get:"user"` // KeyValue 对应英文翻译 En string `charset:"utf8" list:"user" get:"user"` }
func (SI18n) GetExternalId ¶
type SI18nManager ¶
type SI18nManager struct {
SModelBaseManager
}
var I18nManager *SI18nManager
func (*SI18nManager) GetModelI18N ¶
func (*SI18nManager) GetModelKeyI18N ¶
func (*SI18nManager) SyncI18ns ¶
func (manager *SI18nManager) SyncI18ns(ctx context.Context, userCred mcclient.TokenCredential, model IModel, table IModelI18nTable) error
type SInfrasResourceBase ¶
type SInfrasResourceBase struct { SDomainLevelResourceBase SSharableBaseResource `"is_public=>create":"domain_optional" "public_scope=>create":"domain_optional"` }
func (*SInfrasResourceBase) AllowPerformPrivate ¶
func (model *SInfrasResourceBase) AllowPerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) bool
func (*SInfrasResourceBase) AllowPerformPublic ¶
func (model *SInfrasResourceBase) AllowPerformPublic(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPublicDomainInput) bool
func (*SInfrasResourceBase) CustomizeCreate ¶
func (model *SInfrasResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SInfrasResourceBase) Delete ¶
func (model *SInfrasResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SInfrasResourceBase) GetIInfrasModel ¶
func (model *SInfrasResourceBase) GetIInfrasModel() IInfrasModel
func (*SInfrasResourceBase) GetRequiredSharedDomainIds ¶
func (model *SInfrasResourceBase) GetRequiredSharedDomainIds() []string
func (*SInfrasResourceBase) GetSharableTargetDomainIds ¶
func (model *SInfrasResourceBase) GetSharableTargetDomainIds() []string
func (*SInfrasResourceBase) GetSharedDomains ¶
func (model *SInfrasResourceBase) GetSharedDomains() []string
func (*SInfrasResourceBase) GetSharedInfo ¶
func (model *SInfrasResourceBase) GetSharedInfo() apis.SShareInfo
func (*SInfrasResourceBase) IsSharable ¶
func (model *SInfrasResourceBase) IsSharable(reqUsrId mcclient.IIdentityProvider) bool
func (*SInfrasResourceBase) IsShared ¶
func (model *SInfrasResourceBase) IsShared() bool
func (*SInfrasResourceBase) PerformChangeOwner ¶
func (model *SInfrasResourceBase) PerformChangeOwner( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformChangeDomainOwnerInput, ) (jsonutils.JSONObject, error)
func (*SInfrasResourceBase) PerformPrivate ¶
func (model *SInfrasResourceBase) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error)
func (*SInfrasResourceBase) PerformPublic ¶
func (model *SInfrasResourceBase) PerformPublic(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPublicDomainInput) (jsonutils.JSONObject, error)
func (*SInfrasResourceBase) SaveSharedInfo ¶
func (model *SInfrasResourceBase) SaveSharedInfo(src apis.TOwnerSource, ctx context.Context, userCred mcclient.TokenCredential, si apis.SShareInfo)
func (*SInfrasResourceBase) SyncShareState ¶
func (model *SInfrasResourceBase) SyncShareState(ctx context.Context, userCred mcclient.TokenCredential, shareInfo apis.SAccountShareInfo)
func (*SInfrasResourceBase) ValidateUpdateData ¶
func (model *SInfrasResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.InfrasResourceBaseUpdateInput, ) (apis.InfrasResourceBaseUpdateInput, error)
type SInfrasResourceBaseManager ¶
type SInfrasResourceBaseManager struct { SDomainLevelResourceBaseManager SSharableBaseResourceManager }
func NewInfrasResourceBaseManager ¶
func NewInfrasResourceBaseManager( dt interface{}, tableName string, keyword string, keywordPlural string, ) SInfrasResourceBaseManager
func (*SInfrasResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SInfrasResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.InfrasResourceBaseDetails
func (*SInfrasResourceBaseManager) FilterByOwner ¶
func (manager *SInfrasResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SInfrasResourceBaseManager) GetIInfrasModelManager ¶
func (manager *SInfrasResourceBaseManager) GetIInfrasModelManager() IInfrasModelManager
func (*SInfrasResourceBaseManager) ListItemFilter ¶
func (manager *SInfrasResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.InfrasResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SInfrasResourceBaseManager) OrderByExtraFields ¶
func (manager *SInfrasResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.InfrasResourceBaseListInput) (*sqlchemy.SQuery, error)
func (*SInfrasResourceBaseManager) QueryDistinctExtraField ¶
func (*SInfrasResourceBaseManager) ValidateCreateData ¶
func (manager *SInfrasResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.InfrasResourceBaseCreateInput, ) (apis.InfrasResourceBaseCreateInput, error)
type SJointResourceBase ¶
type SJointResourceBase struct { SResourceBase RowId int64 `primary:"true" auto_increment:"true" list:"user"` }
func (*SJointResourceBase) GetIJointModel ¶
func (joint *SJointResourceBase) GetIJointModel() IJointModel
func (*SJointResourceBase) GetJointModelManager ¶
func (joint *SJointResourceBase) GetJointModelManager() IJointModelManager
func (*SJointResourceBase) ValidateUpdateData ¶
func (model *SJointResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.JointResourceBaseUpdateInput, ) (apis.JointResourceBaseUpdateInput, error)
type SJointResourceBaseManager ¶
type SJointResourceBaseManager struct { SResourceBaseManager // contains filtered or unexported fields }
func NewJointResourceBaseManager ¶
func NewJointResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string, master IStandaloneModelManager, slave IStandaloneModelManager) SJointResourceBaseManager
func (*SJointResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SJointResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.JointResourceBaseDetails
func (*SJointResourceBaseManager) FilterByParams ¶
func (manager *SJointResourceBaseManager) FilterByParams(q *sqlchemy.SQuery, params jsonutils.JSONObject) *sqlchemy.SQuery
func (*SJointResourceBaseManager) GetIJointModelManager ¶
func (manager *SJointResourceBaseManager) GetIJointModelManager() IJointModelManager
func (*SJointResourceBaseManager) GetMasterManager ¶
func (manager *SJointResourceBaseManager) GetMasterManager() IStandaloneModelManager
func (*SJointResourceBaseManager) GetSlaveManager ¶
func (manager *SJointResourceBaseManager) GetSlaveManager() IStandaloneModelManager
func (*SJointResourceBaseManager) ListItemFilter ¶
func (manager *SJointResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.JointResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SJointResourceBaseManager) NamespaceScope ¶
func (manager *SJointResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
func (*SJointResourceBaseManager) OrderByExtraFields ¶
func (manager *SJointResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.JointResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SJointResourceBaseManager) ResourceScope ¶
func (manager *SJointResourceBaseManager) ResourceScope() rbacutils.TRbacScope
func (*SJointResourceBaseManager) ValidateCreateData ¶
func (manager *SJointResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.JoinResourceBaseCreateInput) (apis.JoinResourceBaseCreateInput, error)
type SKeystoneCacheObject ¶
type SKeystoneCacheObject struct { SStandaloneResourceBase DomainId string `width:"128" charset:"ascii" nullable:"true"` Domain string `width:"128" charset:"utf8" nullable:"true"` LastCheck time.Time `nullable:"true"` }
func NewKeystoneCacheObject ¶
func NewKeystoneCacheObject(id string, name string, domainId string, domain string) SKeystoneCacheObject
func (*SKeystoneCacheObject) IsExpired ¶
func (t *SKeystoneCacheObject) IsExpired() bool
type SKeystoneCacheObjectManager ¶
type SKeystoneCacheObjectManager struct {
SStandaloneResourceBaseManager
}
func NewKeystoneCacheObjectManager ¶
func NewKeystoneCacheObjectManager(dt interface{}, tableName string, keyword string, keywordPlural string) SKeystoneCacheObjectManager
type SMetadata ¶
type SMetadata struct { SModelBase // 资源类型 // example: network ObjType string `width:"40" charset:"ascii" index:"true" list:"user" get:"user"` // 资源ID // example: 87321a70-1ecb-422a-8b0c-c9aa632a46a7 ObjId string `width:"88" charset:"ascii" index:"true" list:"user" get:"user"` // 资源组合ID // example: network::87321a70-1ecb-422a-8b0c-c9aa632a46a7 Id string `width:"128" charset:"ascii" primary:"true" list:"user" get:"user"` // 标签KEY // exmaple: 部门 Key string `width:"64" charset:"utf8" primary:"true" list:"user" get:"user"` // 标签值 // example: 技术部 Value string `charset:"utf8" list:"user" get:"user"` // 更新时间 UpdatedAt time.Time `nullable:"false" updated_at:"true"` // 是否被删除 Deleted bool `nullable:"false" default:"false" index:"true"` }
func (*SMetadata) GetModelManager ¶
func (m *SMetadata) GetModelManager() IModelManager
func (*SMetadata) MarkDelete ¶
type SMetadataManager ¶
type SMetadataManager struct {
SModelBaseManager
}
var Metadata *SMetadataManager
func (*SMetadataManager) GetJsonValue ¶
func (manager *SMetadataManager) GetJsonValue(ctx context.Context, model IModel, key string, userCred mcclient.TokenCredential) jsonutils.JSONObject
func (*SMetadataManager) GetPropertyTagValuePairs ¶
func (manager *SMetadataManager) GetPropertyTagValuePairs( ctx context.Context, userCred mcclient.TokenCredential, input apis.MetaGetPropertyTagValuePairsInput, ) (*modulebase.ListResult, error)
func (*SMetadataManager) GetStringValue ¶
func (manager *SMetadataManager) GetStringValue(ctx context.Context, model IModel, key string, userCred mcclient.TokenCredential) string
func (*SMetadataManager) GetSysadminKey ¶
func (manager *SMetadataManager) GetSysadminKey(key string) string
func (*SMetadataManager) InitializeData ¶
func (manager *SMetadataManager) InitializeData() error
func (*SMetadataManager) IsSystemAdminKey ¶
func (manager *SMetadataManager) IsSystemAdminKey(key string) bool
func (*SMetadataManager) ListItemFilter ¶
func (manager *SMetadataManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.MetadataListInput) (*sqlchemy.SQuery, error)
元数据(标签)列表
func (*SMetadataManager) Query ¶
func (manager *SMetadataManager) Query(fields ...string) *sqlchemy.SQuery
func (*SMetadataManager) RawQuery ¶
func (manager *SMetadataManager) RawQuery(fields ...string) *sqlchemy.SQuery
func (*SMetadataManager) RemoveAll ¶
func (manager *SMetadataManager) RemoveAll(ctx context.Context, model IModel, userCred mcclient.TokenCredential) error
func (*SMetadataManager) SetAll ¶
func (manager *SMetadataManager) SetAll(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential, delRange string) error
func (*SMetadataManager) SetValue ¶
func (manager *SMetadataManager) SetValue(ctx context.Context, obj IModel, key string, value interface{}, userCred mcclient.TokenCredential) error
func (*SMetadataManager) SetValuesWithLog ¶
func (manager *SMetadataManager) SetValuesWithLog(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential) error
type SMetadataResourceBaseModelManager ¶
type SMetadataResourceBaseModelManager struct{}
func (*SMetadataResourceBaseModelManager) FetchCustomizeColumns ¶
func (meta *SMetadataResourceBaseModelManager) FetchCustomizeColumns( manager IModelManager, userCred mcclient.TokenCredential, objs []interface{}, fields stringutils2.SSortedStrings, ) []apis.MetadataResourceInfo
func (*SMetadataResourceBaseModelManager) GetExportExtraKeys ¶
func (meta *SMetadataResourceBaseModelManager) GetExportExtraKeys(keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict
func (*SMetadataResourceBaseModelManager) ListItemExportKeys ¶
func (meta *SMetadataResourceBaseModelManager) ListItemExportKeys(manager IModelManager, q *sqlchemy.SQuery, keys stringutils2.SSortedStrings) *sqlchemy.SQuery
func (*SMetadataResourceBaseModelManager) ListItemFilter ¶
func (meta *SMetadataResourceBaseModelManager) ListItemFilter( manager IModelManager, q *sqlchemy.SQuery, input apis.MetadataResourceListInput, ) *sqlchemy.SQuery
func (*SMetadataResourceBaseModelManager) OrderByExtraFields ¶
func (meta *SMetadataResourceBaseModelManager) OrderByExtraFields( manager IModelManager, q *sqlchemy.SQuery, input apis.MetadataResourceListInput, ) *sqlchemy.SQuery
func (*SMetadataResourceBaseModelManager) QueryDistinctExtraField ¶
func (meta *SMetadataResourceBaseModelManager) QueryDistinctExtraField(manager IModelManager, q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
type SModelBase ¶
func (*SModelBase) AllowDeleteItem ¶
func (model *SModelBase) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
delete hooks
func (*SModelBase) AllowGetDetails ¶
func (model *SModelBase) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
get hooks
func (*SModelBase) AllowPerformAction ¶
func (model *SModelBase) AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SModelBase) AllowUpdateItem ¶
func (model *SModelBase) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
update hooks
func (*SModelBase) CustomizeCreate ¶
func (model *SModelBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
create hooks
func (*SModelBase) CustomizeDelete ¶
func (model *SModelBase) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SModelBase) CustomizedGetDetailsBody ¶
func (model *SModelBase) CustomizedGetDetailsBody(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBase) Delete ¶
func (model *SModelBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SModelBase) DeleteInContext ¶
func (model *SModelBase) DeleteInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBase) GetDeleted ¶
func (model *SModelBase) GetDeleted() bool
func (*SModelBase) GetExtraDetailsHeaders ¶
func (model *SModelBase) GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) map[string]string
func (*SModelBase) GetI18N ¶
func (model *SModelBase) GetI18N(ctx context.Context) *jsonutils.JSONDict
func (*SModelBase) GetIModel ¶
func (model *SModelBase) GetIModel() IModel
func (SModelBase) GetId ¶
func (model SModelBase) GetId() string
func (*SModelBase) GetModelManager ¶
func (model *SModelBase) GetModelManager() IModelManager
func (SModelBase) GetName ¶
func (model SModelBase) GetName() string
func (*SModelBase) GetOwnerId ¶
func (model *SModelBase) GetOwnerId() mcclient.IIdentityProvider
func (*SModelBase) GetShortDesc ¶
func (model *SModelBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SModelBase) GetShortDescV2 ¶
func (model *SModelBase) GetShortDescV2(ctx context.Context) *apis.ModelBaseShortDescDetail
func (*SModelBase) GetUniqValues ¶
func (model *SModelBase) GetUniqValues() jsonutils.JSONObject
func (*SModelBase) GetUpdateVersion ¶
func (model *SModelBase) GetUpdateVersion() int
func (*SModelBase) GetUpdatedAt ¶
func (model *SModelBase) GetUpdatedAt() time.Time
func (*SModelBase) GetUsages ¶
func (model *SModelBase) GetUsages() []IUsage
func (*SModelBase) IsSharable ¶
func (model *SModelBase) IsSharable(ownerId mcclient.IIdentityProvider) bool
func (SModelBase) Keyword ¶
func (model SModelBase) Keyword() string
func (SModelBase) KeywordPlural ¶
func (model SModelBase) KeywordPlural() string
func (*SModelBase) MarkDelete ¶
func (model *SModelBase) MarkDelete() error
func (*SModelBase) MarkDeletePreventionOff ¶
func (model *SModelBase) MarkDeletePreventionOff()
func (*SModelBase) MarkDeletePreventionOn ¶
func (model *SModelBase) MarkDeletePreventionOn()
func (*SModelBase) PerformAction ¶
func (model *SModelBase) PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBase) PostCreate ¶
func (model *SModelBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SModelBase) PostDelete ¶
func (model *SModelBase) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SModelBase) PostUpdate ¶
func (model *SModelBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SModelBase) PreCheckPerformAction ¶
func (model *SModelBase) PreCheckPerformAction( ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject, ) error
func (*SModelBase) PreDelete ¶
func (model *SModelBase) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SModelBase) PreUpdate ¶
func (model *SModelBase) PreUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SModelBase) RecoverUsages ¶
func (model *SModelBase) RecoverUsages(ctx context.Context, userCred mcclient.TokenCredential)
func (*SModelBase) SetModelManager ¶
func (model *SModelBase) SetModelManager(man IModelManager, virtual IModel)
func (*SModelBase) UpdateInContext ¶
func (model *SModelBase) UpdateInContext(ctx context.Context, userCred mcclient.TokenCredential, ctxObjs []IModel, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBase) ValidateDeleteCondition ¶
func (model *SModelBase) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
func (*SModelBase) ValidateUpdateCondition ¶
func (model *SModelBase) ValidateUpdateCondition(ctx context.Context) error
func (*SModelBase) ValidateUpdateData ¶
func (model *SModelBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.ModelBaseUpdateInput) (apis.ModelBaseUpdateInput, error)
type SModelBaseManager ¶
func NewModelBaseManager ¶
func NewModelBaseManager(model interface{}, tableName string, keyword string, keywordPlural string) SModelBaseManager
func (*SModelBaseManager) Alias ¶
func (manager *SModelBaseManager) Alias() string
func (*SModelBaseManager) AliasPlural ¶
func (manager *SModelBaseManager) AliasPlural() string
func (*SModelBaseManager) AllowCreateItem ¶
func (manager *SModelBaseManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
create hooks
func (*SModelBaseManager) AllowGetPropertyDistinctField ¶
func (manager *SModelBaseManager) AllowGetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SModelBaseManager) AllowListItems ¶
func (manager *SModelBaseManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
list hooks
func (*SModelBaseManager) AllowPerformAction ¶
func (manager *SModelBaseManager) AllowPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SModelBaseManager) AllowPerformPurgeSplitable ¶
func (manager *SModelBaseManager) AllowPerformPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SModelBaseManager) BatchCreateValidateCreateData ¶
func (manager *SModelBaseManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SModelBaseManager) BatchPreValidate ¶
func (manager *SModelBaseManager) BatchPreValidate( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict, count int, ) error
func (*SModelBaseManager) CreateByInsertOrUpdate ¶
func (manager *SModelBaseManager) CreateByInsertOrUpdate() bool
func (*SModelBaseManager) CustomizeFilterList ¶
func (manager *SModelBaseManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*CustomizeListFilters, error)
func (*SModelBaseManager) CustomizeHandlerInfo ¶
func (manager *SModelBaseManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)
func (*SModelBaseManager) EnableGenerateName ¶
func (manager *SModelBaseManager) EnableGenerateName() bool
func (*SModelBaseManager) ExtraSearchConditions ¶
func (manager *SModelBaseManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
func (*SModelBaseManager) FetchById ¶
func (manager *SModelBaseManager) FetchById(idStr string) (IModel, error)
func (*SModelBaseManager) FetchByIdOrName ¶
func (manager *SModelBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SModelBaseManager) FetchByName ¶
func (manager *SModelBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SModelBaseManager) FetchCreateHeaderData ¶
func (manager *SModelBaseManager) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*SModelBaseManager) FetchCustomizeColumns ¶
func (manager *SModelBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.ModelBaseDetails
func (*SModelBaseManager) FetchOwnerId ¶
func (manager *SModelBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SModelBaseManager) FetchUniqValues ¶
func (manager *SModelBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
func (*SModelBaseManager) FetchUpdateHeaderData ¶
func (manager *SModelBaseManager) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*SModelBaseManager) FilterByHiddenSystemAttributes ¶
func (manager *SModelBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SModelBaseManager) FilterById ¶
func (*SModelBaseManager) FilterByName ¶
func (*SModelBaseManager) FilterByNotId ¶
func (*SModelBaseManager) FilterByOwner ¶
func (manager *SModelBaseManager) FilterByOwner(q *sqlchemy.SQuery, ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SModelBaseManager) FilterBySystemAttributes ¶
func (manager *SModelBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SModelBaseManager) FilterByUniqValues ¶
func (manager *SModelBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, uniqValues jsonutils.JSONObject) *sqlchemy.SQuery
func (*SModelBaseManager) GetContextManagers ¶
func (manager *SModelBaseManager) GetContextManagers() [][]IModelManager
func (*SModelBaseManager) GetExportExtraKeys ¶
func (manager *SModelBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict
func (*SModelBaseManager) GetI18N ¶
func (manager *SModelBaseManager) GetI18N(ctx context.Context, idstr string, resObj jsonutils.JSONObject) *jsonutils.JSONDict
func (*SModelBaseManager) GetIModelManager ¶
func (manager *SModelBaseManager) GetIModelManager() IModelManager
func (*SModelBaseManager) GetImmutableInstance ¶
func (manager *SModelBaseManager) GetImmutableInstance(userCred mcclient.TokenCredential) IModelManager
func (*SModelBaseManager) GetMutableInstance ¶
func (manager *SModelBaseManager) GetMutableInstance(userCred mcclient.TokenCredential) IModelManager
func (*SModelBaseManager) GetPagingConfig ¶
func (manager *SModelBaseManager) GetPagingConfig() *SPagingConfig
func (*SModelBaseManager) GetPropertyDistinctField ¶
func (manager *SModelBaseManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBaseManager) GetPropertySplitable ¶
func (manager *SModelBaseManager) GetPropertySplitable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBaseManager) GetPropertySplitableExport ¶
func (manager *SModelBaseManager) GetPropertySplitableExport(ctx context.Context, userCred mcclient.TokenCredential, input apis.SplitTableExportInput) (jsonutils.JSONObject, error)
func (*SModelBaseManager) GetSkipLog ¶
func (manager *SModelBaseManager) GetSkipLog(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SModelBaseManager) GetSplitTable ¶
func (manager *SModelBaseManager) GetSplitTable() *splitable.SSplitTableSpec
func (*SModelBaseManager) HasName ¶
func (manager *SModelBaseManager) HasName() bool
func (*SModelBaseManager) InitializeData ¶
func (manager *SModelBaseManager) InitializeData() error
func (*SModelBaseManager) IsCustomizedGetDetailsBody ¶
func (manager *SModelBaseManager) IsCustomizedGetDetailsBody() bool
func (*SModelBaseManager) IsStandaloneManager ¶
func (manager *SModelBaseManager) IsStandaloneManager() bool
func (*SModelBaseManager) Keyword ¶
func (manager *SModelBaseManager) Keyword() string
func (*SModelBaseManager) KeywordPlural ¶
func (manager *SModelBaseManager) KeywordPlural() string
func (*SModelBaseManager) ListItemExportKeys ¶
func (manager *SModelBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SModelBaseManager) ListItemFilter ¶
func (manager *SModelBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.ModelBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SModelBaseManager) ListSkipLog ¶
func (manager *SModelBaseManager) ListSkipLog(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SModelBaseManager) NamespaceScope ¶
func (manager *SModelBaseManager) NamespaceScope() rbacutils.TRbacScope
func (*SModelBaseManager) OnCreateComplete ¶
func (manager *SModelBaseManager) OnCreateComplete(ctx context.Context, items []IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SModelBaseManager) OnCreateFailed ¶
func (manager *SModelBaseManager) OnCreateFailed(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SModelBaseManager) OrderByExtraFields ¶
func (manager *SModelBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.ModelBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SModelBaseManager) PerformAction ¶
func (manager *SModelBaseManager) PerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SModelBaseManager) PerformPurgeSplitable ¶
func (manager *SModelBaseManager) PerformPurgeSplitable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PurgeSplitTableInput) (jsonutils.JSONObject, error)
func (*SModelBaseManager) Query ¶
func (manager *SModelBaseManager) Query(fieldNames ...string) *sqlchemy.SQuery
func (*SModelBaseManager) QueryDistinctExtraField ¶
func (*SModelBaseManager) RawQuery ¶
func (manager *SModelBaseManager) RawQuery(fieldNames ...string) *sqlchemy.SQuery
func (*SModelBaseManager) ResourceScope ¶
func (manager *SModelBaseManager) ResourceScope() rbacutils.TRbacScope
func (*SModelBaseManager) SetAlias ¶
func (manager *SModelBaseManager) SetAlias(alias string, aliasPlural string)
func (*SModelBaseManager) SetHandlerProcessTimeout ¶
func (manager *SModelBaseManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration
func (*SModelBaseManager) TableSpec ¶
func (manager *SModelBaseManager) TableSpec() ITableSpec
func (*SModelBaseManager) ValidateCreateData ¶
func (manager *SModelBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.ModelBaseCreateInput) (apis.ModelBaseCreateInput, error)
func (*SModelBaseManager) ValidateListConditions ¶
func (manager *SModelBaseManager) ValidateListConditions(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SModelBaseManager) ValidateName ¶
func (manager *SModelBaseManager) ValidateName(name string) error
type SModelI18nEntry ¶
type SModelI18nEntry struct {
// contains filtered or unexported fields
}
func NewSModelI18nEntry ¶
func NewSModelI18nEntry(keyName string, model IModel, i18nEntry IModelI18nBase) *SModelI18nEntry
func (*SModelI18nEntry) GetGlobalId ¶
func (in *SModelI18nEntry) GetGlobalId() string
func (*SModelI18nEntry) GetKeyName ¶
func (in *SModelI18nEntry) GetKeyName() string
func (*SModelI18nEntry) GetKeyValue ¶
func (in *SModelI18nEntry) GetKeyValue() string
func (*SModelI18nEntry) GetObjId ¶
func (in *SModelI18nEntry) GetObjId() string
func (*SModelI18nEntry) GetObjType ¶
func (in *SModelI18nEntry) GetObjType() string
type SModelI18nTable ¶
type SModelI18nTable struct {
// contains filtered or unexported fields
}
func NewSModelI18nTable ¶
func NewSModelI18nTable(i18nEntires []IModelI18nEntry) *SModelI18nTable
func (*SModelI18nTable) GetI18nEntries ¶
func (t *SModelI18nTable) GetI18nEntries() map[string]IModelI18nEntry
type SMultiArchResourceBase ¶
type SMultiArchResourceBase struct { // 操作系统 CPU 架构 // example: x86 arm OsArch string `width:"16" charset:"ascii" nullable:"true" list:"user" get:"user" create:"optional" update:"domain"` }
+onecloud:model-api-gen
type SMultiArchResourceBaseManager ¶
type SMultiArchResourceBaseManager struct{}
func (*SMultiArchResourceBaseManager) ListItemFilter ¶
func (manager *SMultiArchResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.MultiArchResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SOpsLog ¶
type SOpsLog struct { SModelBase Id int64 `primary:"true" auto_increment:"true" list:"user" clickhouse_partition_by:"toInt64(divide(id,100000000000))"` ObjType string `width:"40" charset:"ascii" nullable:"false" list:"user" create:"required"` ObjId string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` ObjName string `width:"128" charset:"utf8" nullable:"false" list:"user" create:"required"` Action string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"required"` Notes string `charset:"utf8" list:"user" create:"optional"` ProjectId string `name:"tenant_id" width:"128" charset:"ascii" list:"user" create:"optional" index:"true"` Project string `name:"tenant" width:"128" charset:"utf8" list:"user" create:"optional"` ProjectDomainId string `name:"project_domain_id" default:"default" width:"128" charset:"ascii" list:"user" create:"optional"` ProjectDomain string `name:"project_domain" default:"Default" width:"128" charset:"utf8" list:"user" create:"optional"` UserId string `width:"128" charset:"ascii" list:"user" create:"required"` User string `width:"128" charset:"utf8" list:"user" create:"required"` DomainId string `width:"128" charset:"ascii" list:"user" create:"optional"` Domain string `width:"128" charset:"utf8" list:"user" create:"optional"` Roles string `width:"64" charset:"utf8" list:"user" create:"optional"` OpsTime time.Time `nullable:"false" list:"user" clickhouse_ttl:"6m"` OwnerDomainId string `name:"owner_domain_id" default:"default" width:"128" charset:"ascii" list:"user" create:"optional"` OwnerProjectId string `name:"owner_tenant_id" width:"128" charset:"ascii" list:"user" create:"optional"` }
func (*SOpsLog) BeforeInsert ¶
func (opslog *SOpsLog) BeforeInsert()
func (*SOpsLog) CustomizeCreate ¶
func (log *SOpsLog) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SOpsLog) GetModelManager ¶
func (opslog *SOpsLog) GetModelManager() IModelManager
func (*SOpsLog) GetOwnerId ¶
func (self *SOpsLog) GetOwnerId() mcclient.IIdentityProvider
func (*SOpsLog) GetRecordTime ¶
func (*SOpsLog) GetUpdateVersion ¶
func (*SOpsLog) GetUpdatedAt ¶
func (*SOpsLog) IsSharable ¶
func (self *SOpsLog) IsSharable(reqCred mcclient.IIdentityProvider) bool
func (*SOpsLog) ValidateDeleteCondition ¶
type SOpsLogManager ¶
type SOpsLogManager struct {
SModelBaseManager
}
var OpsLog *SOpsLogManager
func (*SOpsLogManager) CreateByInsertOrUpdate ¶
func (manager *SOpsLogManager) CreateByInsertOrUpdate() bool
func (*SOpsLogManager) CustomizeHandlerInfo ¶
func (manager *SOpsLogManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)
func (*SOpsLogManager) FetchCustomizeColumns ¶
func (manager *SOpsLogManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.OpsLogDetails
func (*SOpsLogManager) FetchOwnerId ¶
func (manager *SOpsLogManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SOpsLogManager) FilterById ¶
func (*SOpsLogManager) FilterByName ¶
func (*SOpsLogManager) FilterByNotId ¶
func (*SOpsLogManager) FilterByOwner ¶
func (self *SOpsLogManager) FilterByOwner(q *sqlchemy.SQuery, ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SOpsLogManager) GetPagingConfig ¶
func (manager *SOpsLogManager) GetPagingConfig() *SPagingConfig
func (*SOpsLogManager) ListItemFilter ¶
func (manager *SOpsLogManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.OpsLogListInput, ) (*sqlchemy.SQuery, error)
操作日志列表
func (*SOpsLogManager) LogAttachEvent ¶
func (manager *SOpsLogManager) LogAttachEvent(ctx context.Context, m1, m2 IModel, userCred mcclient.TokenCredential, notes jsonutils.JSONObject)
func (*SOpsLogManager) LogDetachEvent ¶
func (manager *SOpsLogManager) LogDetachEvent(ctx context.Context, m1, m2 IModel, userCred mcclient.TokenCredential, notes jsonutils.JSONObject)
func (*SOpsLogManager) LogEvent ¶
func (manager *SOpsLogManager) LogEvent(model IModel, action string, notes interface{}, userCred mcclient.TokenCredential)
func (*SOpsLogManager) LogSyncUpdate ¶
func (manager *SOpsLogManager) LogSyncUpdate(m IModel, uds sqlchemy.UpdateDiffs, userCred mcclient.TokenCredential)
func (*SOpsLogManager) ResourceScope ¶
func (manager *SOpsLogManager) ResourceScope() rbacutils.TRbacScope
func (*SOpsLogManager) SyncOwner ¶
func (manager *SOpsLogManager) SyncOwner(m IModel, former *STenant, userCred mcclient.TokenCredential)
func (*SOpsLogManager) ValidateCreateData ¶
func (manager *SOpsLogManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data apis.OpsLogCreateInput, ) (apis.OpsLogCreateInput, error)
type SOwnerId ¶
type SOwnerId struct { Domain string `json:"project_domain"` DomainId string `json:"project_domain_id"` Project string `json:"tenant"` ProjectId string `json:"tenant_id"` User string `json:"user"` UserId string `json:"user_id"` UserDomain string `json:"domain"` UserDomainId string `json:"domain_id"` }
func (*SOwnerId) GetDomainId ¶
func (*SOwnerId) GetDomainName ¶
func (*SOwnerId) GetProjectDomain ¶
func (*SOwnerId) GetProjectDomainId ¶
func (*SOwnerId) GetProjectId ¶
func (*SOwnerId) GetProjectName ¶
func (*SOwnerId) GetTenantId ¶
func (*SOwnerId) GetTenantName ¶
func (*SOwnerId) GetUserName ¶
type SPagingConfig ¶
type SPagingConfig struct { Order sqlchemy.QueryOrderType MarkerFields []string DefaultLimit int }
type SProjectizedResourceBase ¶
type SProjectizedResourceBase struct { SDomainizedResourceBase // 项目Id ProjectId string `name:"tenant_id" width:"128" charset:"ascii" nullable:"false" index:"true" list:"user" json:"tenant_id"` }
func (*SProjectizedResourceBase) GetOwnerId ¶
func (model *SProjectizedResourceBase) GetOwnerId() mcclient.IIdentityProvider
type SProjectizedResourceBaseManager ¶
type SProjectizedResourceBaseManager struct {
SDomainizedResourceBaseManager
}
func (*SProjectizedResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SProjectizedResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.ProjectizedResourceInfo
func (*SProjectizedResourceBaseManager) FetchOwnerId ¶
func (manager *SProjectizedResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SProjectizedResourceBaseManager) FilterByOwner ¶
func (manager *SProjectizedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SProjectizedResourceBaseManager) ListItemExportKeys ¶
func (manager *SProjectizedResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SProjectizedResourceBaseManager) ListItemFilter ¶
func (manager *SProjectizedResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ProjectizedResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SProjectizedResourceBaseManager) OrderByExtraFields ¶
func (manager *SProjectizedResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ProjectizedResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SProjectizedResourceBaseManager) QueryDistinctExtraField ¶
func (*SProjectizedResourceBaseManager) ResourceScope ¶
func (manager *SProjectizedResourceBaseManager) ResourceScope() rbacutils.TRbacScope
type SRecordChecksumResourceBase ¶
type SRecordChecksumResourceBase struct {
RecordChecksum string `width:"256" charset:"ascii" nullable:"true" list:"user" get:"user" json:"record_checksum"`
}
+onecloud:model-api-gen
func (*SRecordChecksumResourceBase) GetRecordChecksum ¶
func (model *SRecordChecksumResourceBase) GetRecordChecksum() string
func (*SRecordChecksumResourceBase) SetRecordChecksum ¶
func (model *SRecordChecksumResourceBase) SetRecordChecksum(checksum string)
type SRecordChecksumResourceBaseManager ¶
type SRecordChecksumResourceBaseManager struct {
// contains filtered or unexported fields
}
func NewRecordChecksumResourceBaseManager ¶
func NewRecordChecksumResourceBaseManager() *SRecordChecksumResourceBaseManager
func (*SRecordChecksumResourceBaseManager) EnableRecordChecksum ¶
func (man *SRecordChecksumResourceBaseManager) EnableRecordChecksum() bool
func (*SRecordChecksumResourceBaseManager) SetEnableRecordChecksum ¶
func (man *SRecordChecksumResourceBaseManager) SetEnableRecordChecksum(enable bool)
type SResourceBase ¶
type SResourceBase struct { SModelBase // 资源创建时间 CreatedAt time.Time `nullable:"false" created_at:"true" index:"true" get:"user" list:"user" json:"created_at"` // 资源更新时间 UpdatedAt time.Time `nullable:"false" updated_at:"true" list:"user" json:"updated_at"` // 资源被更新次数 UpdateVersion int `default:"0" nullable:"false" auto_version:"true" list:"user" json:"update_version"` // 资源删除时间 DeletedAt time.Time `json:"deleted_at" list:"user"` // 资源是否被删除 Deleted bool `nullable:"false" default:"false" json:"deleted" list:"user"` }
func (*SResourceBase) Delete ¶
func (model *SResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SResourceBase) GetDeleted ¶
func (model *SResourceBase) GetDeleted() bool
func (*SResourceBase) GetIResourceModel ¶
func (model *SResourceBase) GetIResourceModel() IResourceModel
func (*SResourceBase) GetShortDesc ¶
func (self *SResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SResourceBase) GetUpdateVersion ¶
func (model *SResourceBase) GetUpdateVersion() int
func (*SResourceBase) GetUpdatedAt ¶
func (model *SResourceBase) GetUpdatedAt() time.Time
func (*SResourceBase) MarkDelete ¶
func (model *SResourceBase) MarkDelete() error
func (*SResourceBase) MarkUnDelete ¶
func (model *SResourceBase) MarkUnDelete() error
func (*SResourceBase) ResourceModelManager ¶
func (model *SResourceBase) ResourceModelManager() IResourceModelManager
func (*SResourceBase) ValidateUpdateData ¶
func (model *SResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.ResourceBaseUpdateInput) (apis.ResourceBaseUpdateInput, error)
type SResourceBaseManager ¶
type SResourceBaseManager struct {
SModelBaseManager
}
func NewResourceBaseManager ¶
func NewResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SResourceBaseManager
func (*SResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.ResourceBaseDetails
func (*SResourceBaseManager) GetIResourceModelManager ¶
func (manager *SResourceBaseManager) GetIResourceModelManager() IResourceModelManager
func (*SResourceBaseManager) ListItemFilter ¶
func (manager *SResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SResourceBaseManager) OrderByExtraFields ¶
func (manager *SResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SResourceBaseManager) Query ¶
func (manager *SResourceBaseManager) Query(fields ...string) *sqlchemy.SQuery
func (*SResourceBaseManager) QueryDistinctExtraField ¶
func (*SResourceBaseManager) RawQuery ¶
func (manager *SResourceBaseManager) RawQuery(fields ...string) *sqlchemy.SQuery
func (*SResourceBaseManager) ValidateCreateData ¶
func (manager *SResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.ResourceBaseCreateInput) (apis.ResourceBaseCreateInput, error)
type SRole ¶
type SRole struct {
SKeystoneCacheObject
}
func (*SRole) GetModelManager ¶
func (role *SRole) GetModelManager() IModelManager
type SRoleCacheManager ¶
type SRoleCacheManager struct { SKeystoneCacheObjectManager // contains filtered or unexported fields }
var RoleCacheManager *SRoleCacheManager
func (*SRoleCacheManager) FetchRoleById ¶
func (*SRoleCacheManager) FetchRoleByIdOrName ¶
func (*SRoleCacheManager) FetchRoleByName ¶
func (*SRoleCacheManager) FetchRoleFromKeystone ¶
func (*SRoleCacheManager) OnAdd ¶
func (manager *SRoleCacheManager) OnAdd(obj *jsonutils.JSONDict)
func (*SRoleCacheManager) OnDelete ¶
func (manager *SRoleCacheManager) OnDelete(obj *jsonutils.JSONDict)
func (*SRoleCacheManager) OnUpdate ¶
func (manager *SRoleCacheManager) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
func (*SRoleCacheManager) StartWatchRoleInKeystone ¶
func (manager *SRoleCacheManager) StartWatchRoleInKeystone() error
type SScopeResourceCount ¶
type SScopeResourceCount struct { TenantId string `json:"tenant_id"` DomainId string `json:"domain_id"` OwnerId string `json:"owner_id"` ResCount int `json:"res_count"` }
func CalculateResourceCount ¶
func CalculateResourceCount(query *sqlchemy.SQuery, field string) ([]SScopeResourceCount, error)
type SScopedResourceBase ¶
type SScopedResourceBase struct {
SProjectizedResourceBase `"domain_id->default":""`
}
+onecloud:model-api-gen
func (*SScopedResourceBase) CustomizeCreate ¶
func (s *SScopedResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SScopedResourceBase) GetDomainId ¶
func (s *SScopedResourceBase) GetDomainId() string
func (*SScopedResourceBase) GetMoreColumns ¶
func (s *SScopedResourceBase) GetMoreColumns(extra *jsonutils.JSONDict) *jsonutils.JSONDict
func (*SScopedResourceBase) GetProjectId ¶
func (s *SScopedResourceBase) GetProjectId() string
func (*SScopedResourceBase) GetResourceScope ¶
func (s *SScopedResourceBase) GetResourceScope() rbacutils.TRbacScope
func (*SScopedResourceBase) IsOwner ¶
func (m *SScopedResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
func (*SScopedResourceBase) SetResourceScope ¶
func (s *SScopedResourceBase) SetResourceScope(domainId, projectId string) error
type SScopedResourceBaseManager ¶
type SScopedResourceBaseManager struct {
SProjectizedResourceBaseManager
}
func (*SScopedResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SScopedResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.ScopedResourceBaseInfo
func (*SScopedResourceBaseManager) FetchUniqValues ¶
func (m *SScopedResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
func (*SScopedResourceBaseManager) FilterByOwner ¶
func (m *SScopedResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SScopedResourceBaseManager) FilterByScope ¶
func (m *SScopedResourceBaseManager) FilterByScope(q *sqlchemy.SQuery, scope rbacutils.TRbacScope, scopeResId string) *sqlchemy.SQuery
func (*SScopedResourceBaseManager) FilterByUniqValues ¶
func (m *SScopedResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery
func (*SScopedResourceBaseManager) ListItemFilter ¶
func (m *SScopedResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ScopedResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SScopedResourceBaseManager) OrderByExtraFields ¶
func (m *SScopedResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.ScopedResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SScopedResourceBaseManager) ValidateCreateData ¶
func (m *SScopedResourceBaseManager) ValidateCreateData(man IScopedResourceManager, ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.ScopedResourceCreateInput) (apis.ScopedResourceCreateInput, error)
type SSharableBaseResource ¶
type SSharableBaseResource struct { // 是否共享 IsPublic bool `default:"false" nullable:"false" list:"user" create:"domain_optional"` // 默认共享范围 PublicScope string `width:"16" charset:"ascii" nullable:"false" default:"system" list:"user" create:"domain_optional"` // 共享设置的来源, local: 本地设置, cloud: 从云上同步过来 // example: local PublicSrc string `width:"10" charset:"ascii" nullable:"true" list:"user" json:"public_src"` }
func (SSharableBaseResource) GetIsPublic ¶
func (m SSharableBaseResource) GetIsPublic() bool
func (SSharableBaseResource) GetPublicScope ¶
func (m SSharableBaseResource) GetPublicScope() rbacutils.TRbacScope
func (*SSharableBaseResource) SetShare ¶
func (m *SSharableBaseResource) SetShare(scope rbacutils.TRbacScope)
type SSharableBaseResourceManager ¶
type SSharableBaseResourceManager struct{}
func (*SSharableBaseResourceManager) FetchCustomizeColumns ¶
func (manager *SSharableBaseResourceManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.SharableResourceBaseInfo
func (*SSharableBaseResourceManager) ListItemFilter ¶
func (manager *SSharableBaseResourceManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.SharableResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SSharableVirtualResourceBase ¶
type SSharableVirtualResourceBase struct { SVirtualResourceBase SSharableBaseResource `"is_public=>create":"optional" "public_scope=>create":"optional"` }
func (*SSharableVirtualResourceBase) AllowPerformPrivate ¶
func (model *SSharableVirtualResourceBase) AllowPerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) bool
func (*SSharableVirtualResourceBase) AllowPerformPublic ¶
func (model *SSharableVirtualResourceBase) AllowPerformPublic(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPublicProjectInput) bool
func (*SSharableVirtualResourceBase) CustomizeCreate ¶
func (model *SSharableVirtualResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SSharableVirtualResourceBase) Delete ¶
func (model *SSharableVirtualResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SSharableVirtualResourceBase) GetISharableVirtualModel ¶
func (model *SSharableVirtualResourceBase) GetISharableVirtualModel() ISharableVirtualModel
func (*SSharableVirtualResourceBase) GetRequiredSharedDomainIds ¶
func (model *SSharableVirtualResourceBase) GetRequiredSharedDomainIds() []string
func (*SSharableVirtualResourceBase) GetSharableTargetDomainIds ¶
func (model *SSharableVirtualResourceBase) GetSharableTargetDomainIds() []string
func (*SSharableVirtualResourceBase) GetSharedDomains ¶
func (model *SSharableVirtualResourceBase) GetSharedDomains() []string
func (*SSharableVirtualResourceBase) GetSharedInfo ¶
func (model *SSharableVirtualResourceBase) GetSharedInfo() apis.SShareInfo
func (*SSharableVirtualResourceBase) GetSharedProjects ¶
func (model *SSharableVirtualResourceBase) GetSharedProjects() []string
func (*SSharableVirtualResourceBase) IsSharable ¶
func (model *SSharableVirtualResourceBase) IsSharable(reqUsrId mcclient.IIdentityProvider) bool
func (*SSharableVirtualResourceBase) IsShared ¶
func (model *SSharableVirtualResourceBase) IsShared() bool
func (*SSharableVirtualResourceBase) PerformChangeOwner ¶
func (model *SSharableVirtualResourceBase) PerformChangeOwner( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformChangeProjectOwnerInput, ) (jsonutils.JSONObject, error)
func (*SSharableVirtualResourceBase) PerformPrivate ¶
func (model *SSharableVirtualResourceBase) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error)
func (*SSharableVirtualResourceBase) PerformPublic ¶
func (model *SSharableVirtualResourceBase) PerformPublic(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPublicProjectInput) (jsonutils.JSONObject, error)
func (*SSharableVirtualResourceBase) SaveSharedInfo ¶
func (model *SSharableVirtualResourceBase) SaveSharedInfo(src apis.TOwnerSource, ctx context.Context, userCred mcclient.TokenCredential, si apis.SShareInfo)
func (*SSharableVirtualResourceBase) SyncShareState ¶
func (model *SSharableVirtualResourceBase) SyncShareState(ctx context.Context, userCred mcclient.TokenCredential, shareInfo apis.SAccountShareInfo)
func (*SSharableVirtualResourceBase) ValidateUpdateData ¶
func (model *SSharableVirtualResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.SharableVirtualResourceBaseUpdateInput, ) (apis.SharableVirtualResourceBaseUpdateInput, error)
type SSharableVirtualResourceBaseManager ¶
type SSharableVirtualResourceBaseManager struct { SVirtualResourceBaseManager SSharableBaseResourceManager }
func NewSharableVirtualResourceBaseManager ¶
func NewSharableVirtualResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SSharableVirtualResourceBaseManager
func (*SSharableVirtualResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SSharableVirtualResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.SharableVirtualResourceDetails
func (*SSharableVirtualResourceBaseManager) FilterByOwner ¶
func (manager *SSharableVirtualResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SSharableVirtualResourceBaseManager) GetISharableVirtualModelManager ¶
func (manager *SSharableVirtualResourceBaseManager) GetISharableVirtualModelManager() ISharableVirtualModelManager
func (*SSharableVirtualResourceBaseManager) ListItemFilter ¶
func (manager *SSharableVirtualResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.SharableVirtualResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SSharableVirtualResourceBaseManager) OrderByExtraFields ¶
func (manager *SSharableVirtualResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.SharableVirtualResourceListInput) (*sqlchemy.SQuery, error)
func (*SSharableVirtualResourceBaseManager) QueryDistinctExtraField ¶
func (*SSharableVirtualResourceBaseManager) ValidateCreateData ¶
func (manager *SSharableVirtualResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.SharableVirtualResourceCreateInput) (apis.SharableVirtualResourceCreateInput, error)
type SSharedResource ¶
type SSharedResource struct { string `width:"128" charset:"ascii" nullable:"false" index:"true" json:"target_project_id"` }TargetProjectId
sharing resource between projects/domains
type SSharedResourceManager ¶
type SSharedResourceManager struct {
}
func (*SSharedResourceManager) CleanModelShares ¶
func (manager *SSharedResourceManager) CleanModelShares(ctx context.Context, userCred mcclient.TokenCredential, model ISharableBaseModel) error
type SStandaloneAnonResourceBase ¶
type SStandaloneAnonResourceBase struct { SResourceBase // 资源UUID Id string `width:"128" charset:"ascii" primary:"true" list:"user" json:"id"` // 资源描述信息 Description string `width:"256" charset:"utf8" get:"user" list:"user" update:"user" create:"optional" json:"description"` // 是否是模拟资源, 部分从公有云上同步的资源并不真实存在, 例如宿主机 // list 接口默认不会返回这类资源,除非显示指定 is_emulate=true 过滤参数 IsEmulated bool `nullable:"false" default:"false" list:"admin" create:"admin_optional" json:"is_emulated"` }
func (*SStandaloneAnonResourceBase) AppendDescription ¶
func (model *SStandaloneAnonResourceBase) AppendDescription(userCred mcclient.TokenCredential, msg string) error
func (*SStandaloneAnonResourceBase) BeforeInsert ¶
func (model *SStandaloneAnonResourceBase) BeforeInsert()
func (*SStandaloneAnonResourceBase) ClearSchedDescCache ¶
func (model *SStandaloneAnonResourceBase) ClearSchedDescCache() error
func (*SStandaloneAnonResourceBase) GetAllClassMetadata ¶
func (model *SStandaloneAnonResourceBase) GetAllClassMetadata() (map[string]string, error)
func (*SStandaloneAnonResourceBase) GetAllCloudMetadata ¶
func (model *SStandaloneAnonResourceBase) GetAllCloudMetadata() (map[string]string, error)
func (*SStandaloneAnonResourceBase) GetAllMetadata ¶
func (model *SStandaloneAnonResourceBase) GetAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) (map[string]string, error)
func (*SStandaloneAnonResourceBase) GetAllUserMetadata ¶
func (model *SStandaloneAnonResourceBase) GetAllUserMetadata() (map[string]string, error)
func (*SStandaloneAnonResourceBase) GetDetailsClassMetadata ¶
func (model *SStandaloneAnonResourceBase) GetDetailsClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, input apis.GetClassMetadataInput) (apis.GetClassMetadataOutput, error)
func (*SStandaloneAnonResourceBase) GetDetailsMetadata ¶
func (model *SStandaloneAnonResourceBase) GetDetailsMetadata(ctx context.Context, userCred mcclient.TokenCredential, input apis.GetMetadataInput) (apis.GetMetadataOutput, error)
获取资源标签(元数据)
func (*SStandaloneAnonResourceBase) GetIStandaloneModel ¶
func (model *SStandaloneAnonResourceBase) GetIStandaloneModel() IStandaloneModel
func (SStandaloneAnonResourceBase) GetId ¶
func (model SStandaloneAnonResourceBase) GetId() string
func (*SStandaloneAnonResourceBase) GetMetadata ¶
func (model *SStandaloneAnonResourceBase) GetMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) string
* userCred: optional
func (*SStandaloneAnonResourceBase) GetMetadataJson ¶
func (model *SStandaloneAnonResourceBase) GetMetadataJson(ctx context.Context, key string, userCred mcclient.TokenCredential) jsonutils.JSONObject
func (*SStandaloneAnonResourceBase) GetShortDesc ¶
func (model *SStandaloneAnonResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SStandaloneAnonResourceBase) GetShortDescV2 ¶
func (model *SStandaloneAnonResourceBase) GetShortDescV2(ctx context.Context) *apis.StandaloneAnonResourceShortDescDetail
func (*SStandaloneAnonResourceBase) InheritTo ¶
func (model *SStandaloneAnonResourceBase) InheritTo(ctx context.Context, dest IClassMetadataSetter) error
func (*SStandaloneAnonResourceBase) IsInSameClass ¶
func (model *SStandaloneAnonResourceBase) IsInSameClass(ctx context.Context, pModel *SStandaloneAnonResourceBase) (bool, error)
func (*SStandaloneAnonResourceBase) IsShared ¶
func (model *SStandaloneAnonResourceBase) IsShared() bool
func (*SStandaloneAnonResourceBase) OnMetadataUpdated ¶
func (model *SStandaloneAnonResourceBase) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)
func (*SStandaloneAnonResourceBase) PerformClassMetadata ¶
func (model *SStandaloneAnonResourceBase) PerformClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformClassMetadataInput) (jsonutils.JSONObject, error)
更新资源的 class 标签
func (*SStandaloneAnonResourceBase) PerformMetadata ¶
func (model *SStandaloneAnonResourceBase) PerformMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformMetadataInput) (jsonutils.JSONObject, error)
+onecloud:swagger-gen-ignore
func (*SStandaloneAnonResourceBase) PerformSetClassMetadata ¶
func (model *SStandaloneAnonResourceBase) PerformSetClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformSetClassMetadataInput) (jsonutils.JSONObject, error)
全量替换资源的所有 class 标签
func (*SStandaloneAnonResourceBase) PerformSetUserMetadata ¶
func (model *SStandaloneAnonResourceBase) PerformSetUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformSetUserMetadataInput) (jsonutils.JSONObject, error)
全量替换资源的所有用户标签
func (*SStandaloneAnonResourceBase) PerformUserMetadata ¶
func (model *SStandaloneAnonResourceBase) PerformUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformUserMetadataInput) (jsonutils.JSONObject, error)
更新资源的用户标签 +onecloud:swagger-gen-ignore
func (*SStandaloneAnonResourceBase) PostCreate ¶
func (model *SStandaloneAnonResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SStandaloneAnonResourceBase) PostUpdate ¶
func (model *SStandaloneAnonResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SStandaloneAnonResourceBase) RemoveAllMetadata ¶
func (model *SStandaloneAnonResourceBase) RemoveAllMetadata(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) RemoveMetadata ¶
func (model *SStandaloneAnonResourceBase) RemoveMetadata(ctx context.Context, key string, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetAllMetadata ¶
func (model *SStandaloneAnonResourceBase) SetAllMetadata(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetClassMetadataAll ¶
func (model *SStandaloneAnonResourceBase) SetClassMetadataAll(ctx context.Context, dictstore map[string]string, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetClassMetadataValues ¶
func (model *SStandaloneAnonResourceBase) SetClassMetadataValues(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetCloudMetadataAll ¶
func (model *SStandaloneAnonResourceBase) SetCloudMetadataAll(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetMetadata ¶
func (model *SStandaloneAnonResourceBase) SetMetadata(ctx context.Context, key string, value interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetSysCloudMetadataAll ¶
func (model *SStandaloneAnonResourceBase) SetSysCloudMetadataAll(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetUserMetadataAll ¶
func (model *SStandaloneAnonResourceBase) SetUserMetadataAll(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) SetUserMetadataValues ¶
func (model *SStandaloneAnonResourceBase) SetUserMetadataValues(ctx context.Context, dictstore map[string]interface{}, userCred mcclient.TokenCredential) error
func (*SStandaloneAnonResourceBase) StandaloneModelManager ¶
func (model *SStandaloneAnonResourceBase) StandaloneModelManager() IStandaloneModelManager
func (*SStandaloneAnonResourceBase) ValidateUpdateData ¶
func (model *SStandaloneAnonResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StandaloneAnonResourceBaseUpdateInput) (apis.StandaloneAnonResourceBaseUpdateInput, error)
type SStandaloneAnonResourceBaseManager ¶
type SStandaloneAnonResourceBaseManager struct { SResourceBaseManager SMetadataResourceBaseModelManager }
func NewStandaloneAnonResourceBaseManager ¶
func NewStandaloneAnonResourceBaseManager( dt interface{}, tableName string, keyword string, keywordPlural string, ) SStandaloneAnonResourceBaseManager
func (*SStandaloneAnonResourceBaseManager) CreateByInsertOrUpdate ¶
func (manager *SStandaloneAnonResourceBaseManager) CreateByInsertOrUpdate() bool
func (*SStandaloneAnonResourceBaseManager) FetchById ¶
func (manager *SStandaloneAnonResourceBaseManager) FetchById(idStr string) (IModel, error)
func (*SStandaloneAnonResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStandaloneAnonResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StandaloneAnonResourceDetails
func (*SStandaloneAnonResourceBaseManager) FilterByHiddenSystemAttributes ¶
func (manager *SStandaloneAnonResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SStandaloneAnonResourceBaseManager) FilterById ¶
func (*SStandaloneAnonResourceBaseManager) FilterByName ¶
func (*SStandaloneAnonResourceBaseManager) FilterByNotId ¶
func (*SStandaloneAnonResourceBaseManager) GetExportExtraKeys ¶
func (manager *SStandaloneAnonResourceBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict
func (*SStandaloneAnonResourceBaseManager) GetIStandaloneModelManager ¶
func (manager *SStandaloneAnonResourceBaseManager) GetIStandaloneModelManager() IStandaloneModelManager
func (*SStandaloneAnonResourceBaseManager) GetMetadataHiddenKeys ¶
func (manager *SStandaloneAnonResourceBaseManager) GetMetadataHiddenKeys() []string
func (*SStandaloneAnonResourceBaseManager) GetPropertyTagValuePairs ¶
func (manager *SStandaloneAnonResourceBaseManager) GetPropertyTagValuePairs( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SStandaloneAnonResourceBaseManager) GetPropertyTagValueTree ¶
func (manager *SStandaloneAnonResourceBaseManager) GetPropertyTagValueTree( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SStandaloneAnonResourceBaseManager) IsStandaloneManager ¶
func (manager *SStandaloneAnonResourceBaseManager) IsStandaloneManager() bool
func (*SStandaloneAnonResourceBaseManager) ListItemExportKeys ¶
func (manager *SStandaloneAnonResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SStandaloneAnonResourceBaseManager) ListItemFilter ¶
func (manager *SStandaloneAnonResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.StandaloneAnonResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStandaloneAnonResourceBaseManager) OrderByExtraFields ¶
func (manager *SStandaloneAnonResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.StandaloneAnonResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStandaloneAnonResourceBaseManager) QueryDistinctExtraField ¶
func (*SStandaloneAnonResourceBaseManager) ValidateCreateData ¶
func (manager *SStandaloneAnonResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StandaloneAnonResourceCreateInput) (apis.StandaloneAnonResourceCreateInput, error)
type SStandaloneResourceBase ¶
type SStandaloneResourceBase struct { SStandaloneAnonResourceBase // 资源名称 Name string `width:"128" charset:"utf8" nullable:"false" index:"true" list:"user" update:"user" create:"required" json:"name"` }
func (*SStandaloneResourceBase) GetIStandaloneModel ¶
func (model *SStandaloneResourceBase) GetIStandaloneModel() IStandaloneModel
func (*SStandaloneResourceBase) GetName ¶
func (model *SStandaloneResourceBase) GetName() string
func (*SStandaloneResourceBase) GetShortDesc ¶
func (model *SStandaloneResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SStandaloneResourceBase) GetShortDescV2 ¶
func (model *SStandaloneResourceBase) GetShortDescV2(ctx context.Context) *apis.StandaloneResourceShortDescDetail
func (*SStandaloneResourceBase) ValidateUpdateData ¶
func (model *SStandaloneResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StandaloneResourceBaseUpdateInput) (apis.StandaloneResourceBaseUpdateInput, error)
type SStandaloneResourceBaseManager ¶
type SStandaloneResourceBaseManager struct { SStandaloneAnonResourceBaseManager NameRequireAscii bool NameLength int }
func NewStandaloneResourceBaseManager ¶
func NewStandaloneResourceBaseManager( dt interface{}, tableName string, keyword string, keywordPlural string, ) SStandaloneResourceBaseManager
func (*SStandaloneResourceBaseManager) FetchByIdOrName ¶
func (manager *SStandaloneResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SStandaloneResourceBaseManager) FetchByName ¶
func (manager *SStandaloneResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SStandaloneResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStandaloneResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StandaloneResourceDetails
func (*SStandaloneResourceBaseManager) FilterByName ¶
func (*SStandaloneResourceBaseManager) HasName ¶
func (manager *SStandaloneResourceBaseManager) HasName() bool
func (*SStandaloneResourceBaseManager) ListItemExportKeys ¶
func (manager *SStandaloneResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SStandaloneResourceBaseManager) ListItemFilter ¶
func (manager *SStandaloneResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.StandaloneResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStandaloneResourceBaseManager) OrderByExtraFields ¶
func (manager *SStandaloneResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input apis.StandaloneResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStandaloneResourceBaseManager) ValidateCreateData ¶
func (manager *SStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StandaloneResourceCreateInput) (apis.StandaloneResourceCreateInput, error)
func (*SStandaloneResourceBaseManager) ValidateName ¶
func (manager *SStandaloneResourceBaseManager) ValidateName(name string) error
type SStatusDomainLevelResourceBase ¶
type SStatusDomainLevelResourceBase struct { SDomainLevelResourceBase SStatusResourceBase }
func (*SStatusDomainLevelResourceBase) GetIStatusDomainLevelModel ¶
func (self *SStatusDomainLevelResourceBase) GetIStatusDomainLevelModel() IStatusDomainLevelModel
func (*SStatusDomainLevelResourceBase) PerformStatus ¶
func (self *SStatusDomainLevelResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformStatusInput) (jsonutils.JSONObject, error)
更新资源状态
func (*SStatusDomainLevelResourceBase) SetStatus ¶
func (model *SStatusDomainLevelResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
func (*SStatusDomainLevelResourceBase) ValidateUpdateData ¶
func (model *SStatusDomainLevelResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StatusDomainLevelResourceBaseUpdateInput, ) (apis.StatusDomainLevelResourceBaseUpdateInput, error)
type SStatusDomainLevelResourceBaseManager ¶
type SStatusDomainLevelResourceBaseManager struct { SDomainLevelResourceBaseManager SStatusResourceBaseManager }
func NewStatusDomainLevelResourceBaseManager ¶
func NewStatusDomainLevelResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SStatusDomainLevelResourceBaseManager
func (*SStatusDomainLevelResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStatusDomainLevelResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StatusDomainLevelResourceDetails
func (*SStatusDomainLevelResourceBaseManager) ListItemFilter ¶
func (manager *SStatusDomainLevelResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusDomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusDomainLevelResourceBaseManager) OrderByExtraFields ¶
func (manager *SStatusDomainLevelResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusDomainLevelResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusDomainLevelResourceBaseManager) QueryDistinctExtraField ¶
func (*SStatusDomainLevelResourceBaseManager) ValidateCreateData ¶
func (manager *SStatusDomainLevelResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StatusDomainLevelResourceCreateInput, ) (apis.StatusDomainLevelResourceCreateInput, error)
type SStatusDomainLevelUserResourceBase ¶
type SStatusDomainLevelUserResourceBase struct { SStatusDomainLevelResourceBase // 本地用户Id OwnerId string `width:"128" charset:"ascii" index:"true" list:"user" nullable:"false" create:"optional"` }
func (*SStatusDomainLevelUserResourceBase) GetOwnerId ¶
func (model *SStatusDomainLevelUserResourceBase) GetOwnerId() mcclient.IIdentityProvider
func (*SStatusDomainLevelUserResourceBase) SetStatus ¶
func (model *SStatusDomainLevelUserResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
type SStatusDomainLevelUserResourceBaseManager ¶
type SStatusDomainLevelUserResourceBaseManager struct {
SStatusDomainLevelResourceBaseManager
}
func NewStatusDomainLevelUserResourceBaseManager ¶
func NewStatusDomainLevelUserResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SStatusDomainLevelUserResourceBaseManager
func (*SStatusDomainLevelUserResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StatusDomainLevelUserResourceDetails
func (*SStatusDomainLevelUserResourceBaseManager) FilterByOwner ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SStatusDomainLevelUserResourceBaseManager) ListItemExportKeys ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SStatusDomainLevelUserResourceBaseManager) ListItemFilter ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusDomainLevelUserResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusDomainLevelUserResourceBaseManager) OrderByExtraFields ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusDomainLevelUserResourceListInput) (*sqlchemy.SQuery, error)
func (*SStatusDomainLevelUserResourceBaseManager) QueryDistinctExtraField ¶
func (*SStatusDomainLevelUserResourceBaseManager) ValidateCreateData ¶
func (manager *SStatusDomainLevelUserResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StatusDomainLevelUserResourceCreateInput) (apis.StatusDomainLevelUserResourceCreateInput, error)
type SStatusInfrasResourceBase ¶
type SStatusInfrasResourceBase struct { SInfrasResourceBase SStatusResourceBase }
func (*SStatusInfrasResourceBase) GetIStatusInfrasModel ¶
func (self *SStatusInfrasResourceBase) GetIStatusInfrasModel() IStatusInfrasModel
func (*SStatusInfrasResourceBase) PerformStatus ¶
func (self *SStatusInfrasResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformStatusInput) (jsonutils.JSONObject, error)
更新资源状态
func (*SStatusInfrasResourceBase) SetStatus ¶
func (model *SStatusInfrasResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
func (*SStatusInfrasResourceBase) ValidateUpdateData ¶
func (model *SStatusInfrasResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StatusInfrasResourceBaseUpdateInput, ) (apis.StatusInfrasResourceBaseUpdateInput, error)
type SStatusInfrasResourceBaseManager ¶
type SStatusInfrasResourceBaseManager struct { SInfrasResourceBaseManager SStatusResourceBaseManager }
func NewStatusInfrasResourceBaseManager ¶
func NewStatusInfrasResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SStatusInfrasResourceBaseManager
func (*SStatusInfrasResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStatusInfrasResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StatusInfrasResourceBaseDetails
func (*SStatusInfrasResourceBaseManager) GetPropertyStatistics ¶
func (manager *SStatusInfrasResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error)
func (*SStatusInfrasResourceBaseManager) ListItemFilter ¶
func (manager *SStatusInfrasResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusInfrasResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusInfrasResourceBaseManager) OrderByExtraFields ¶
func (manager *SStatusInfrasResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusInfrasResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusInfrasResourceBaseManager) QueryDistinctExtraField ¶
func (*SStatusInfrasResourceBaseManager) ValidateCreateData ¶
func (manager *SStatusInfrasResourceBaseManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StatusInfrasResourceBaseCreateInput, ) (apis.StatusInfrasResourceBaseCreateInput, error)
type SStatusResourceBase ¶
type SStatusResourceBase struct { // 资源状态 Status string `width:"36" charset:"ascii" nullable:"false" default:"init" list:"user" create:"optional" json:"status"` // 操作进度0-100 Progress float32 `list:"user" update:"user" default:"100" json:"progress" log:"skip"` }
func (*SStatusResourceBase) GetDetailsStatus ¶
func (model *SStatusResourceBase) GetDetailsStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (apis.GetDetailsStatusOutput, error)
获取资源状态
func (SStatusResourceBase) GetProgress ¶
func (model SStatusResourceBase) GetProgress() float32
func (SStatusResourceBase) GetStatus ¶
func (model SStatusResourceBase) GetStatus() string
func (*SStatusResourceBase) IsInStatus ¶
func (model *SStatusResourceBase) IsInStatus(status ...string) bool
func (*SStatusResourceBase) SetProgressValue ¶
func (model *SStatusResourceBase) SetProgressValue(progress float32)
func (*SStatusResourceBase) SetStatusValue ¶
func (model *SStatusResourceBase) SetStatusValue(status string)
type SStatusResourceBaseManager ¶
type SStatusResourceBaseManager struct{}
func (*SStatusResourceBaseManager) ListItemFilter ¶
func (manager *SStatusResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusResourceBaseManager) OrderByExtraFields ¶
func (manager *SStatusResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SStatusStandaloneResourceBase ¶
type SStatusStandaloneResourceBase struct { SStandaloneResourceBase SStatusResourceBase }
func (*SStatusStandaloneResourceBase) GetIStatusStandaloneModel ¶
func (self *SStatusStandaloneResourceBase) GetIStatusStandaloneModel() IStatusStandaloneModel
func (*SStatusStandaloneResourceBase) PerformStatus ¶
func (self *SStatusStandaloneResourceBase) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformStatusInput) (jsonutils.JSONObject, error)
更新资源状态
func (*SStatusStandaloneResourceBase) SetProgress ¶
func (model *SStatusStandaloneResourceBase) SetProgress(progress float32) error
func (*SStatusStandaloneResourceBase) SetStatus ¶
func (model *SStatusStandaloneResourceBase) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
func (*SStatusStandaloneResourceBase) ValidateUpdateData ¶
func (model *SStatusStandaloneResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StatusStandaloneResourceBaseUpdateInput, ) (apis.StatusStandaloneResourceBaseUpdateInput, error)
type SStatusStandaloneResourceBaseManager ¶
type SStatusStandaloneResourceBaseManager struct { SStandaloneResourceBaseManager SStatusResourceBaseManager }
func NewStatusStandaloneResourceBaseManager ¶
func NewStatusStandaloneResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SStatusStandaloneResourceBaseManager
func (*SStatusStandaloneResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SStatusStandaloneResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.StatusStandaloneResourceDetails
func (*SStatusStandaloneResourceBaseManager) GetPropertyStatistics ¶
func (manager *SStatusStandaloneResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error)
func (*SStatusStandaloneResourceBaseManager) ListItemFilter ¶
func (manager *SStatusStandaloneResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusStandaloneResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SStatusStandaloneResourceBaseManager) OrderByExtraFields ¶
func (manager *SStatusStandaloneResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.StatusStandaloneResourceListInput) (*sqlchemy.SQuery, error)
func (*SStatusStandaloneResourceBaseManager) QueryDistinctExtraField ¶
func (*SStatusStandaloneResourceBaseManager) ValidateCreateData ¶
func (manager *SStatusStandaloneResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.StatusStandaloneResourceCreateInput) (apis.StatusStandaloneResourceCreateInput, error)
type STenant ¶
type STenant struct {
SKeystoneCacheObject
}
func ValidateDomainizedResourceInput ¶
func ValidateDomainizedResourceInput(ctx context.Context, input apis.DomainizedResourceInput) (*STenant, apis.DomainizedResourceInput, error)
func ValidateProjectizedResourceInput ¶
func ValidateProjectizedResourceInput(ctx context.Context, input apis.ProjectizedResourceInput) (*STenant, apis.ProjectizedResourceInput, error)
func (*STenant) GetAllClassMetadata ¶
func (*STenant) GetDomainId ¶
func (*STenant) GetDomainName ¶
func (*STenant) GetModelManager ¶
func (tenant *STenant) GetModelManager() IModelManager
func (*STenant) GetProjectDomain ¶
func (*STenant) GetProjectDomainId ¶
func (*STenant) GetProjectId ¶
func (*STenant) GetProjectName ¶
func (*STenant) GetTenantId ¶
func (*STenant) GetTenantName ¶
func (*STenant) GetUserName ¶
type STenantCacheManager ¶
type STenantCacheManager struct {
SKeystoneCacheObjectManager
}
var TenantCacheManager *STenantCacheManager
func (*STenantCacheManager) Delete ¶
func (manager *STenantCacheManager) Delete(ctx context.Context, idStr string) error
func (*STenantCacheManager) FetchDomainById ¶
func (*STenantCacheManager) FetchDomainByIdOrName ¶
func (*STenantCacheManager) FetchDomainByIdWithoutExpireCheck ¶
func (*STenantCacheManager) FetchDomainByName ¶
func (*STenantCacheManager) FetchTenantById ¶
func (*STenantCacheManager) FetchTenantByIdOrName ¶
func (*STenantCacheManager) FetchTenantByIdWithoutExpireCheck ¶
func (*STenantCacheManager) FetchTenantByName ¶
func (*STenantCacheManager) FindFirstProjectOfDomain ¶
func (*STenantCacheManager) GetDomainQuery ¶
func (manager *STenantCacheManager) GetDomainQuery(fields ...string) *sqlchemy.SQuery
func (*STenantCacheManager) GetTenantQuery ¶
func (manager *STenantCacheManager) GetTenantQuery(fields ...string) *sqlchemy.SQuery
func (*STenantCacheManager) InitializeData ¶
func (manager *STenantCacheManager) InitializeData() error
func (*STenantCacheManager) Save ¶
func (manager *STenantCacheManager) Save(ctx context.Context, item SCachedTenant, saveMeta bool) (*STenant, error)
type SUser ¶
type SUser struct {
SKeystoneCacheObject
}
func (*SUser) GetModelManager ¶
func (user *SUser) GetModelManager() IModelManager
type SUserCacheManager ¶
type SUserCacheManager struct {
SKeystoneCacheObjectManager
}
var UserCacheManager *SUserCacheManager
func (*SUserCacheManager) FetchUserById ¶
func (*SUserCacheManager) FetchUserByIdOrName ¶
func (*SUserCacheManager) FetchUserByName ¶
func (*SUserCacheManager) FetchUserFromKeystone ¶
type SUserResourceBase ¶
type SUserResourceBase struct { SStandaloneResourceBase // 本地用户Id OwnerId string `width:"128" charset:"ascii" index:"true" list:"user" nullable:"false" create:"required"` }
func (*SUserResourceBase) GetOwnerId ¶
func (self *SUserResourceBase) GetOwnerId() mcclient.IIdentityProvider
func (*SUserResourceBase) IsOwner ¶
func (model *SUserResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
type SUserResourceBaseManager ¶
type SUserResourceBaseManager struct {
SStandaloneResourceBaseManager
}
func NewUserResourceBaseManager ¶
func NewUserResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SUserResourceBaseManager
func (*SUserResourceBaseManager) FetchByIdOrName ¶
func (manager *SUserResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SUserResourceBaseManager) FetchByName ¶
func (manager *SUserResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SUserResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SUserResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.UserResourceDetails
func (*SUserResourceBaseManager) FetchOwnerId ¶
func (manager *SUserResourceBaseManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SUserResourceBaseManager) FilterByOwner ¶
func (manager *SUserResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SUserResourceBaseManager) GetIUserModelManager ¶
func (manager *SUserResourceBaseManager) GetIUserModelManager() IUserModelManager
func (*SUserResourceBaseManager) GetResourceCount ¶
func (userman *SUserResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
func (*SUserResourceBaseManager) ListItemFilter ¶
func (manager *SUserResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.UserResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SUserResourceBaseManager) NamespaceScope ¶
func (manager *SUserResourceBaseManager) NamespaceScope() rbacutils.TRbacScope
func (*SUserResourceBaseManager) OrderByExtraFields ¶
func (manager *SUserResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.UserResourceListInput) (*sqlchemy.SQuery, error)
func (*SUserResourceBaseManager) QueryDistinctExtraField ¶
func (*SUserResourceBaseManager) ResourceScope ¶
func (manager *SUserResourceBaseManager) ResourceScope() rbacutils.TRbacScope
func (*SUserResourceBaseManager) ValidateCreateData ¶
func (manager *SUserResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.UserResourceCreateInput) (apis.UserResourceCreateInput, error)
type SVirtualJointResourceBase ¶
type SVirtualJointResourceBase struct {
SJointResourceBase
}
func (*SVirtualJointResourceBase) ValidateUpdateData ¶
func (self *SVirtualJointResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.VirtualJointResourceBaseUpdateInput, ) (apis.VirtualJointResourceBaseUpdateInput, error)
type SVirtualJointResourceBaseManager ¶
type SVirtualJointResourceBaseManager struct {
SJointResourceBaseManager
}
func NewVirtualJointResourceBaseManager ¶
func NewVirtualJointResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string, master IVirtualModelManager, slave IVirtualModelManager) SVirtualJointResourceBaseManager
func (*SVirtualJointResourceBaseManager) AllowAttach ¶
func (manager *SVirtualJointResourceBaseManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, master IStandaloneModel, slave IStandaloneModel) bool
func (*SVirtualJointResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SVirtualJointResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.VirtualJointResourceBaseDetails
func (*SVirtualJointResourceBaseManager) FilterByHiddenSystemAttributes ¶
func (manager *SVirtualJointResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SVirtualJointResourceBaseManager) FilterById ¶
func (*SVirtualJointResourceBaseManager) FilterByOwner ¶
func (manager *SVirtualJointResourceBaseManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SVirtualJointResourceBaseManager) FilterBySystemAttributes ¶
func (manager *SVirtualJointResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SVirtualJointResourceBaseManager) ListItemFilter ¶
func (manager *SVirtualJointResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.VirtualJointResourceBaseListInput, ) (*sqlchemy.SQuery, error)
func (*SVirtualJointResourceBaseManager) OrderByExtraFields ¶
func (manager *SVirtualJointResourceBaseManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.VirtualJointResourceBaseListInput, ) (*sqlchemy.SQuery, error)
type SVirtualResourceBase ¶
type SVirtualResourceBase struct { SStatusStandaloneResourceBase SProjectizedResourceBase // 云上同步资源是否在本地被更改过配置, local: 更改过, cloud: 未更改过 // example: local ProjectSrc string `width:"10" charset:"ascii" nullable:"false" list:"user" default:"" json:"project_src"` // 是否是系统资源 IsSystem bool `nullable:"true" default:"false" list:"admin" create:"optional" json:"is_system"` // 资源放入回收站时间 PendingDeletedAt time.Time `json:"pending_deleted_at" list:"user" update:"admin"` // 资源是否处于回收站中 PendingDeleted bool `nullable:"false" default:"false" index:"true" get:"user" list:"user" json:"pending_deleted"` // 资源是否被冻结 Freezed bool `nullable:"false" default:"false" get:"user" list:"user" json:"freezed"` }
func (*SVirtualResourceBase) AllowPerformCancelDelete ¶
func (model *SVirtualResourceBase) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SVirtualResourceBase) CancelPendingDelete ¶
func (model *SVirtualResourceBase) CancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) CustomizeCreate ¶
func (model *SVirtualResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SVirtualResourceBase) Delete ¶
func (model *SVirtualResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) DoCancelPendingDelete ¶
func (model *SVirtualResourceBase) DoCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) DoPendingDelete ¶
func (model *SVirtualResourceBase) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) GetDetailsChangeOwnerCandidateDomains ¶
func (model *SVirtualResourceBase) GetDetailsChangeOwnerCandidateDomains(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (apis.ChangeOwnerCandidateDomainsOutput, error)
func (*SVirtualResourceBase) GetIVirtualModel ¶
func (model *SVirtualResourceBase) GetIVirtualModel() IVirtualModel
func (*SVirtualResourceBase) GetPendingDeleted ¶
func (model *SVirtualResourceBase) GetPendingDeleted() bool
GetPendingDeleted implements IPendingDeltable
func (*SVirtualResourceBase) GetPendingDeletedAt ¶
func (model *SVirtualResourceBase) GetPendingDeletedAt() time.Time
GetPendingDeletedAt implements IPendingDeltable
func (*SVirtualResourceBase) GetShortDesc ¶
func (model *SVirtualResourceBase) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SVirtualResourceBase) GetTenantCache ¶
func (model *SVirtualResourceBase) GetTenantCache(ctx context.Context) (*STenant, error)
func (*SVirtualResourceBase) IsOwner ¶
func (model *SVirtualResourceBase) IsOwner(userCred mcclient.TokenCredential) bool
func (*SVirtualResourceBase) MarkCancelPendingDelete ¶
func (model *SVirtualResourceBase) MarkCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) MarkPendingDelete ¶
func (model *SVirtualResourceBase) MarkPendingDelete(userCred mcclient.TokenCredential) error
func (*SVirtualResourceBase) PerformCancelDelete ¶
func (model *SVirtualResourceBase) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SVirtualResourceBase) PerformChangeOwner ¶
func (model *SVirtualResourceBase) PerformChangeOwner(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformChangeProjectOwnerInput) (jsonutils.JSONObject, error)
func (*SVirtualResourceBase) PerformFreeze ¶
func (model *SVirtualResourceBase) PerformFreeze(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformFreezeInput) (jsonutils.JSONObject, error)
freezed update and perform action operation except for unfreeze
func (*SVirtualResourceBase) PerformUnfreeze ¶
func (model *SVirtualResourceBase) PerformUnfreeze(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformUnfreezeInput) (jsonutils.JSONObject, error)
func (*SVirtualResourceBase) PostCreate ¶
func (model *SVirtualResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SVirtualResourceBase) PreCheckPerformAction ¶
func (model *SVirtualResourceBase) PreCheckPerformAction( ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject, ) error
func (*SVirtualResourceBase) SetProjectInfo ¶
func (model *SVirtualResourceBase) SetProjectInfo(ctx context.Context, userCred mcclient.TokenCredential, projectId, domainId string) error
func (*SVirtualResourceBase) SetSystemInfo ¶
func (model *SVirtualResourceBase) SetSystemInfo(isSystem bool) error
func (*SVirtualResourceBase) SyncCloudProjectId ¶
func (model *SVirtualResourceBase) SyncCloudProjectId(userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider)
func (*SVirtualResourceBase) ValidateUpdateData ¶
func (model *SVirtualResourceBase) ValidateUpdateData( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.VirtualResourceBaseUpdateInput, ) (apis.VirtualResourceBaseUpdateInput, error)
func (*SVirtualResourceBase) VirtualModelManager ¶
func (model *SVirtualResourceBase) VirtualModelManager() IVirtualModelManager
type SVirtualResourceBaseManager ¶
type SVirtualResourceBaseManager struct { SStatusStandaloneResourceBaseManager SProjectizedResourceBaseManager }
func NewVirtualResourceBaseManager ¶
func NewVirtualResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string) SVirtualResourceBaseManager
func (*SVirtualResourceBaseManager) FetchByIdOrName ¶
func (manager *SVirtualResourceBaseManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SVirtualResourceBaseManager) FetchByName ¶
func (manager *SVirtualResourceBaseManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (IModel, error)
func (*SVirtualResourceBaseManager) FetchCustomizeColumns ¶
func (manager *SVirtualResourceBaseManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []apis.VirtualResourceDetails
func (*SVirtualResourceBaseManager) FilterByHiddenSystemAttributes ¶
func (manager *SVirtualResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SVirtualResourceBaseManager) FilterBySystemAttributes ¶
func (manager *SVirtualResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SVirtualResourceBaseManager) GetExportExtraKeys ¶
func (manager *SVirtualResourceBaseManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict
func (*SVirtualResourceBaseManager) GetIVirtualModelManager ¶
func (manager *SVirtualResourceBaseManager) GetIVirtualModelManager() IVirtualModelManager
func (*SVirtualResourceBaseManager) GetPropertyDomainStatistics ¶
func (manager *SVirtualResourceBaseManager) GetPropertyDomainStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) ([]apis.ProjectStatistic, error)
func (*SVirtualResourceBaseManager) GetPropertyProjectStatistics ¶
func (manager *SVirtualResourceBaseManager) GetPropertyProjectStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) ([]apis.ProjectStatistic, error)
func (*SVirtualResourceBaseManager) GetPropertyProjectTagValuePairs ¶
func (manager *SVirtualResourceBaseManager) GetPropertyProjectTagValuePairs( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SVirtualResourceBaseManager) GetPropertyProjectTagValueTree ¶
func (manager *SVirtualResourceBaseManager) GetPropertyProjectTagValueTree( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, ) (jsonutils.JSONObject, error)
func (*SVirtualResourceBaseManager) GetPropertyStatistics ¶
func (manager *SVirtualResourceBaseManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error)
func (*SVirtualResourceBaseManager) GetResourceCount ¶
func (virtman *SVirtualResourceBaseManager) GetResourceCount() ([]SScopeResourceCount, error)
func (*SVirtualResourceBaseManager) ListItemExportKeys ¶
func (manager *SVirtualResourceBaseManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SVirtualResourceBaseManager) ListItemFilter ¶
func (manager *SVirtualResourceBaseManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.VirtualResourceListInput, ) (*sqlchemy.SQuery, error)
func (*SVirtualResourceBaseManager) OrderByExtraFields ¶
func (manager *SVirtualResourceBaseManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query apis.VirtualResourceListInput) (*sqlchemy.SQuery, error)
func (*SVirtualResourceBaseManager) QueryDistinctExtraField ¶
func (*SVirtualResourceBaseManager) ValidateCreateData ¶
func (manager *SVirtualResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input apis.VirtualResourceCreateInput) (apis.VirtualResourceCreateInput, error)
type UUIDGenerator ¶
type UUIDGenerator func() string
Source Files ¶
- adminsharablevirtual.go
- apply_manager_method.go
- archs.go
- auto_delete.go
- caller.go
- certificateresource.go
- checksum.go
- database.go
- db_dispatcher.go
- db_joint_dispatcher.go
- distinct_fields.go
- doc.go
- domain.go
- domainresource.go
- enabledbase.go
- enabledstatusdomainresource.go
- enabledstatusinfrasresource.go
- enabledstatusstandalone.go
- encrypted.go
- errors.go
- external.go
- fetch.go
- fieldtags.go
- i18n.go
- infraresource.go
- initialization.go
- interface.go
- jointbase.go
- keystonecache.go
- list.go
- lock.go
- managed.go
- metadata.go
- metadataresource.go
- modelbase.go
- models.go
- namevalidator.go
- notify_hook.go
- opslog.go
- opslog_const.go
- orderby.go
- owner.go
- paging.go
- pending_deletable.go
- policytags.go
- project.go
- project_resources.go
- query.go
- rbac.go
- resourcebase.go
- rolecache.go
- scoperesource.go
- sharablebase.go
- sharablevirtual.go
- sharedresource.go
- standalone.go
- standalone_anon.go
- statusbase.go
- statusdomainresource.go
- statusinfrasresource.go
- statusinfrasuserresource.go
- statusstandalone.go
- tablespec.go
- tagvaluetree.go
- tenantcache.go
- tenantcacheitem.go
- tenantcachesync.go
- update.go
- usages.go
- usercache.go
- userresources.go
- virtualjointbase.go
- virtualresource.go