models

package
v0.3.10-0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 45 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDrivers

func AllDrivers() map[string]ICloudSAMLLoginDriver

func GetMetadata

func GetMetadata(driver ICloudSAMLLoginDriver) ([]byte, error)

func InitDB

func InitDB() error

func Register

func Register(driver ICloudSAMLLoginDriver)

func UnRegister

func UnRegister(entityId string)

Types

type ICloudSAMLLoginDriver

type ICloudSAMLLoginDriver interface {
	GetEntityID() string

	GetMetadataFilename() string
	GetMetadataUrl() string

	GetIdpInitiatedLoginData(ctx context.Context, userCred mcclient.TokenCredential, cloudAccountId string, sp *idp.SSAMLServiceProvider, redirectUrl string) (samlutils.SSAMLIdpInitiatedLoginData, error)
	GetSpInitiatedLoginData(ctx context.Context, userCred mcclient.TokenCredential, cloudAccoutId string, sp *idp.SSAMLServiceProvider) (samlutils.SSAMLSpInitiatedLoginData, error)
}

func FindDriver

func FindDriver(entityId string) ICloudSAMLLoginDriver

type SAMLProviderResourceBase

type SAMLProviderResourceBase struct {
	SAMLProviderId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"saml_provider_id"`
}

func (*SAMLProviderResourceBase) GetSAMLProvider

func (self *SAMLProviderResourceBase) GetSAMLProvider() (*SSAMLProvider, error)

type SAMLProviderResourceBaseManager

type SAMLProviderResourceBaseManager struct {
}

type SCloudDelegate

type SCloudDelegate struct {
	Id         string
	Name       string
	Enabled    bool
	Status     string
	SyncStatus string

	AccessUrl string
	Account   string
	Secret    string

	Provider string
	Brand    string

	ReadOnly bool

	Options struct {
		cloudprovider.SHCSOEndpoints
	}
	ProxySetting proxyapi.SProxySetting
}

func (*SCloudDelegate) GetProvider

func (account *SCloudDelegate) GetProvider() (cloudprovider.ICloudProvider, error)

type SCloudaccount

type SCloudaccount struct {
	db.SStandaloneResourceBase
	db.SDomainizedResourceBase

	AccountId   string            `width:"128" charset:"utf8" nullable:"true" list:"domain" create:"domain_optional"`
	Provider    string            `width:"64" charset:"ascii" list:"domain"`
	Brand       string            `width:"64" charset:"utf8" nullable:"true" list:"domain"`
	IamLoginUrl string            `width:"512" charset:"ascii"`
	SAMLAuth    tristate.TriState `list:"domain" default:"false"`

	AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	ReadOnly bool `default:"false" create:"domain_optional" list:"domain" update:"domain"`
}

func (*SCloudaccount) GetCloudDelegaes

func (self *SCloudaccount) GetCloudDelegaes(ctx context.Context) ([]SCloudDelegate, error)

func (*SCloudaccount) GetCloudaccountByProvider

func (self *SCloudaccount) GetCloudaccountByProvider(provider string) ([]SCloudaccount, error)

func (*SCloudaccount) GetCloudgroupcaches

func (self *SCloudaccount) GetCloudgroupcaches() ([]SCloudgroupcache, error)

func (*SCloudaccount) GetCloudgroups

func (self *SCloudaccount) GetCloudgroups() ([]SCloudgroup, error)

func (*SCloudaccount) GetCloudpolicies

func (self *SCloudaccount) GetCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudaccount) GetCloudpolicycaches

func (self *SCloudaccount) GetCloudpolicycaches(policyIds []string, cloudproviderId string) ([]SCloudpolicycache, error)

func (*SCloudaccount) GetCloudproviderId

func (self *SCloudaccount) GetCloudproviderId() string

func (*SCloudaccount) GetCloudproviders

func (self *SCloudaccount) GetCloudproviders() ([]SCloudprovider, error)

func (*SCloudaccount) GetCloudroles

func (self *SCloudaccount) GetCloudroles() ([]SCloudrole, error)

func (*SCloudaccount) GetClouduserAccountName

func (self *SCloudaccount) GetClouduserAccountName(name string) (string, string)

func (*SCloudaccount) GetCloudusers

func (self *SCloudaccount) GetCloudusers() ([]SClouduser, error)

func (*SCloudaccount) GetCustomCloudpolicies

func (self *SCloudaccount) GetCustomCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudaccount) GetCustomPolicyByExternalId

func (self *SCloudaccount) GetCustomPolicyByExternalId(id string) (*SCloudpolicy, error)

func (SCloudaccount) GetExternalId

func (self SCloudaccount) GetExternalId() string

func (SCloudaccount) GetGlobalId

func (self SCloudaccount) GetGlobalId() string

func (*SCloudaccount) GetICloudprovider

func (self *SCloudaccount) GetICloudprovider() ([]SCloudprovider, error)

func (*SCloudaccount) GetLocalCloudroles

func (self *SCloudaccount) GetLocalCloudroles(userId, groupId string, spId string, grouped bool) ([]SCloudrole, error)

func (*SCloudaccount) GetOrCreateCloudgroup

func (self *SCloudaccount) GetOrCreateCloudgroup(ctx context.Context, userCred mcclient.TokenCredential, iGroup cloudprovider.ICloudgroup) (*SCloudgroup, error)

func (*SCloudaccount) GetProvider

func (self *SCloudaccount) GetProvider() (cloudprovider.ICloudProvider, error)

func (*SCloudaccount) GetProviderFactory

func (self *SCloudaccount) GetProviderFactory() (cloudprovider.ICloudProviderFactory, error)

func (*SCloudaccount) GetSAMLProviders

func (self *SCloudaccount) GetSAMLProviders() ([]SSAMLProvider, error)

func (*SCloudaccount) GetSamlusers

func (self *SCloudaccount) GetSamlusers() ([]SSamluser, error)

func (*SCloudaccount) GetSystemCloudpolicies

func (self *SCloudaccount) GetSystemCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudaccount) GetSystemPolicyByExternalId

func (self *SCloudaccount) GetSystemPolicyByExternalId(id string) (*SCloudpolicy, error)

func (*SCloudaccount) GetUserCloudgroups

func (self *SCloudaccount) GetUserCloudgroups(userCred mcclient.TokenCredential) ([]string, []string, error)

func (*SCloudaccount) InviteAzureUser

func (self *SCloudaccount) InviteAzureUser(ctx context.Context, userCred mcclient.TokenCredential, domain string) (string, error)

func (*SCloudaccount) IsSAMLProviderValid

func (self *SCloudaccount) IsSAMLProviderValid() (*SSAMLProvider, bool)

func (*SCloudaccount) RegisterCloudroles

func (self *SCloudaccount) RegisterCloudroles(userId string, grouped bool, spId string) ([]SCloudrole, error)

func (*SCloudaccount) RegisterSAMProvider

func (self *SCloudaccount) RegisterSAMProvider() (*SSAMLProvider, error)

func (*SCloudaccount) StartSAMLProviderCreateTask

func (self *SCloudaccount) StartSAMLProviderCreateTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudaccount) StartSyncCloudIdResourcesTask

func (self *SCloudaccount) StartSyncCloudIdResourcesTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudaccount) StartSyncCloudrolesTask

func (self *SCloudaccount) StartSyncCloudrolesTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudaccount) StartSyncCloudusersTask

func (self *SCloudaccount) StartSyncCloudusersTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudaccount) StartSyncSamlProvidersTask

func (self *SCloudaccount) StartSyncSamlProvidersTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudaccount) StartSystemCloudpolicySyncTask

func (self *SCloudaccount) StartSystemCloudpolicySyncTask(ctx context.Context, userCred mcclient.TokenCredential, refresh bool, parentTaskId string) error

func (*SCloudaccount) SyncCloudgroupcaches

func (self *SCloudaccount) SyncCloudgroupcaches(ctx context.Context, userCred mcclient.TokenCredential, iGroups []cloudprovider.ICloudgroup) error

func (*SCloudaccount) SyncCloudroles

func (self *SCloudaccount) SyncCloudroles(ctx context.Context, userCred mcclient.TokenCredential, exts []cloudprovider.ICloudrole) compare.SyncResult

func (*SCloudaccount) SyncCloudusers

func (*SCloudaccount) SyncCustomCloudpoliciesForCloud

func (self *SCloudaccount) SyncCustomCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential, clouduser *SClouduser) error

func (*SCloudaccount) SyncCustomCloudpoliciesFromCloud

func (self *SCloudaccount) SyncCustomCloudpoliciesFromCloud(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudaccount) SyncCustomCloudpoliciesToLocal

func (self *SCloudaccount) SyncCustomCloudpoliciesToLocal(ctx context.Context, userCred mcclient.TokenCredential, iPolicies []cloudprovider.ICloudpolicy, cloudproviderId string) compare.SyncResult

func (*SCloudaccount) SyncRoles

func (self *SCloudaccount) SyncRoles(userId string, grouped bool) ([]SCloudrole, error)

func (*SCloudaccount) SyncSAMLProviders

func (*SCloudaccount) SyncSystemCloudpoliciesForCloud

func (self *SCloudaccount) SyncSystemCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential, clouduser *SClouduser) error

func (*SCloudaccount) SyncSystemCloudpoliciesFromCloud

func (self *SCloudaccount) SyncSystemCloudpoliciesFromCloud(ctx context.Context, userCred mcclient.TokenCredential, refresh bool) error

type SCloudaccountManager

type SCloudaccountManager struct {
	db.SDomainLevelResourceBaseManager
}

+onecloud:swagger-gen-ignore

var CloudaccountManager *SCloudaccountManager

func (*SCloudaccountManager) FetchAccount

func (manager *SCloudaccountManager) FetchAccount(ctx context.Context, id string) (*SCloudaccount, error)

func (*SCloudaccountManager) GetCloudaccounts

func (manager *SCloudaccountManager) GetCloudaccounts() ([]SCloudaccount, error)

func (*SCloudaccountManager) GetICloudaccounts

func (manager *SCloudaccountManager) GetICloudaccounts() ([]SCloudaccount, error)

func (*SCloudaccountManager) GetResourceCount

func (manager *SCloudaccountManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SCloudaccountManager) GetSupportCloudIdAccounts

func (manager *SCloudaccountManager) GetSupportCloudIdAccounts() ([]SCloudaccount, error)

func (*SCloudaccountManager) GetSupportCreateCloudgroupAccounts

func (manager *SCloudaccountManager) GetSupportCreateCloudgroupAccounts() ([]SCloudaccount, error)

func (*SCloudaccountManager) SyncCloudaccounts

func (manager *SCloudaccountManager) SyncCloudaccounts(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SCloudaccountManager) SyncCloudidResources

func (manager *SCloudaccountManager) SyncCloudidResources(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SCloudaccountManager) SyncCloudidSystemPolicies

func (manager *SCloudaccountManager) SyncCloudidSystemPolicies(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SCloudaccountManager) SyncCloudroles

func (manager *SCloudaccountManager) SyncCloudroles(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SCloudaccountManager) SyncSAMLProviders

func (manager *SCloudaccountManager) SyncSAMLProviders(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

type SCloudaccountResourceBase

type SCloudaccountResourceBase struct {
	// 云账号Id
	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"cloudaccount_id"`
}

func (*SCloudaccountResourceBase) GetCloudaccount

func (self *SCloudaccountResourceBase) GetCloudaccount() (*SCloudaccount, error)

type SCloudaccountResourceBaseManager

type SCloudaccountResourceBaseManager struct {
}

func (*SCloudaccountResourceBaseManager) FetchCustomizeColumns

func (manager *SCloudaccountResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudaccountResourceDetails

func (*SCloudaccountResourceBaseManager) ListItemFilter

type SCloudgroup

type SCloudgroup struct {
	db.SStatusInfrasResourceBase

	Provider string `width:"64" charset:"ascii" list:"domain" create:"required"`
}

func (*SCloudgroup) CustomizeDelete

func (self *SCloudgroup) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除权限组

func (*SCloudgroup) Delete

func (self *SCloudgroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroup) GetCloudgroupcacheCount

func (self *SCloudgroup) GetCloudgroupcacheCount() (int, error)

func (*SCloudgroup) GetCloudgroupcacheQuery

func (self *SCloudgroup) GetCloudgroupcacheQuery() *sqlchemy.SQuery

func (*SCloudgroup) GetCloudgroupcaches

func (self *SCloudgroup) GetCloudgroupcaches() ([]SCloudgroupcache, error)

func (*SCloudgroup) GetCloudpolicies

func (self *SCloudgroup) GetCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudgroup) GetCloudpolicy

func (self *SCloudgroup) GetCloudpolicy(policyId string) (*SCloudpolicy, error)

func (*SCloudgroup) GetCloudpolicyCount

func (self *SCloudgroup) GetCloudpolicyCount() (int, error)

func (*SCloudgroup) GetCloudpolicyQuery

func (self *SCloudgroup) GetCloudpolicyQuery() *sqlchemy.SQuery

func (*SCloudgroup) GetClouduser

func (self *SCloudgroup) GetClouduser(userId string) (*SClouduser, error)

func (*SCloudgroup) GetClouduserCount

func (self *SCloudgroup) GetClouduserCount() (int, error)

func (*SCloudgroup) GetClouduserQuery

func (self *SCloudgroup) GetClouduserQuery() *sqlchemy.SQuery

func (*SCloudgroup) GetCloudusers

func (self *SCloudgroup) GetCloudusers() ([]SClouduser, error)

func (*SCloudgroup) GetCustomCloudpolicies

func (self *SCloudgroup) GetCustomCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudgroup) GetProviderFactory

func (self *SCloudgroup) GetProviderFactory() (cloudprovider.ICloudProviderFactory, error)

func (*SCloudgroup) GetSamlusers

func (self *SCloudgroup) GetSamlusers() ([]SSamluser, error)

func (*SCloudgroup) GetSystemCloudpolicies

func (self *SCloudgroup) GetSystemCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudgroup) IsEqual

func (self *SCloudgroup) IsEqual(system, custom []cloudprovider.ICloudpolicy) (bool, error)

func (*SCloudgroup) PerformAddUser

向权限组加入用户 权限组状态必须为: available

func (*SCloudgroup) PerformAttachPolicy

向权限组添加权限 权限组状态必须为: available

func (*SCloudgroup) PerformDetachPolicy

从权限组移除权限 权限组状态必须为: available

func (*SCloudgroup) PerformRemoveUser

从权限组移除用户 权限组状态必须为: available

func (*SCloudgroup) PerformSetPolicies

设置权限组添权限(全量覆盖) 权限组状态必须为: available

func (*SCloudgroup) PerformSetUsers

设置权限组用户(全量覆盖) 权限组状态必须为: available

func (*SCloudgroup) PerformSyncstatus

恢复权限组状态

func (*SCloudgroup) PostCreate

func (*SCloudgroup) RealDelete

func (self *SCloudgroup) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroup) StartCloudgroupDeleteTask

func (self *SCloudgroup) StartCloudgroupDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SCloudgroup) StartCloudgroupSyncPoliciesTask

func (self *SCloudgroup) StartCloudgroupSyncPoliciesTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudgroup) StartCloudgroupSyncUsersTask

func (self *SCloudgroup) StartCloudgroupSyncUsersTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudgroup) StartCloudgroupSyncstatusTask

func (self *SCloudgroup) StartCloudgroupSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudgroup) ValidateUpdateData

更新权限组

type SCloudgroupJointsBase

type SCloudgroupJointsBase struct {
	db.SJointResourceBase

	// 用户组Id
	CloudgroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true" json:"cloudgroup_id"`
}

func (*SCloudgroupJointsBase) ValidateUpdateData

type SCloudgroupJointsManager

type SCloudgroupJointsManager struct {
	db.SJointResourceBaseManager
}

func NewCloudgroupJointsManager

func NewCloudgroupJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SCloudgroupJointsManager

func (*SCloudgroupJointsManager) FetchCustomizeColumns

func (manager *SCloudgroupJointsManager) FetchCustomizeColumns(
	ctx context.Context,
	groupCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupJointResourceDetails

func (*SCloudgroupJointsManager) GetMasterFieldName

func (manager *SCloudgroupJointsManager) GetMasterFieldName() string

func (*SCloudgroupJointsManager) ListItemExportKeys

func (manager *SCloudgroupJointsManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	groupCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SCloudgroupJointsManager) ListItemFilter

func (*SCloudgroupJointsManager) OrderByExtraFields

func (manager *SCloudgroupJointsManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	groupCred mcclient.TokenCredential,
	query api.CloudgroupJointsListInput,
) (*sqlchemy.SQuery, error)

type SCloudgroupManager

type SCloudgroupManager struct {
	db.SStatusInfrasResourceBaseManager
}
var CloudgroupManager *SCloudgroupManager

func (*SCloudgroupManager) FetchCustomizeColumns

func (manager *SCloudgroupManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupDetails

获取权限组详情

func (*SCloudgroupManager) FetchUniqValues

func (manager *SCloudgroupManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SCloudgroupManager) FilterByUniqValues

func (manager *SCloudgroupManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SCloudgroupManager) ListItemFilter

func (manager *SCloudgroupManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.CloudgroupListInput) (*sqlchemy.SQuery, error)

权限组列表

func (*SCloudgroupManager) ValidateCreateData

创建权限组

type SCloudgroupPolicy

type SCloudgroupPolicy struct {
	SCloudgroupJointsBase
	SCloudpolicyResourceBase
}

func (*SCloudgroupPolicy) CustomizeDelete

func (self *SCloudgroupPolicy) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

+onecloud:swagger-gen-ignore

func (*SCloudgroupPolicy) Delete

func (self *SCloudgroupPolicy) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupPolicy) Detach

func (self *SCloudgroupPolicy) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupPolicy) ValidateUpdateData

+onecloud:swagger-gen-ignore

type SCloudgroupPolicyManager

type SCloudgroupPolicyManager struct {
	SCloudgroupJointsManager
	SCloudpolicyResourceBaseManager
}

+onecloud:swagger-gen-ignore

var CloudgroupPolicyManager *SCloudgroupPolicyManager

func (*SCloudgroupPolicyManager) FetchCustomizeColumns

func (manager *SCloudgroupPolicyManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupPolicyDetails

用户组中权限详情

func (*SCloudgroupPolicyManager) GetSlaveFieldName

func (manager *SCloudgroupPolicyManager) GetSlaveFieldName() string

func (*SCloudgroupPolicyManager) ListItemExportKeys

func (*SCloudgroupPolicyManager) ListItemFilter

用户组中权限列表

func (*SCloudgroupPolicyManager) OrderByExtraFields

func (*SCloudgroupPolicyManager) ValidateCreateData

+onecloud:swagger-gen-ignore

type SCloudgroupResourceBase

type SCloudgroupResourceBase struct {
	CloudgroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SCloudgroupResourceBase) GetCloudgroup

func (self *SCloudgroupResourceBase) GetCloudgroup() (*SCloudgroup, error)

type SCloudgroupResourceBaseManager

type SCloudgroupResourceBaseManager struct {
}

func (*SCloudgroupResourceBaseManager) FetchCustomizeColumns

func (manager *SCloudgroupResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	groupCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupResourceDetails

func (*SCloudgroupResourceBaseManager) ListItemFilter

type SCloudgroupUser

type SCloudgroupUser struct {
	SCloudgroupJointsBase

	SClouduserResourceBase
}

func (*SCloudgroupUser) CustomizeDelete

func (self *SCloudgroupUser) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

+onecloud:swagger-gen-ignore

func (*SCloudgroupUser) Delete

func (self *SCloudgroupUser) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupUser) Detach

func (self *SCloudgroupUser) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupUser) ValidateUpdateData

func (self *SCloudgroupUser) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)

+onecloud:swagger-gen-ignore

type SCloudgroupUserManager

type SCloudgroupUserManager struct {
	SCloudgroupJointsManager
	SClouduserResourceBaseManager
}

+onecloud:swagger-gen-ignore

var CloudgroupUserManager *SCloudgroupUserManager

func (*SCloudgroupUserManager) FetchCustomizeColumns

func (manager *SCloudgroupUserManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupUserDetails

获取用户组中用户详情

func (*SCloudgroupUserManager) GetSlaveFieldName

func (manager *SCloudgroupUserManager) GetSlaveFieldName() string

func (*SCloudgroupUserManager) ListItemExportKeys

func (manager *SCloudgroupUserManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SCloudgroupUserManager) ListItemFilter

用户组中用户列表

func (*SCloudgroupUserManager) OrderByExtraFields

func (manager *SCloudgroupUserManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.CloudgroupUserListInput,
) (*sqlchemy.SQuery, error)

func (*SCloudgroupUserManager) ValidateCreateData

+onecloud:swagger-gen-ignore

type SCloudgroupcache

type SCloudgroupcache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudaccountResourceBase

	// 用户组Id
	CloudgroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" index:"true" json:"cloudgroup_id"`
}

func (*SCloudgroupcache) CustomizeDelete

func (self *SCloudgroupcache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除权限组缓存

func (*SCloudgroupcache) Delete

func (self *SCloudgroupcache) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupcache) GetCloudgroup

func (self *SCloudgroupcache) GetCloudgroup() (*SCloudgroup, error)

func (*SCloudgroupcache) GetCloudusers

func (self *SCloudgroupcache) GetCloudusers() ([]SClouduser, error)

func (*SCloudgroupcache) GetICloudgroup

func (self *SCloudgroupcache) GetICloudgroup() (cloudprovider.ICloudgroup, error)

func (*SCloudgroupcache) GetOrCreateICloudgroup

func (self *SCloudgroupcache) GetOrCreateICloudgroup(ctx context.Context, userCred mcclient.TokenCredential) (cloudprovider.ICloudgroup, error)

func (*SCloudgroupcache) GetOwnerId

func (self *SCloudgroupcache) GetOwnerId() mcclient.IIdentityProvider

func (*SCloudgroupcache) PerformSyncstatus

同步权限组缓存状态

func (*SCloudgroupcache) RealDelete

func (self *SCloudgroupcache) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupcache) StartCloudgroupcacheDeleteTask

func (self *SCloudgroupcache) StartCloudgroupcacheDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudgroupcache) StartCloudgroupcacheSyncstatusTask

func (self *SCloudgroupcache) StartCloudgroupcacheSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudgroupcache) SyncCloudusersForCloud

func (self *SCloudgroupcache) SyncCloudusersForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

将本地的用户推送到云上(覆盖云上设置)

func (*SCloudgroupcache) SyncCustomCloudpoliciesForCloud

func (self *SCloudgroupcache) SyncCustomCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudgroupcache) SyncSystemCloudpoliciesForCloud

func (self *SCloudgroupcache) SyncSystemCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

将本地的权限推送到云上(覆盖云上设置)

func (*SCloudgroupcache) ValidateUpdateData

+onecloud:swagger-gen-ignore

type SCloudgroupcacheManager

var CloudgroupcacheManager *SCloudgroupcacheManager

func (*SCloudgroupcacheManager) FetchCustomizeColumns

func (manager *SCloudgroupcacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudgroupcacheDetails

获取权限组缓存详情

func (*SCloudgroupcacheManager) ListItemFilter

公有云权限组缓存

func (*SCloudgroupcacheManager) Register

func (manager *SCloudgroupcacheManager) Register(group *SCloudgroup, account *SCloudaccount) (*SCloudgroupcache, error)

func (*SCloudgroupcacheManager) ResourceScope

func (manager *SCloudgroupcacheManager) ResourceScope() rbacutils.TRbacScope

func (*SCloudgroupcacheManager) ValidateCreateData

+onecloud:swagger-gen-ignore

type SCloudpolicy

type SCloudpolicy struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase

	// 权限类型
	//
	// | 权限类型      |  说明                |
	// |---------------|----------------------|
	// | system        | 平台内置权限         |
	// | custom        | 用户自定义权限       |
	PolicyType string `width:"16" charset:"ascii" list:"domain" default:"custom"`

	// 平台
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 支持                                        |
	// | Aliyun   | 支持										|
	// | Huawei   | 支持                                        |
	// | Azure    | 支持                                        |
	// | 腾讯云   | 支持                                        |
	Provider string `width:"64" charset:"ascii" list:"domain" create:"domain_required"`

	// 策略内容
	Document *jsonutils.JSONDict `length:"long" charset:"ascii" list:"domain" update:"domain" create:"domain_required"`

	// 是否锁定, 若锁定后, 此策略不允许被绑定到用户或权限组, 仅管理员可以设置是否锁定
	Locked tristate.TriState `get:"user" create:"optional" list:"user" default:"false"`

	CloudEnv string `width:"64" charset:"ascii" list:"domain" create:"domain_required"`
}

func (*SCloudpolicy) CustomizeDelete

func (self *SCloudpolicy) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除自定义权限

func (*SCloudpolicy) Delete

func (self *SCloudpolicy) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudpolicy) GetCloudgroups

func (self *SCloudpolicy) GetCloudgroups() ([]SCloudgroup, error)

func (*SCloudpolicy) GetCloudpolicycaches

func (self *SCloudpolicy) GetCloudpolicycaches() ([]SCloudpolicycache, error)

func (*SCloudpolicy) GetCloudusers

func (self *SCloudpolicy) GetCloudusers() ([]SClouduser, error)

func (SCloudpolicy) GetGlobalId

func (self SCloudpolicy) GetGlobalId() string

func (*SCloudpolicy) PerformAssignGroup

将权限加入权限组

func (*SCloudpolicy) PerformLock

锁定权限(禁止使用此权限)

func (*SCloudpolicy) PerformRevokeGroup

将权限从权限组中移除

func (*SCloudpolicy) PerformSyncstatus

恢复权限组状态

func (*SCloudpolicy) PerformUnlock

解锁权限(允许使用此权限)

func (*SCloudpolicy) PostUpdate

func (self *SCloudpolicy) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SCloudpolicy) RealDelete

func (self *SCloudpolicy) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudpolicy) StartCloudpolicyDeleteTask

func (self *SCloudpolicy) StartCloudpolicyDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudpolicy) StartCloudpolicyUpdateTask

func (self *SCloudpolicy) StartCloudpolicyUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCloudpolicy) SyncWithCloudpolicy

func (self *SCloudpolicy) SyncWithCloudpolicy(ctx context.Context, userCred mcclient.TokenCredential, iPolicy SCloudpolicy) error

func (*SCloudpolicy) ValidateDeleteCondition

func (self *SCloudpolicy) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SCloudpolicy) ValidateUpdateData

更新策略(仅限自定义)

func (*SCloudpolicy) ValidateUse

func (self *SCloudpolicy) ValidateUse() error

type SCloudpolicyManager

var CloudpolicyManager *SCloudpolicyManager

func (*SCloudpolicyManager) FetchCustomizeColumns

func (manager *SCloudpolicyManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudpolicyDetails

获取公有云权限详情

func (*SCloudpolicyManager) GetIVirtualModelManager

func (manager *SCloudpolicyManager) GetIVirtualModelManager() db.IVirtualModelManager

func (*SCloudpolicyManager) GetResourceCount

func (manager *SCloudpolicyManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SCloudpolicyManager) ListItemFilter

公有云权限列表

func (*SCloudpolicyManager) OrderByExtraFields

func (manager *SCloudpolicyManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.CloudpolicyListInput,
) (*sqlchemy.SQuery, error)

func (*SCloudpolicyManager) QueryDistinctExtraField

func (manager *SCloudpolicyManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SCloudpolicyManager) ValidateCreateData

创建自定义策略

type SCloudpolicyResourceBase

type SCloudpolicyResourceBase struct {
	// 权限Id
	CloudpolicyId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"cloudpolicy_id"`
}

type SCloudpolicyResourceBaseManager

type SCloudpolicyResourceBaseManager struct {
}

func (*SCloudpolicyResourceBaseManager) FetchCustomizeColumns

func (manager *SCloudpolicyResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	policyCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudpolicyResourceDetails

func (*SCloudpolicyResourceBaseManager) ListItemFilter

type SCloudpolicycache

type SCloudpolicycache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudaccountResourceBase
	SCloudproviderResourceBase

	// 权限Id
	CloudpolicyId string `width:"36" charset:"ascii" nullable:"true" list:"user" index:"true" json:"cloudpolicy_id"`
}

func (*SCloudpolicycache) GetCloudpolicy

func (self *SCloudpolicycache) GetCloudpolicy() (*SCloudpolicy, error)

func (*SCloudpolicycache) GetCloudprovider

func (self *SCloudpolicycache) GetCloudprovider() (*SCloudprovider, error)

func (*SCloudpolicycache) GetProvider

func (self *SCloudpolicycache) GetProvider() (cloudprovider.ICloudProvider, error)

type SCloudpolicycacheManager

var CloudpolicycacheManager *SCloudpolicycacheManager

func (*SCloudpolicycacheManager) FetchCustomizeColumns

func (manager *SCloudpolicycacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudpolicycacheDetails

获取公有云权限缓存详情

func (*SCloudpolicycacheManager) ListItemFilter

公有云权限缓存列表

func (*SCloudpolicycacheManager) Register

func (manager *SCloudpolicycacheManager) Register(ctx context.Context, accountId, providerId, policyId string) (*SCloudpolicycache, error)

type SCloudprovider

type SCloudprovider struct {
	db.SStandaloneResourceBase

	Provider       string `width:"64" charset:"ascii" list:"domain"`
	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SCloudprovider) GetCloudaccount

func (self *SCloudprovider) GetCloudaccount() (*SCloudaccount, error)

func (SCloudprovider) GetExternalId

func (self SCloudprovider) GetExternalId() string

func (SCloudprovider) GetGlobalId

func (self SCloudprovider) GetGlobalId() string

func (*SCloudprovider) GetProvider

func (self *SCloudprovider) GetProvider() (cloudprovider.ICloudProvider, error)

func (*SCloudprovider) GetProviderFactory

func (self *SCloudprovider) GetProviderFactory() (cloudprovider.ICloudProviderFactory, error)

func (*SCloudprovider) SyncCustomCloudpoliciesForCloud

func (self *SCloudprovider) SyncCustomCloudpoliciesForCloud(ctx context.Context, clouduser *SClouduser) error

func (*SCloudprovider) SyncCustomCloudpoliciesFromCloud

func (self *SCloudprovider) SyncCustomCloudpoliciesFromCloud(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudprovider) SyncSystemCloudpoliciesForCloud

func (self *SCloudprovider) SyncSystemCloudpoliciesForCloud(ctx context.Context, clouduser *SClouduser) error

type SCloudproviderManager

type SCloudproviderManager struct {
	db.SStandaloneResourceBaseManager
}

+onecloud:swagger-gen-ignore

var CloudproviderManager *SCloudproviderManager

func (*SCloudproviderManager) FetchProvider

func (manager *SCloudproviderManager) FetchProvider(ctx context.Context, id string) (*SCloudprovider, error)

type SCloudproviderResourceBase

type SCloudproviderResourceBase struct {
	// 子订阅Id
	CloudproviderId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"cloudprovider_id"`
}

type SCloudproviderResourceBaseManager

type SCloudproviderResourceBaseManager struct {
}

func (*SCloudproviderResourceBaseManager) FetchCustomizeColumns

func (manager *SCloudproviderResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudproviderResourceDetails

func (*SCloudproviderResourceBaseManager) ListItemFilter

type SCloudrole

type SCloudrole struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SCloudaccountResourceBase
	SAMLProviderResourceBase
	SCloudgroupResourceBase

	Document *jsonutils.JSONDict `length:"long" charset:"ascii" list:"domain" update:"domain" create:"domain_required"`
	OwnerId  string              `width:"128" charset:"ascii" index:"true" list:"user" nullable:"false" create:"optional"`
}

func (*SCloudrole) CustomizeDelete

func (self *SCloudrole) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除公有云角色

func (*SCloudrole) GetCloudpolicies

func (self *SCloudrole) GetCloudpolicies() ([]SCloudpolicy, error)

func (*SCloudrole) GetICloudrole

func (self *SCloudrole) GetICloudrole() (cloudprovider.ICloudrole, error)

func (*SCloudrole) PerformPurge

清除角色(不删除云上资源)

func (*SCloudrole) RealDelete

func (self *SCloudrole) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudrole) StartCloudroleDeleteTask

func (self *SCloudrole) StartCloudroleDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, purge bool, parentTaskId string) error

func (*SCloudrole) SyncRoles

func (self *SCloudrole) SyncRoles() error

type SCloudroleManager

var CloudroleManager *SCloudroleManager

func (*SCloudroleManager) FetchCustomizeColumns

func (manager *SCloudroleManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.CloudroleDetails

获取公有云角色详情

func (*SCloudroleManager) ListItemFilter

func (manager *SCloudroleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.CloudroleListInput) (*sqlchemy.SQuery, error)

公有云角色列表

type SClouduser

type SClouduser struct {
	db.SStatusDomainLevelUserResourceBase
	db.SExternalizedResourceBase
	SCloudaccountResourceBase

	Secret string `length:"0" charset:"ascii" nullable:"true" list:"user" create:"domain_optional"`
	// 是否可以控制台登录
	IsConsoleLogin tristate.TriState `default:"false" list:"user" create:"optional"`
	// 手机号码
	MobilePhone string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"domain_optional"`
	// 邮箱地址
	Email string `width:"36" charset:"ascii" list:"user" create:"domain_optional"`
}

func (*SClouduser) CustomizeDelete

func (self *SClouduser) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除公有云用户

func (*SClouduser) Delete

func (self *SClouduser) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClouduser) GetCloudgorupPoliciesQuery

func (self *SClouduser) GetCloudgorupPoliciesQuery(policyType string) *sqlchemy.SQuery

func (*SClouduser) GetCloudgroupCount

func (self *SClouduser) GetCloudgroupCount() (int, error)

func (*SClouduser) GetCloudgroupPolicies

func (self *SClouduser) GetCloudgroupPolicies() ([]SCloudpolicy, error)

func (*SClouduser) GetCloudgroupQuery

func (self *SClouduser) GetCloudgroupQuery() *sqlchemy.SQuery

func (*SClouduser) GetCloudgroupcaches

func (self *SClouduser) GetCloudgroupcaches() ([]SCloudgroupcache, error)

func (*SClouduser) GetCloudgroups

func (self *SClouduser) GetCloudgroups() ([]SCloudgroup, error)

func (*SClouduser) GetCloudpolicies

func (self *SClouduser) GetCloudpolicies(providerId string) ([]SCloudpolicy, error)

func (*SClouduser) GetCloudpolicy

func (self *SClouduser) GetCloudpolicy(policyId string, providerId string) ([]SCloudpolicy, error)

func (*SClouduser) GetCloudpolicyCount

func (self *SClouduser) GetCloudpolicyCount() (int, error)

func (*SClouduser) GetCloudpolicyQuery

func (self *SClouduser) GetCloudpolicyQuery(providerId string) *sqlchemy.SQuery

func (*SClouduser) GetClouduserPolicies

func (self *SClouduser) GetClouduserPolicies() ([]SClouduserPolicy, error)

func (*SClouduser) GetCustomCloudgroupPolicies

func (self *SClouduser) GetCustomCloudgroupPolicies() ([]SCloudpolicy, error)

func (*SClouduser) GetCustomCloudpolicies

func (self *SClouduser) GetCustomCloudpolicies(cloudproviderId string) ([]SCloudpolicy, error)

func (*SClouduser) GetCustomCloudpolicycaches

func (self *SClouduser) GetCustomCloudpolicycaches(cloudproviderId string) ([]SCloudpolicycache, error)

func (*SClouduser) GetDetailsAccessKeys

func (self *SClouduser) GetDetailsAccessKeys(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SClouduser) GetIClouduser

func (self *SClouduser) GetIClouduser() (cloudprovider.IClouduser, error)

func (*SClouduser) GetPassword

func (self *SClouduser) GetPassword() (string, error)

func (*SClouduser) GetSystemCloudgroupPolicies

func (self *SClouduser) GetSystemCloudgroupPolicies() ([]SCloudpolicy, error)

func (*SClouduser) GetSystemCloudpolicies

func (self *SClouduser) GetSystemCloudpolicies(cloudproviderId string) ([]SCloudpolicy, error)

func (*SClouduser) PerformAttachPolicy

绑定用户权限 用户状态必须为: available

func (*SClouduser) PerformChangeOwner

变更子账号所属本地用户

func (*SClouduser) PerformCreateAccessKey

func (*SClouduser) PerformDeleteAccessKey

func (*SClouduser) PerformDetachPolicy

解绑用户权限 用户状态必须为: available

func (*SClouduser) PerformJoinGroup

将用户加入权限组 用户状态必须为: available

func (*SClouduser) PerformLeaveGroup

将用户从权限组中移除 用户状态必须为: available

func (*SClouduser) PerformResetPassword

重置用户密码 用户状态必须为: available

func (*SClouduser) PerformSetGroups

设置用户权限组列表(全量覆盖) 用户状态必须为: available

func (*SClouduser) PerformSetPolicies

设置用户权限列表(全量覆盖) 用户状态必须为: available

func (*SClouduser) PerformSync

同步用户权限和权限组到云上 用户状态必须为: available

func (*SClouduser) PerformSyncstatus

同步用户状态

func (*SClouduser) PostCreate

func (*SClouduser) RealDelete

func (self *SClouduser) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClouduser) SavePassword

func (self *SClouduser) SavePassword(password string) error

func (*SClouduser) StartClouduserDeleteTask

func (self *SClouduser) StartClouduserDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SClouduser) StartClouduserResetPasswordTask

func (self *SClouduser) StartClouduserResetPasswordTask(ctx context.Context, userCred mcclient.TokenCredential, password string, parentTaskId string) error

func (*SClouduser) StartClouduserSyncGroupsTask

func (self *SClouduser) StartClouduserSyncGroupsTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SClouduser) StartClouduserSyncPoliciesTask

func (self *SClouduser) StartClouduserSyncPoliciesTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SClouduser) StartClouduserSyncTask

func (self *SClouduser) StartClouduserSyncTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SClouduser) StartClouduserSyncstatusTask

func (self *SClouduser) StartClouduserSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SClouduser) SyncCloudgroups

func (self *SClouduser) SyncCloudgroups(ctx context.Context, userCred mcclient.TokenCredential, iGroups []cloudprovider.ICloudgroup) compare.SyncResult

func (*SClouduser) SyncCustomCloudpolicies

func (self *SClouduser) SyncCustomCloudpolicies(ctx context.Context, userCred mcclient.TokenCredential, iPolicies []cloudprovider.ICloudpolicy, cloudproviderId string) compare.SyncResult

func (*SClouduser) SyncCustomCloudpoliciesForCloud

func (self *SClouduser) SyncCustomCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClouduser) SyncSystemCloudpolicies

func (self *SClouduser) SyncSystemCloudpolicies(ctx context.Context, userCred mcclient.TokenCredential, iPolicies []cloudprovider.ICloudpolicy, cloudproviderId string) compare.SyncResult

func (*SClouduser) SyncSystemCloudpoliciesForCloud

func (self *SClouduser) SyncSystemCloudpoliciesForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

将本地的权限推送到云上(覆盖云上设置)

func (*SClouduser) SyncWithClouduser

func (self *SClouduser) SyncWithClouduser(ctx context.Context, userCred mcclient.TokenCredential, iUser cloudprovider.IClouduser) error

func (*SClouduser) ValidateUpdateData

+onecloud:swagger-gen-ignore

type SClouduserJointsBase

type SClouduserJointsBase struct {
	db.SJointResourceBase

	SClouduserResourceBase
}

func (*SClouduserJointsBase) GetClouduser

func (self *SClouduserJointsBase) GetClouduser() (*SClouduser, error)

func (*SClouduserJointsBase) ValidateUpdateData

type SClouduserJointsManager

type SClouduserJointsManager struct {
	db.SJointResourceBaseManager
	SClouduserResourceBaseManager
}

func NewClouduserJointsManager

func NewClouduserJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SClouduserJointsManager

func (*SClouduserJointsManager) FetchCustomizeColumns

func (manager *SClouduserJointsManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ClouduserJointResourceDetails

func (*SClouduserJointsManager) GetMasterFieldName

func (manager *SClouduserJointsManager) GetMasterFieldName() string

func (*SClouduserJointsManager) ListItemExportKeys

func (*SClouduserJointsManager) ListItemFilter

func (*SClouduserJointsManager) OrderByExtraFields

func (manager *SClouduserJointsManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ClouduserJointsListInput,
) (*sqlchemy.SQuery, error)

type SClouduserManager

var ClouduserManager *SClouduserManager

func (*SClouduserManager) EnableGenerateName

func (manager *SClouduserManager) EnableGenerateName() bool

func (*SClouduserManager) FetchCustomizeColumns

func (manager *SClouduserManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ClouduserDetails

获取公有云用户详情

func (*SClouduserManager) FetchUniqValues

func (manager *SClouduserManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SClouduserManager) FilterByUniqValues

func (manager *SClouduserManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SClouduserManager) GetIVirtualModelManager

func (manager *SClouduserManager) GetIVirtualModelManager() db.IVirtualModelManager

func (*SClouduserManager) GetResourceCount

func (manager *SClouduserManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SClouduserManager) ListItemFilter

func (manager *SClouduserManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ClouduserListInput) (*sqlchemy.SQuery, error)

公有云用户列表

func (*SClouduserManager) OrderByExtraFields

func (manager *SClouduserManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ClouduserListInput,
) (*sqlchemy.SQuery, error)

func (*SClouduserManager) QueryDistinctExtraField

func (manager *SClouduserManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SClouduserManager) ValidateCreateData

创建公有云用户

type SClouduserPolicy

func (*SClouduserPolicy) CustomizeDelete

func (self *SClouduserPolicy) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

+onecloud:swagger-gen-ignore

func (*SClouduserPolicy) Delete

func (self *SClouduserPolicy) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClouduserPolicy) Detach

func (self *SClouduserPolicy) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClouduserPolicy) ValidateUpdateData

func (self *SClouduserPolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)

+onecloud:swagger-gen-ignore

type SClouduserPolicyManager

+onecloud:swagger-gen-ignore

var ClouduserPolicyManager *SClouduserPolicyManager

func (*SClouduserPolicyManager) FetchCustomizeColumns

func (manager *SClouduserPolicyManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ClouduserPolicyDetails

获取公有云用户权限详情

func (*SClouduserPolicyManager) GetSlaveFieldName

func (manager *SClouduserPolicyManager) GetSlaveFieldName() string

func (*SClouduserPolicyManager) InitializeData

func (manager *SClouduserPolicyManager) InitializeData() error

func (*SClouduserPolicyManager) ListItemExportKeys

func (*SClouduserPolicyManager) ListItemFilter

公有云用户权限列表

func (*SClouduserPolicyManager) OrderByExtraFields

func (manager *SClouduserPolicyManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ClouduserPolicyListInput,
) (*sqlchemy.SQuery, error)

func (*SClouduserPolicyManager) ValidateCreateData

+onecloud:swagger-gen-ignore

type SClouduserResourceBase

type SClouduserResourceBase struct {
	ClouduserId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

type SClouduserResourceBaseManager

type SClouduserResourceBaseManager struct {
}

func (*SClouduserResourceBaseManager) FetchCustomizeColumns

func (manager *SClouduserResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ClouduserResourceDetails

func (*SClouduserResourceBaseManager) ListItemFilter

type SHuaweiSAMLDriver

type SHuaweiSAMLDriver struct {
	EntityId         string
	MetadataFileName string
	MetadataUrl      string
}

func (*SHuaweiSAMLDriver) GetEntityID

func (d *SHuaweiSAMLDriver) GetEntityID() string

func (*SHuaweiSAMLDriver) GetIdpInitiatedLoginData

func (d *SHuaweiSAMLDriver) GetIdpInitiatedLoginData(ctx context.Context, userCred mcclient.TokenCredential, cloudAccountId string, sp *idp.SSAMLServiceProvider, redirectUrl string) (samlutils.SSAMLIdpInitiatedLoginData, error)

func (*SHuaweiSAMLDriver) GetMetadataFilename

func (d *SHuaweiSAMLDriver) GetMetadataFilename() string

func (*SHuaweiSAMLDriver) GetMetadataUrl

func (d *SHuaweiSAMLDriver) GetMetadataUrl() string

func (*SHuaweiSAMLDriver) GetSpInitiatedLoginData

func (d *SHuaweiSAMLDriver) GetSpInitiatedLoginData(ctx context.Context, userCred mcclient.TokenCredential, cloudAccountId string, sp *idp.SSAMLServiceProvider) (samlutils.SSAMLSpInitiatedLoginData, error)

type SSAMLProvider

type SSAMLProvider struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SCloudaccountResourceBase

	EntityId         string `get:"domain" create:"domain_optional" list:"domain"`
	MetadataDocument string `get:"domain" create:"domain_optional"`
	AuthUrl          string `width:"512" charset:"ascii" get:"domain" list:"domain"`
}

func (*SSAMLProvider) CustomizeDelete

func (self *SSAMLProvider) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

删除

func (*SSAMLProvider) Delete

func (self *SSAMLProvider) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSAMLProvider) GetMetadataDocument

func (self *SSAMLProvider) GetMetadataDocument() (samlutils.EntityDescriptor, error)

func (*SSAMLProvider) IsNeedUpldateMetadata

func (self *SSAMLProvider) IsNeedUpldateMetadata() bool

func (*SSAMLProvider) PostCreate

func (*SSAMLProvider) RealDelete

func (self *SSAMLProvider) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSAMLProvider) StartSAMLProviderCreateTask

func (self *SSAMLProvider) StartSAMLProviderCreateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSAMLProvider) StartSAMLProviderDeleteTask

func (self *SSAMLProvider) StartSAMLProviderDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SSAMLProvider) StartSAMLProviderSyncTask

func (self *SSAMLProvider) StartSAMLProviderSyncTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSAMLProvider) StartSAMLProviderUpdateMetadataTask

func (self *SSAMLProvider) StartSAMLProviderUpdateMetadataTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSAMLProvider) SyncWithCloudSAMLProvider

func (self *SSAMLProvider) SyncWithCloudSAMLProvider(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudSAMLProvider) error

type SSAMLProviderManager

var SAMLProviderManager *SSAMLProviderManager

func (*SSAMLProviderManager) FetchCustomizeColumns

func (manager *SSAMLProviderManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SAMLProviderDetails

func (*SSAMLProviderManager) FetchUniqValues

func (manager *SSAMLProviderManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SSAMLProviderManager) FilterByUniqValues

func (manager *SSAMLProviderManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SSAMLProviderManager) GetIVirtualModelManager

func (manager *SSAMLProviderManager) GetIVirtualModelManager() db.IVirtualModelManager

func (*SSAMLProviderManager) GetResourceCount

func (manager *SSAMLProviderManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SSAMLProviderManager) ListItemFilter

公有云身份提供商列表

func (*SSAMLProviderManager) ValidateCreateData

创建云账号的身份提供商

type SSamluser

type SSamluser struct {
	db.SStatusDomainLevelUserResourceBase
	db.SExternalizedResourceBase
	SCloudgroupResourceBase
	SCloudaccountResourceBase

	// 邮箱地址
	Email string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"domain_optional"`
}

func (*SSamluser) SyncAzureGroup

func (self *SSamluser) SyncAzureGroup() error

type SSamluserManager

var SamluserManager *SSamluserManager

func (*SSamluserManager) FetchCustomizeColumns

func (manager *SSamluserManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SamluserDetails

func (*SSamluserManager) FetchUniqValues

func (manager *SSamluserManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SSamluserManager) FilterByUniqValues

func (manager *SSamluserManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SSamluserManager) GetIVirtualModelManager

func (manager *SSamluserManager) GetIVirtualModelManager() db.IVirtualModelManager

func (*SSamluserManager) GetResourceCount

func (manager *SSamluserManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SSamluserManager) ListItemFilter

func (manager *SSamluserManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.SamluserListInput) (*sqlchemy.SQuery, error)

SAML认证用户列表

func (*SSamluserManager) ValidateCreateData

创建SAML认证用户

type SamlInstance

type SamlInstance func() *idp.SSAMLIdpInstance
var (
	SamlIdpInstance SamlInstance = nil
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL