Documentation ¶
Index ¶
- Constants
- Variables
- func ApplySchedPolicies(params *jsonutils.JSONDict) *jsonutils.JSONDict
- func AttachUsageQuery(q *sqlchemy.SQuery, hosts *sqlchemy.SSubQuery, ...) *sqlchemy.SQuery
- func ConvertStorageInfo2BaremetalStorages(storageInfo jsonutils.JSONObject) []*baremetal.BaremetalStorage
- func GetAllModelSpecs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func GetDiskSpecV2(storageInfo jsonutils.JSONObject) jsonutils.JSONObject
- func GetHostSpecs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func GetIPTenantIdPairs()
- func GetIsolatedDeviceSpecs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func GetModelsSpecs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func GetServerSpecs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func InitDB() error
- func RegisterGuestDriver(driver IGuestDriver)
- func RegisterHostDriver(driver IHostDriver)
- func RunBatchCreateTask(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ...)
- func ValidateScheduleCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func ValidateSnapshotName(hypervisor, name, owner string) error
- type DNSUpdateKeySecret
- type DiskInfo
- type DnsIp
- type EipUsage
- type GuestnicsCount
- type HostStat
- type HostsCountStat
- type IGuestDriver
- type IHostDriver
- type ILoadbalancerSubResourceManager
- type IPAddlocationDirection
- type ISpecModel
- type ISpecModelManager
- type IsolatedDeviceCountStat
- type NetworkPortStat
- type SAccount
- type SBaremetalagent
- func (self *SBaremetalagent) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SBaremetalagent) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SBaremetalagent) AllowPerformOffline(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SBaremetalagent) AllowPerformOnline(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SBaremetalagent) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SBaremetalagent) GetZone() *SZone
- func (self *SBaremetalagent) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SBaremetalagent) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SBaremetalagent) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SBaremetalagent) PerformOnline(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SBaremetalagent) ValidateDeleteCondition(ctx context.Context) error
- func (self *SBaremetalagent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SBaremetalagentManager
- type SBillingResourceBase
- type SCachedimage
- func (self *SCachedimage) AllowPerformRefresh(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCachedimage) ChooseSourceStoragecacheInRange(hostType string, excludes []string, rangeObjs interface{}) (*SStoragecachedimage, error)
- func (self *SCachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCachedimage) PerformRefresh(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCachedimage) ValidateDeleteCondition(ctx context.Context) error
- type SCachedimageManager
- type SCapabilities
- type SCloudaccount
- func (self *SCloudaccount) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudaccount) AllowPerformImport(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudaccount) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudaccount) AllowPerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudaccount) CanSync() bool
- func (self *SCloudaccount) GetBalance() (float64, error)
- func (self *SCloudaccount) GetCloudproviders() []SCloudprovider
- func (self *SCloudaccount) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudaccount) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) GetDriver() (cloudprovider.ICloudProvider, error)
- func (self *SCloudaccount) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudaccount) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (self *SCloudaccount) ImportSubAccount(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SCloudprovider, bool, error)
- func (self *SCloudaccount) MarkStartSync(userCred mcclient.TokenCredential)
- func (self *SCloudaccount) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) PerformImport(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudaccount) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SCloudaccount) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (self *SCloudaccount) SaveSysInfo(info jsonutils.JSONObject)
- func (self *SCloudaccount) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SCloudaccount) ValidateDeleteCondition(ctx context.Context) error
- func (self *SCloudaccount) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SCloudaccountManager
- func (manager *SCloudaccountManager) FetchCloudaccountById(accountId string) *SCloudaccount
- func (manager *SCloudaccountManager) FetchCloudaccountByIdOrName(accountId string) *SCloudaccount
- func (manager *SCloudaccountManager) InitializeData() error
- func (manager *SCloudaccountManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SCloudprovider
- func (self *SCloudprovider) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) AllowPerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) CanSync() bool
- func (self *SCloudprovider) GetBalance() (float64, error)
- func (self *SCloudprovider) GetCloudaccount() *SCloudaccount
- func (self *SCloudprovider) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudprovider) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudprovider) GetDriver() (cloudprovider.ICloudProvider, error)
- func (self *SCloudprovider) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudprovider) GetGuestCount() int
- func (self *SCloudprovider) GetHostCount() int
- func (self *SCloudprovider) GetOwnerProjectId() string
- func (self *SCloudprovider) MarkStartSync(userCred mcclient.TokenCredential)
- func (self *SCloudprovider) PerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudprovider) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudprovider) SaveSysInfo(info jsonutils.JSONObject)
- func (self *SCloudprovider) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, syncRange *SSyncRange, ...) error
- func (self *SCloudprovider) ValidateDeleteCondition(ctx context.Context) error
- func (self *SCloudprovider) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SCloudproviderManager
- func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider
- func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider
- func (manager *SCloudproviderManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
- func (manager *SCloudproviderManager) InitializeData() error
- func (self *SCloudproviderManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SCloudproviderUsage
- type SCloudregion
- func (self *SCloudregion) AllowPerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudregion) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SCloudregion) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudregion) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SCloudregion) GetGuestCount(increment bool) int
- func (self *SCloudregion) GetVpcCount() int
- func (self *SCloudregion) GetZoneCount() int
- func (self *SCloudregion) PerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudregion) ValidateDeleteCondition(ctx context.Context) error
- func (self *SCloudregion) ValidateUpdateCondition(ctx context.Context) error
- type SCloudregionManager
- func (manager *SCloudregionManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SCloudregionManager) FetchRegionById(id string) *SCloudregion
- func (manager *SCloudregionManager) InitializeData() error
- func (manager *SCloudregionManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SCloudregionManager) SyncRegions(ctx context.Context, userCred mcclient.TokenCredential, provider string, ...) ([]SCloudregion, []cloudprovider.ICloudRegion, compare.SyncResult)
- func (manager *SCloudregionManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SDeployConfig
- type SDisk
- func (self *SDisk) AllowGetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformResize(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) AllowPerformSave(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDisk) CleanUpDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, snapshot *SSnapshot) error
- func (self *SDisk) ClearHostSchedCache() error
- func (self *SDisk) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SDisk) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SDisk) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SDisk) GetAttachedGuests() []SGuest
- func (self *SDisk) GetCloudprovider() *SCloudprovider
- func (self *SDisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SDisk) GetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SDisk) GetFetchUrl() string
- func (self *SDisk) GetFsFormat() string
- func (self *SDisk) GetGuestDiskCount() int
- func (self *SDisk) GetGuestdisks() []SGuestdisk
- func (self *SDisk) GetGuests() []SGuest
- func (self *SDisk) GetGuestsCount() int
- func (self *SDisk) GetIDisk() (cloudprovider.ICloudDisk, error)
- func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
- func (self *SDisk) GetMountPoint() string
- func (self *SDisk) GetPathAtHost(host *SHost) string
- func (self *SDisk) GetRuningGuestCount() int
- func (self *SDisk) GetShortDesc() *jsonutils.JSONDict
- func (self *SDisk) GetSnapshotCount() int
- func (self *SDisk) GetStorage() *SStorage
- func (self *SDisk) GetTemplateId() string
- func (self *SDisk) GetZone() *SZone
- func (self *SDisk) IsLocal() bool
- func (self *SDisk) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PerformResize(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PerformSave(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDisk) PrepareSaveImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (string, error)
- func (self *SDisk) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SDisk) SetDiskReady(ctx context.Context, userCred mcclient.TokenCredential, reason string)
- func (disk *SDisk) SetStorageByHost(hostId string, diskConfig *SDiskConfig) error
- func (self *SDisk) StartAllocate(ctx context.Context, host *SHost, storage *SStorage, taskId string, ...) error
- func (self *SDisk) StartDiskCreateTask(ctx context.Context, userCred mcclient.TokenCredential, rebuild bool, ...) error
- func (self *SDisk) StartDiskDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, ...) error
- func (self *SDisk) StartDiskResizeTask(ctx context.Context, userCred mcclient.TokenCredential, size int64, ...) error
- func (self *SDisk) StartDiskSaveTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SDisk) StartResetDisk(ctx context.Context, userCred mcclient.TokenCredential, snapshotId string, ...) error
- func (self *SDisk) ToDiskInfo() DiskInfo
- func (self *SDisk) ValidateDeleteCondition(ctx context.Context) error
- func (self *SDisk) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SDiskConfig
- type SDiskManager
- func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential)
- func (manager *SDiskManager) CleanPendingDeleteDisks(ctx context.Context, userCred mcclient.TokenCredential)
- func (manager *SDiskManager) GetContextManager() []db.IModelManager
- func (manager *SDiskManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SDiskManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ...)
- func (manager *SDiskManager) SyncDisks(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, ...) ([]SDisk, []cloudprovider.ICloudDisk, compare.SyncResult)
- func (manager *SDiskManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SDnsRecord
- func (rec *SDnsRecord) AddInfo(userCred mcclient.TokenCredential, data jsonutils.JSONObject) error
- func (rec *SDnsRecord) AllowPerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (rec *SDnsRecord) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (rec *SDnsRecord) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (rec *SDnsRecord) AllowPerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (rec *SDnsRecord) GetInfo() []string
- func (rec *SDnsRecord) PerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rec *SDnsRecord) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rec *SDnsRecord) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rec *SDnsRecord) PerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rec *SDnsRecord) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SDnsRecordManager
- func (man *SDnsRecordManager) GetRecordsLimit() int
- func (man *SDnsRecordManager) GetRecordsSeparator() string
- func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) ([]string, error)
- func (man *SDnsRecordManager) QueryDns(projectId, name string) *SDnsRecord
- func (man *SDnsRecordManager) QueryDnsIps(projectId, name, kind string) []*DnsIp
- func (man *SDnsRecordManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SDynamicschedtag
- func (self *SDynamicschedtag) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SDynamicschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SDynamicschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SDynamicschedtag) PerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SDynamicschedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SDynamicschedtagManager
- type SElasticip
- func (self *SElasticip) AllowPerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SElasticip) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SElasticip) AllowPerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SElasticip) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SElasticip) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SElasticip) AssociateVM(userCred mcclient.TokenCredential, vm *SGuest) error
- func (self *SElasticip) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SElasticip) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SElasticip) Dissociate(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SElasticip) DoChangeBandwidth(userCred mcclient.TokenCredential, bandwidth int) error
- func (self *SElasticip) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (self *SElasticip) GetAssociateVM() *SGuest
- func (self *SElasticip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SElasticip) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SElasticip) GetIEip() (cloudprovider.ICloudEIP, error)
- func (self *SElasticip) GetIRegion() (cloudprovider.ICloudRegion, error)
- func (self *SElasticip) GetRegion() *SCloudregion
- func (self *SElasticip) GetShortDesc() *jsonutils.JSONDict
- func (self *SElasticip) PerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SElasticip) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SElasticip) PerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SElasticip) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SElasticip) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SElasticip) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SElasticip) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SElasticip) StartEipAssociateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SElasticip) StartEipChangeBandwidthTask(ctx context.Context, userCred mcclient.TokenCredential, bandwidth int64) error
- func (self *SElasticip) StartEipDeallocateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SElasticip) StartEipDissociateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SElasticip) StartEipSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SElasticip) SyncInstanceWithCloudEip(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SElasticip) SyncWithCloudEip(userCred mcclient.TokenCredential, ext cloudprovider.ICloudEIP, ...) error
- func (self *SElasticip) ValidateDeleteCondition(ctx context.Context) error
- type SElasticipManager
- func (manager *SElasticipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SElasticipManager) SyncEips(ctx context.Context, userCred mcclient.TokenCredential, ...) compare.SyncResult
- func (manager *SElasticipManager) TotalCount(projectId string, rangeObj db.IStandaloneModel, hostTypes []string) EipUsage
- func (manager *SElasticipManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SGroup
- type SGroupJointsBase
- type SGroupJointsManager
- type SGroupManager
- type SGroupguest
- func (self *SGroupguest) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGroupguest) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGroupguest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGroupguest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGroupguest) GetGuest() *SGuest
- func (joint *SGroupguest) Master() db.IStandaloneModel
- func (joint *SGroupguest) Slave() db.IStandaloneModel
- type SGroupguestManager
- type SGroupnetwork
- func (self *SGroupnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGroupnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGroupnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGroupnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (joint *SGroupnetwork) Master() db.IStandaloneModel
- func (joint *SGroupnetwork) Slave() db.IStandaloneModel
- type SGroupnetworkManager
- type SGuest
- func (self *SGuest) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowGetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowGetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SGuest) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformReset(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformRestart(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformStart(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformStop(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) AllowPerformUserData(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuest) Attach2Network(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork, ...) error
- func (self *SGuest) AttachDisk(disk *SDisk, userCred mcclient.TokenCredential, driver string, cache string, ...) error
- func (self *SGuest) CategorizeDisks() SGuestDiskCategory
- func (self *SGuest) CategorizeNics() SGuestNicCategory
- func (self *SGuest) CheckQemuVersion(qemuVer, compareVer string) bool
- func (self *SGuest) CreateDisksOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, ...) error
- func (self *SGuest) CreateIsolatedDeviceOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, ...) error
- func (self *SGuest) CreateNetworksOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, ...) error
- func (guest *SGuest) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SGuest) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) DeleteAllDisksInDB(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) DeleteEip(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) DetachAllNetworks(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) DetachDisk(ctx context.Context, disk *SDisk, userCred mcclient.TokenCredential)
- func (guest *SGuest) DiskCount() int
- func (self *SGuest) DoCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (self *SGuest) EjectIso(userCred mcclient.TokenCredential) bool
- func (self *SGuest) FillDiskSchedDesc(desc *jsonutils.JSONDict)
- func (self *SGuest) FillGroupSchedDesc(desc *jsonutils.JSONDict)
- func (self *SGuest) FillNetSchedDesc(desc *jsonutils.JSONDict)
- func (self *SGuest) GetApptags() []string
- func (self *SGuest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGuest) GetDeployConfigOnHost(ctx context.Context, host *SHost, params *jsonutils.JSONDict) *jsonutils.JSONDict
- func (self *SGuest) GetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) GetDetailsIso(userCred mcclient.TokenCredential) jsonutils.JSONObject
- func (self *SGuest) GetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (guest *SGuest) GetDisks() []SGuestdisk
- func (guest *SGuest) GetDisksQuery() *sqlchemy.SQuery
- func (guest *SGuest) GetDriver() IGuestDriver
- func (self *SGuest) GetEip() (*SElasticip, error)
- func (self *SGuest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (guest *SGuest) GetGroups() []SGroupguest
- func (guest *SGuest) GetGuestDisk(diskId string) *SGuestdisk
- func (guest *SGuest) GetHost() *SHost
- func (guest *SGuest) GetHostType() string
- func (guest *SGuest) GetHypervisor() string
- func (self *SGuest) GetIVM() (cloudprovider.ICloudVM, error)
- func (self *SGuest) GetIsolatedDevices() []SIsolatedDevice
- func (self *SGuest) GetJsonDescAtBaremetal(ctx context.Context, host *SHost) *jsonutils.JSONDict
- func (self *SGuest) GetJsonDescAtHypervisor(ctx context.Context, host *SHost) *jsonutils.JSONDict
- func (self *SGuest) GetKeypairPublicKey() string
- func (guest *SGuest) GetNetworks() []SGuestnetwork
- func (guest *SGuest) GetNetworksQuery() *sqlchemy.SQuery
- func (self *SGuest) GetOS() string
- func (self *SGuest) GetQemuVersion(userCred mcclient.TokenCredential) string
- func (self *SGuest) GetRealIps() []string
- func (self *SGuest) GetSecRules() []secrules.SecurityRule
- func (self *SGuest) GetSecgroupName() string
- func (self *SGuest) GetShortDesc() *jsonutils.JSONDict
- func (self *SGuest) GetSpec(checkStatus bool) *jsonutils.JSONDict
- func (self *SGuest) GetTemplateId() string
- func (self *SGuest) GetVdi() string
- func (self *SGuest) InsertIsoSucc(imageId string, path string, size int, name string) bool
- func (self *SGuest) IsExitOnly() bool
- func (self *SGuest) IsLegalKey(key string) bool
- func (self *SGuest) IsLinux() bool
- func (guest *SGuest) IsNetworkAllocated() bool
- func (self *SGuest) IsWindows() bool
- func (self *SGuest) JoinGroups(userCred mcclient.TokenCredential, params *jsonutils.JSONDict)
- func (self *SGuest) LeaveAllGroups(userCred mcclient.TokenCredential)
- func (guest *SGuest) NetworkCount() int
- func (self *SGuest) NotifyAdminServerEvent(ctx context.Context, event string, priority string) error
- func (self *SGuest) NotifyServerEvent(event string, priority string, loginInfo bool) error
- func (self *SGuest) PerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformRestart(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformStop(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SGuest) PerformUserData(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (guest *SGuest) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SGuest) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuest) SaveDeployInfo(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (self *SGuest) SendMonitorCommand(ctx context.Context, userCred mcclient.TokenCredential, cmd string) (jsonutils.JSONObject, error)
- func (self *SGuest) SetDisableDelete(val bool) error
- func (guest *SGuest) SetHostId(hostId string) error
- func (self *SGuest) StartAutoDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SGuest) StartChangeConfigTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, ...) error
- func (self *SGuest) StartDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestCreateDiskTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestCreateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestDeployTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestLiveMigrateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartGuestStopTask(ctx context.Context, userCred mcclient.TokenCredential, isForce bool, ...) error
- func (self *SGuest) StartGueststartTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SGuest) StartInsertIsoTask(ctx context.Context, imageId string, hostId string, ...) error
- func (self *SGuest) StartMigrateTask(ctx context.Context, userCred mcclient.TokenCredential, isRescueMode bool, ...) error
- func (self *SGuest) StartRebuildRootTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, ...) error
- func (self *SGuest) StartSuspendTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SGuest) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, fw_only bool, ...) error
- func (self *SGuest) StartSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SGuest) StartUndeployGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, ...) error
- func (self *SGuest) SyncVMDisks(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, ...) compare.SyncResult
- func (self *SGuest) SyncVMEip(ctx context.Context, userCred mcclient.TokenCredential, ...) compare.SyncResult
- func (self *SGuest) SyncVMNics(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, ...) compare.SyncResult
- func (self *SGuest) ToSchedDesc() *jsonutils.JSONDict
- func (self *SGuest) ValidateAttachDisk(ctx context.Context, disk *SDisk) error
- func (guest *SGuest) ValidateDeleteCondition(ctx context.Context) error
- func (guest *SGuest) ValidateResizeDisk(disk *SDisk, storage *SStorage) error
- func (self *SGuest) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (self *SGuest) VerifySendKeys(keyStr string) error
- type SGuestCountStat
- type SGuestDiskCategory
- type SGuestJointsBase
- type SGuestJointsManager
- type SGuestManager
- func (manager *SGuestManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SGuestManager) CleanPendingDeleteServers(ctx context.Context, userCred mcclient.TokenCredential)
- func (manager *SGuestManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
- func (manager *SGuestManager) FetchGuestById(guestId string) *SGuest
- func (manager *SGuestManager) GetExportExtraKeys(ctx context.Context, query jsonutils.JSONObject, rowMap map[string]string) *jsonutils.JSONDict
- func (manager *SGuestManager) GetIpInProjectWithName(projectId, name string, isExitOnly bool) []string
- func (manager *SGuestManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
- func (manager *SGuestManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SGuestManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SGuestManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ...)
- func (manager *SGuestManager) TotalCount(projectId string, rangeObj db.IStandaloneModel, status []string, ...) SGuestCountStat
- func (manager *SGuestManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SGuestNicCategory
- type SGuestcdrom
- type SGuestcdromManager
- type SGuestdisk
- func (self *SGuestdisk) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuestdisk) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuestdisk) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuestdisk) DoSave(driver string, cache string, mountpoint string) error
- func (self *SGuestdisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGuestdisk) GetDetailedJson() *jsonutils.JSONDict
- func (self *SGuestdisk) GetDetailedString() string
- func (self *SGuestdisk) GetDisk() *SDisk
- func (self *SGuestdisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGuestdisk) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject
- func (joint *SGuestdisk) Master() db.IStandaloneModel
- func (joint *SGuestdisk) Slave() db.IStandaloneModel
- func (self *SGuestdisk) ToDiskInfo() DiskInfo
- func (self *SGuestdisk) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SGuestdiskManager
- type SGuestnetwork
- func (gn *SGuestnetwork) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SGuestnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuestnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SGuestnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGuestnetwork) GetDetailedString() string
- func (self *SGuestnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SGuestnetwork) GetFreeIfname(network *SNetwork, ifTable map[string]bool) string
- func (self *SGuestnetwork) GetGuest() *SGuest
- func (self *SGuestnetwork) GetIfname() string
- func (self *SGuestnetwork) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject
- func (gn *SGuestnetwork) GetNetwork() *SNetwork
- func (self *SGuestnetwork) GetVirtualIPs() []string
- func (self *SGuestnetwork) IsAllocated() bool
- func (self *SGuestnetwork) IsExit() bool
- func (self *SGuestnetwork) LogDetachEvent(userCred mcclient.TokenCredential, guest *SGuest, network *SNetwork)
- func (joint *SGuestnetwork) Master() db.IStandaloneModel
- func (joint *SGuestnetwork) Slave() db.IStandaloneModel
- func (self *SGuestnetwork) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SGuestnetworkManager
- func (manager *SGuestnetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SGuestnetworkManager) DeleteGuestNics(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, ...) error
- func (manager *SGuestnetworkManager) GenerateMac(netId string, suggestion string) string
- func (manager *SGuestnetworkManager) GetGuestByAddress(address string) *SGuest
- type SHost
- func (self *SHost) AllowGetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformAddNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformConvertHypervisor(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformDisableNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformEnableNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformMaintenance(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformOffline(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformOnline(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformPing(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformRemoveAllNetifs(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformRemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformReset(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformStart(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformStop(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformUndoConvert(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) AllowPerformUnmaintenance(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHost) Attach2Network(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, ...) error
- func (self *SHost) Attach2Storage(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, ...) error
- func (self *SHost) Attach2Wire(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire) error
- func (self *SHost) BaremetalSyncRequest(ctx context.Context, method, url string, headers http.Header, ...) (jsonutils.JSONObject, error)
- func (self *SHost) ClearSchedDescCache() error
- func (self *SHost) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SHost) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHost) DeleteBaremetalnetwork(ctx context.Context, userCred mcclient.TokenCredential, bn *SHostnetwork, ...)
- func (self *SHost) DisableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, ...) error
- func (self *SHost) EnableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, ...) error
- func (self *SHost) FetchIpmiInfo(data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
- func (self *SHost) GetAdminNetInterface() *SNetInterface
- func (self *SHost) GetAttach2Network(network *SNetwork) *SHostnetwork
- func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity
- func (self *SHost) GetAttachedStorages(storageType string) []SStorage
- func (self *SHost) GetBaremetalServer() *SGuest
- func (self *SHost) GetBaremetalnetworks() []SHostnetwork
- func (self *SHost) GetBaremetalnetworksQuery() *sqlchemy.SQuery
- func (self *SHost) GetBaremetalstorage() *SHoststorage
- func (self *SHost) GetCPUOvercommitBound() float32
- func (self *SHost) GetCpuCount() int
- func (self *SHost) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHost) GetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) GetDriverWithDefault() IHostDriver
- func (self *SHost) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHost) GetFetchUrl() string
- func (self *SHost) GetGuestCount() int
- func (self *SHost) GetGuests() []SGuest
- func (self *SHost) GetGuestsQuery() *sqlchemy.SQuery
- func (self *SHost) GetHardwareSpecification() *jsonutils.JSONDict
- func (self *SHost) GetHostDriver() IHostDriver
- func (self *SHost) GetHostschedtags() []SHostschedtag
- func (self *SHost) GetHoststorageOfId(storageId string) *SHoststorage
- func (self *SHost) GetHoststorages() []SHoststorage
- func (self *SHost) GetHoststoragesQuery() *sqlchemy.SQuery
- func (self *SHost) GetHostwires() []SHostwire
- func (self *SHost) GetIHost() (cloudprovider.ICloudHost, error)
- func (self *SHost) GetLeastUsedStorage(backend string) *SStorage
- func (self *SHost) GetLocalStoragecache() *SStoragecache
- func (self *SHost) GetMasterHostwire() *SHostwire
- func (self *SHost) GetMasterWire() *SWire
- func (self *SHost) GetMemSize() int
- func (self *SHost) GetMemoryOvercommitBound() float32
- func (self *SHost) GetNetInterface(mac string) *SNetInterface
- func (self *SHost) GetNetInterfaces() []SNetInterface
- func (self *SHost) GetNetifName(netif *SNetInterface) string
- func (self *SHost) GetNetifsOnWire(wire *SWire) []SNetInterface
- func (self *SHost) GetNetinterfaceWithNetworkAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) (*SNetInterface, *SNetwork)
- func (self *SHost) GetNetworkWithIdAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) (*SNetwork, error)
- func (self *SHost) GetNonsystemGuestCount() int
- func (self *SHost) GetRegion() *SCloudregion
- func (self *SHost) GetRunningGuestCount() int
- func (self *SHost) GetSpec(statusCheck bool) *jsonutils.JSONDict
- func (self *SHost) GetStorageCount() int
- func (self *SHost) GetVirtualCPUCount() float32
- func (self *SHost) GetVirtualMemorySize() float32
- func (self *SHost) GetWireCount() int
- func (self *SHost) GetWiresQuery() *sqlchemy.SQuery
- func (self *SHost) GetZone() *SZone
- func (self *SHost) InitializedGuestStart(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error
- func (self *SHost) InitializedGuestStop(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error
- func (self *SHost) IsBaremetalAgentReady() bool
- func (self *SHost) PerformAddNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformConvertHypervisor(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformDisableNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformEnableNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformMaintenance(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformOnline(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformPing(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformRemoveAllNetifs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformRemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformStop(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformUndoConvert(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PerformUnmaintenance(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SHost) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SHost) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHost) RemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, ...) error
- func (self *SHost) Request(userCred mcclient.TokenCredential, method string, url string, ...) (jsonutils.JSONObject, error)
- func (self *SHost) StartBaremetalUnmaintenanceTask(ctx context.Context, userCred mcclient.TokenCredential, startGuest bool, ...) error
- func (self *SHost) StartDeleteBaremetalTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SHost) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, ...) error
- func (self *SHost) StartPrepareTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SHost) StartSyncAllGuestsStatusTask(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHost) StartSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SHost) SyncAttachedStorageStatus()
- func (self *SHost) SyncHostStorages(ctx context.Context, userCred mcclient.TokenCredential, ...) compare.SyncResult
- func (self *SHost) SyncHostVMs(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SGuest, []cloudprovider.ICloudVM, compare.SyncResult)
- func (self *SHost) SyncHostWires(ctx context.Context, userCred mcclient.TokenCredential, ...) compare.SyncResult
- func (self *SHost) UpdateDiskConfig(layouts []baremetal.Layout) error
- func (self *SHost) UpdateDnsRecord(netif *SNetInterface, isAdd bool)
- func (self *SHost) UpdateDnsRecords(isAdd bool)
- func (self *SHost) ValidateDeleteCondition(ctx context.Context) error
- func (self *SHost) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SHostGuestResourceUsage
- type SHostJointsBase
- func (self *SHostJointsBase) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHostJointsBase) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHostJointsBase) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- type SHostJointsManager
- func (manager *SHostJointsManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SHostJointsManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SHostJointsManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SHostJointsManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- type SHostManager
- func (manager *SHostManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SHostManager) AllowGetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (maanger *SHostManager) ClearAllSchedDescCache() error
- func (maanger *SHostManager) ClearSchedDescCache(hostId string) error
- func (manager *SHostManager) FetchHostById(hostId string) *SHost
- func (manager *SHostManager) GetContextManager() []db.IModelManager
- func (manager *SHostManager) GetHostsByManagerAndRegion(managerId string, regionId string) []SHost
- func (self *SHostManager) GetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SHostManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
- func (manager *SHostManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SHostManager) SyncHosts(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SHost, []cloudprovider.ICloudHost, compare.SyncResult)
- func (manager *SHostManager) TotalCount(userCred mcclient.TokenCredential, rangeObj db.IStandaloneModel, ...) HostsCountStat
- func (manager *SHostManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- func (manager *SHostManager) ValidateSizeParams(data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
- type SHostnetwork
- func (bn *SHostnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (bn *SHostnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (bn *SHostnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (bn *SHostnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (bn *SHostnetwork) GetHost() *SHost
- func (bn *SHostnetwork) GetNetInterface() *SNetInterface
- func (bn *SHostnetwork) GetNetwork() *SNetwork
- func (bn *SHostnetwork) Master() db.IStandaloneModel
- func (bn *SHostnetwork) Slave() db.IStandaloneModel
- type SHostnetworkManager
- func (man *SHostnetworkManager) GetHostByAddress(addr string) *SHost
- func (man *SHostnetworkManager) GetHostNetworkByAddress(addr string) *SHostnetwork
- func (man *SHostnetworkManager) GetNetworkByAddress(addr string) *SNetwork
- func (man *SHostnetworkManager) QueryByAddress(addr string) *sqlchemy.SQuery
- type SHostschedtag
- func (self *SHostschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHostschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHostschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHostschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (joint *SHostschedtag) Master() db.IStandaloneModel
- func (joint *SHostschedtag) Slave() db.IStandaloneModel
- type SHostschedtagManager
- type SHoststorage
- func (self *SHoststorage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHoststorage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHoststorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHoststorage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHoststorage) GetGuestDiskCount() int
- func (self *SHoststorage) GetHost() *SHost
- func (self *SHoststorage) GetStorage() *SStorage
- func (joint *SHoststorage) Master() db.IStandaloneModel
- func (joint *SHoststorage) Slave() db.IStandaloneModel
- func (self *SHoststorage) ValidateDeleteCondition(ctx context.Context) error
- type SHoststorageManager
- type SHostwire
- func (self *SHostwire) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHostwire) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHostwire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHostwire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SHostwire) GetGuestnicsCount() int
- func (hw *SHostwire) GetHost() *SHost
- func (hw *SHostwire) GetWire() *SWire
- func (joint *SHostwire) Master() db.IStandaloneModel
- func (joint *SHostwire) Slave() db.IStandaloneModel
- func (self *SHostwire) ValidateDeleteCondition(ctx context.Context) error
- type SHostwireManager
- type SImage
- type SInfrastructure
- func (self *SInfrastructure) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SInfrastructure) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SInfrastructure) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- type SInfrastructureManager
- type SIsolatedDevice
- func (self *SIsolatedDevice) ClearSchedDescCache() error
- func (self *SIsolatedDevice) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SIsolatedDevice) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SIsolatedDevice) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SIsolatedDevice) GetShortDesc() *jsonutils.JSONDict
- func (self *SIsolatedDevice) GetSpec(statusCheck bool) *jsonutils.JSONDict
- func (self *SIsolatedDevice) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SIsolatedDevice) ValidateDeleteCondition(ctx context.Context) error
- type SIsolatedDeviceConfig
- type SIsolatedDeviceManager
- func (manager *SIsolatedDeviceManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SIsolatedDeviceManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SIsolatedDeviceManager) DeleteDevicesByHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost)
- func (manager *SIsolatedDeviceManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
- func (manager *SIsolatedDeviceManager) FindByHost(id string) []SIsolatedDevice
- func (manager *SIsolatedDeviceManager) FindByHosts(ids []string) []SIsolatedDevice
- func (manager *SIsolatedDeviceManager) FindUnusedByModels(models []string) ([]SIsolatedDevice, error)
- func (manager *SIsolatedDeviceManager) FindUnusedGpusOnHost(hostId string) ([]SIsolatedDevice, error)
- func (man *SIsolatedDeviceManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
- func (manager *SIsolatedDeviceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SIsolatedDeviceManager) ReleaseDevicesOfGuest(guest *SGuest, userCred mcclient.TokenCredential) error
- func (manager *SIsolatedDeviceManager) TotalCount(hostType []string, rangeObj db.IStandaloneModel) IsolatedDeviceCountStat
- func (manager *SIsolatedDeviceManager) UnusedGpuQuery() *sqlchemy.SQuery
- type SKeypair
- func (self *SKeypair) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SKeypair) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (keypair *SKeypair) AllowGetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SKeypair) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (self *SKeypair) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (keypair *SKeypair) GetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SKeypair) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SKeypair) GetLinkedGuestsCount() int
- func (self *SKeypair) GetOwnerProjectId() string
- func (self *SKeypair) IsOwner(userCred mcclient.TokenCredential) bool
- func (self *SKeypair) ValidateDeleteCondition(ctx context.Context) error
- type SKeypairManager
- func (manager *SKeypairManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SKeypairManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SKeypairManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)
- func (manager *SKeypairManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)
- func (manager *SKeypairManager) FilterByOwner(q *sqlchemy.SQuery, owner string) *sqlchemy.SQuery
- func (manager *SKeypairManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
- func (manager *SKeypairManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SKeypairManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancer
- func (lb *SLoadbalancer) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lb *SLoadbalancer) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (lb *SLoadbalancer) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lb *SLoadbalancer) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lb *SLoadbalancer) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lb *SLoadbalancer) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (lb *SLoadbalancer) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lb *SLoadbalancer) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
- func (lb *SLoadbalancer) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerAcl
- func (lbacl *SLoadbalancerAcl) AllowPerformPatch(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbacl *SLoadbalancerAcl) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbacl *SLoadbalancerAcl) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lbacl *SLoadbalancerAcl) PerformPatch(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (lbacl *SLoadbalancerAcl) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbacl *SLoadbalancerAcl) ValidateDeleteCondition(ctx context.Context) error
- func (lbacl *SLoadbalancerAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerAclEntries
- type SLoadbalancerAclEntry
- type SLoadbalancerAclManager
- type SLoadbalancerAgent
- func (lbagent *SLoadbalancerAgent) AllowPerformHb(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbagent *SLoadbalancerAgent) AllowPerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbagent *SLoadbalancerAgent) IsActive() bool
- func (lbagent *SLoadbalancerAgent) PerformHb(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (lbagent *SLoadbalancerAgent) PerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (lbagent *SLoadbalancerAgent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerAgentManager
- func (man *SLoadbalancerAgentManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (man *SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers(ctx context.Context, userCred mcclient.TokenCredential)
- func (man *SLoadbalancerAgentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerAgentParams
- type SLoadbalancerAgentParamsHaproxy
- type SLoadbalancerAgentParamsTelegraf
- type SLoadbalancerAgentParamsVrrp
- type SLoadbalancerBackend
- func (lbb *SLoadbalancerBackend) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbb *SLoadbalancerBackend) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lbb *SLoadbalancerBackend) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbb *SLoadbalancerBackend) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerBackendGroup
- func (lbbg *SLoadbalancerBackendGroup) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbbg *SLoadbalancerBackendGroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lbbg *SLoadbalancerBackendGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lbbg *SLoadbalancerBackendGroup) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancer() *SLoadbalancer
- func (lbbg *SLoadbalancerBackendGroup) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbbg *SLoadbalancerBackendGroup) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbbg *SLoadbalancerBackendGroup) ValidateDeleteCondition(ctx context.Context) error
- type SLoadbalancerBackendGroupManager
- func (man *SLoadbalancerBackendGroupManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SLoadbalancerBackendGroupManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
- func (man *SLoadbalancerBackendGroupManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerBackendManager
- func (man *SLoadbalancerBackendManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SLoadbalancerBackendManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
- func (man *SLoadbalancerBackendManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerCertificate
- func (lbcert *SLoadbalancerCertificate) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbcert *SLoadbalancerCertificate) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lbcert *SLoadbalancerCertificate) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbcert *SLoadbalancerCertificate) ValidateDeleteCondition(ctx context.Context) error
- func (lbcert *SLoadbalancerCertificate) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerCertificateManager
- func (man *SLoadbalancerCertificateManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
- func (man *SLoadbalancerCertificateManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerHTTPListener
- type SLoadbalancerHTTPSListener
- type SLoadbalancerListener
- func (lblis *SLoadbalancerListener) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lblis *SLoadbalancerListener) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lblis *SLoadbalancerListener) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lblis *SLoadbalancerListener) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lblis *SLoadbalancerListener) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lblis *SLoadbalancerListener) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
- func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerListenerManager
- func (man *SLoadbalancerListenerManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SLoadbalancerListenerManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
- func (man *SLoadbalancerListenerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerListenerRule
- func (lbr *SLoadbalancerListenerRule) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (lbr *SLoadbalancerListenerRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (lbr *SLoadbalancerListenerRule) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lbr *SLoadbalancerListenerRule) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (lbr *SLoadbalancerListenerRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (lbr *SLoadbalancerListenerRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerListenerRuleManager
- func (man *SLoadbalancerListenerRuleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SLoadbalancerListenerRuleManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
- func (man *SLoadbalancerListenerRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerManager
- func (man *SLoadbalancerManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SLoadbalancerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SLoadbalancerNetwork
- type SLoadbalancerNetworkDeleteData
- type SLoadbalancerNetworkRequestData
- type SLoadbalancerNotifier
- type SLoadbalancerStatus
- type SLoadbalancerTCPListener
- type SLoadbalancerUDPListener
- type SLoadbalancernetworkManager
- type SManagedResourceBase
- type SNetInterface
- func (netif *SNetInterface) GetBaremetal() *SHost
- func (netif *SNetInterface) GetBaremetalNetwork() *SHostnetwork
- func (self *SNetInterface) GetCandidateNetworkForIp(userCred mcclient.TokenCredential, ipAddr string) (*SNetwork, error)
- func (netif *SNetInterface) GetId() string
- func (netif *SNetInterface) GetWire() *SWire
- func (self *SNetInterface) IsUsableServernic() bool
- func (self *SNetInterface) Remove(ctx context.Context, userCred mcclient.TokenCredential) error
- type SNetInterfaceManager
- type SNetwork
- func (self *SNetwork) AllowGetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SNetwork) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SNetwork) AllowPerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SNetwork) AllowPerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SNetwork) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SNetwork) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SNetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SNetwork) GetBaremetalNicsCount() int
- func (self *SNetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SNetwork) GetDNS() string
- func (self *SNetwork) GetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SNetwork) GetDomain() string
- func (self *SNetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SNetwork) GetFreeIP(ctx context.Context, userCred mcclient.TokenCredential, ...) (string, error)
- func (self *SNetwork) GetGroupNicsCount() int
- func (self *SNetwork) GetGuestIpv4StartAddress() netutils.IPV4Addr
- func (self *SNetwork) GetGuestnicsCount() int
- func (self *SNetwork) GetINetwork() (cloudprovider.ICloudNetwork, error)
- func (self *SNetwork) GetLoadbalancerIpsCount() int
- func (self *SNetwork) GetNetAddr() netutils.IPV4Addr
- func (self *SNetwork) GetPrefix() (netutils.IPV4Prefix, error)
- func (self *SNetwork) GetReservedNicsCount() int
- func (self *SNetwork) GetRoutes() [][]string
- func (self *SNetwork) GetTotalNicCount() int
- func (self *SNetwork) GetUsedAddresses() map[string]bool
- func (self *SNetwork) GetUsedIfnames() map[string]bool
- func (self *SNetwork) GetVpc() *SVpc
- func (self *SNetwork) GetWire() *SWire
- func (self *SNetwork) IsExitNetwork() bool
- func (self *SNetwork) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SNetwork) PerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SNetwork) PerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SNetwork) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SNetwork) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SNetwork) StartDeleteNetworkTask(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SNetwork) SyncWithCloudNetwork(userCred mcclient.TokenCredential, extNet cloudprovider.ICloudNetwork, ...) error
- func (self *SNetwork) UpdateBaremetalNetmap(nic *SHostnetwork, name string)
- func (self *SNetwork) UpdateNetmap(ip, project, name string)
- func (self *SNetwork) ValidateDeleteCondition(ctx context.Context) error
- func (self *SNetwork) ValidateUpdateCondition(ctx context.Context) error
- func (self *SNetwork) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SNetworkConfig
- type SNetworkManager
- func (manager *SNetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SNetworkManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*db.CustomizeListFilters, error)
- func (manager *SNetworkManager) GetContextManager() []db.IModelManager
- func (manager *SNetworkManager) GetNetworkOfIP(ipAddr string, serverType string, isPublic tristate.TriState) (*SNetwork, error)
- func (manager *SNetworkManager) InitializeData() error
- func (manager *SNetworkManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SNetworkManager) SyncNetworks(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire, ...) ([]SNetwork, []cloudprovider.ICloudNetwork, compare.SyncResult)
- func (manager *SNetworkManager) TotalPortCount(userCred mcclient.TokenCredential, rangeObj db.IStandaloneModel) NetworkPortStat
- func (manager *SNetworkManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SQuota
- func (self *SQuota) Add(quota quotas.IQuota)
- func (self *SQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error
- func (self *SQuota) FetchSystemQuota()
- func (self *SQuota) FetchUsage(projectId string) error
- func (self *SQuota) IsEmpty() bool
- func (self *SQuota) Sub(quota quotas.IQuota)
- func (self *SQuota) ToJSON(prefix string) jsonutils.JSONObject
- func (self *SQuota) Update(quota quotas.IQuota)
- type SReservedip
- func (self *SReservedip) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SReservedip) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SReservedip) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (self *SReservedip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SReservedip) GetNetwork() *SNetwork
- func (self *SReservedip) Release(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork) error
- type SReservedipManager
- func (manager *SReservedipManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SReservedipManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SReservedipManager) GetReservedIP(network *SNetwork, ip string) *SReservedip
- func (manager *SReservedipManager) GetReservedIPs(network *SNetwork) []SReservedip
- func (manager *SReservedipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SReservedipManager) ReserveIP(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string) error
- type SSchedpolicy
- func (self *SSchedpolicy) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSchedpolicy) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSchedpolicy) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSchedpolicy) PerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SSchedpolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SSchedpolicyManager
- type SSchedtag
- func (self *SSchedtag) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSchedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSchedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSchedtag) GetHostCount() int
- func (self *SSchedtag) GetHostQuery() *sqlchemy.SQuery
- func (self *SSchedtag) GetHosts() []SHost
- func (self *SSchedtag) GetShortDesc() *jsonutils.JSONDict
- func (self *SSchedtag) ValidateDeleteCondition(ctx context.Context) error
- func (self *SSchedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SSchedtagManager
- func (manager *SSchedtagManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SSchedtagManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- func (manager *SSchedtagManager) ValidateSchedtags(userCred mcclient.TokenCredential, schedtags map[string]string) (map[string]string, error)
- type SSecurityGroup
- func (self *SSecurityGroup) AllowPerformClone(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSecurityGroup) DoSync(ctx context.Context, userCred mcclient.TokenCredential)
- func (self *SSecurityGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSecurityGroup) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSecurityGroup) GetGuests() []SGuest
- func (self *SSecurityGroup) GetGuestsCount() int
- func (self *SSecurityGroup) GetGuestsQuery() *sqlchemy.SQuery
- func (self *SSecurityGroup) PerformClone(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SSecurityGroup) SyncWithCloudSecurityGroup(userCred mcclient.TokenCredential, extSec cloudprovider.ICloudSecurityGroup, ...) error
- func (self *SSecurityGroup) ValidateDeleteCondition(ctx context.Context) error
- type SSecurityGroupManager
- func (manager *SSecurityGroupManager) DelaySync(ctx context.Context, userCred mcclient.TokenCredential, idStr string)
- func (manager *SSecurityGroupManager) FetchSecgroupById(secId string) *SSecurityGroup
- func (manager *SSecurityGroupManager) InitializeData() error
- func (manager *SSecurityGroupManager) SyncSecgroups(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SSecurityGroup, []cloudprovider.ICloudSecurityGroup, compare.SyncResult)
- func (manager *SSecurityGroupManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SSecurityGroupRule
- func (self *SSecurityGroupRule) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSecurityGroupRule) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (self *SSecurityGroupRule) BeforeInsert()
- func (self *SSecurityGroupRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SSecurityGroupRule) GetSecGroup() *SSecurityGroup
- func (self *SSecurityGroupRule) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SSecurityGroupRule) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (self *SSecurityGroupRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (self *SSecurityGroupRule) SingleRules() ([]secrules.SecurityRule, error)
- func (self *SSecurityGroupRule) String() string
- func (self *SSecurityGroupRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SSecurityGroupRuleManager
- func (manager *SSecurityGroupRuleManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SSecurityGroupRuleManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SSecurityGroupRuleManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SSecurityGroupRuleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (sql *sqlchemy.SQuery, err error)
- func (manager *SSecurityGroupRuleManager) SyncRules(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SSecurityGroupRule, []SSecurityGroupRule, compare.SyncResult)
- func (manager *SSecurityGroupRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SSnapshot
- func (self *SSnapshot) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowPerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshot) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (self *SSnapshot) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SSnapshot) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SSnapshot) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SSnapshot) FakeDelete() error
- func (self *SSnapshot) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSnapshot) GetDisk() (*SDisk, error)
- func (self *SSnapshot) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SSnapshot) GetGuest() (*SGuest, error)
- func (self *SSnapshot) GetHost() *SHost
- func (self *SSnapshot) GetISnapshotRegion() (cloudprovider.ICloudRegion, error)
- func (self *SSnapshot) GetRegion() *SCloudregion
- func (self *SSnapshot) GetShortDesc() *jsonutils.JSONDict
- func (self *SSnapshot) PerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SSnapshot) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SSnapshot) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SSnapshot) StartSnapshotDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, reloadDisk bool, ...) error
- func (self *SSnapshot) StartSnapshotsDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (self *SSnapshot) SyncWithCloudSnapshot(userCred mcclient.TokenCredential, ext cloudprovider.ICloudSnapshot, ...) error
- func (self *SSnapshot) ValidateDeleteCondition(ctx context.Context) error
- type SSnapshotManager
- func (self *SSnapshotManager) AllowGetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshotManager) AllowPerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SSnapshotManager) CreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SSnapshot, error)
- func (self *SSnapshotManager) GetConvertSnapshot(deleteSnapshot *SSnapshot) (*SSnapshot, error)
- func (self *SSnapshotManager) GetDiskFirstSnapshot(diskId string) *SSnapshot
- func (self *SSnapshotManager) GetDiskSnapshotCount(diskId string) int
- func (self *SSnapshotManager) GetDiskSnapshots(diskId string) []SSnapshot
- func (self *SSnapshotManager) GetDiskSnapshotsByCreate(diskId, createdBy string) []SSnapshot
- func (self *SSnapshotManager) GetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SSnapshotManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (self *SSnapshotManager) PerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SSnapshotManager) SyncSnapshots(ctx context.Context, userCred mcclient.TokenCredential, ...) compare.SyncResult
- type SStorage
- func (self *SStorage) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SStorage) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SStorage) GetAllAttachingHosts() []SHost
- func (self *SStorage) GetAttachedHosts() []SHost
- func (self *SStorage) GetCapacity() int
- func (self *SStorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SStorage) GetDiskCount() int
- func (self *SStorage) GetFreeCapacity() int
- func (self *SStorage) GetHostCount() int
- func (self *SStorage) GetIStorage() (cloudprovider.ICloudStorage, error)
- func (self *SStorage) GetMasterHost() *SHost
- func (self *SStorage) GetOvercommitBound() float32
- func (self *SStorage) GetReserved() int
- func (self *SStorage) GetSnapshotCount() int
- func (self *SStorage) GetStoragecache() *SStoragecache
- func (self *SStorage) GetUsedCapacity(isReady tristate.TriState) int
- func (self *SStorage) GetZoneId() string
- func (self *SStorage) IsLocal() bool
- func (self *SStorage) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SStorage) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SStorage) SetStoragecache(cache *SStoragecache) error
- func (self *SStorage) SyncStatusWithHosts()
- func (self *SStorage) ValidateDeleteCondition(ctx context.Context) error
- type SStorageCapacity
- type SStorageManager
- func (manager *SStorageManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SStorageManager) FetchStorageById(storageId string) *SStorage
- func (manager *SStorageManager) GetContextManager() []db.IModelManager
- func (manager *SStorageManager) InitializeData() error
- func (manager *SStorageManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SStorageManager) SyncStorages(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SStorage, []cloudprovider.ICloudStorage, compare.SyncResult)
- func (manager *SStorageManager) TotalCapacity(rangeObj db.IStandaloneModel, hostTypes []string) StoragesCapacityStat
- func (manager *SStorageManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SStoragecache
- func (self *SStoragecache) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SStoragecache) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SStoragecache) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SStoragecache) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SStoragecache) GetHost() (*SHost, error)
- func (self *SStoragecache) GetIStorageCache() (cloudprovider.ICloudStoragecache, error)
- func (self *SStoragecache) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SStoragecache) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SStoragecache) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, ...) error
- func (self *SStoragecache) StartImageUncacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, ...) error
- func (self *SStoragecache) ValidateDeleteCondition(ctx context.Context) error
- type SStoragecacheManager
- type SStoragecachedimage
- func (self *SStoragecachedimage) AddDownloadRefcount() error
- func (self *SStoragecachedimage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SStoragecachedimage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SStoragecachedimage) GetCachedimage() *SCachedimage
- func (self *SStoragecachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SStoragecachedimage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SStoragecachedimage) GetHost() (*SHost, error)
- func (self *SStoragecachedimage) GetStoragecache() *SStoragecache
- func (joint *SStoragecachedimage) Master() db.IStandaloneModel
- func (self *SStoragecachedimage) SetExternalId(externalId string) error
- func (self *SStoragecachedimage) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
- func (joint *SStoragecachedimage) Slave() db.IStandaloneModel
- func (self *SStoragecachedimage) ValidateDeleteCondition(ctx context.Context) error
- type SStoragecachedimageManager
- func (manager *SStoragecachedimageManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SStoragecachedimageManager) GetStoragecachedimage(cacheId string, imageId string) *SStoragecachedimage
- func (manager *SStoragecachedimageManager) Register(ctx context.Context, userCred mcclient.TokenCredential, ...) *SStoragecachedimage
- type SSyncRange
- type SVCenter
- type SVCenterManager
- type SVpc
- func (self *SVpc) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SVpc) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) error
- func (self *SVpc) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (self *SVpc) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SVpc) GetCloudRegionId() string
- func (self *SVpc) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SVpc) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SVpc) GetIRegion() (cloudprovider.ICloudRegion, error)
- func (self *SVpc) GetIVpc() (cloudprovider.ICloudVpc, error)
- func (self *SVpc) GetNetworkCount() int
- func (self *SVpc) GetRegion() *SCloudregion
- func (self *SVpc) GetWireCount() int
- func (self *SVpc) GetWires() []SWire
- func (self *SVpc) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SVpc) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SVpc) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SVpc) StartDeleteVpcTask(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SVpc) SyncWithCloudVpc(extVPC cloudprovider.ICloudVpc) error
- func (self *SVpc) ValidateDeleteCondition(ctx context.Context) error
- type SVpcManager
- func (manager *SVpcManager) GetContextManager() []db.IModelManager
- func (manager *SVpcManager) InitializeData() error
- func (manager *SVpcManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SVpcManager) SyncVPCs(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]SVpc, []cloudprovider.ICloudVpc, compare.SyncResult)
- func (manager *SVpcManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SWire
- func (self *SWire) GetCandidateNetworkForIp(userCred mcclient.TokenCredential, ipAddr string) (*SNetwork, error)
- func (self *SWire) GetCandidatePrivateNetwork(userCred mcclient.TokenCredential, isExit bool, serverType string) (*SNetwork, error)
- func (self *SWire) GetCandidatePublicNetwork(isExit bool, serverType string) (*SNetwork, error)
- func (self *SWire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SWire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (wire *SWire) GetHostwires() ([]SHostwire, error)
- func (self *SWire) GetIWire() (cloudprovider.ICloudWire, error)
- func (wire *SWire) GetVpcId() string
- func (self *SWire) GetZone() *SZone
- func (wire *SWire) HostCount() int
- func (wire *SWire) NetworkCount() int
- func (wire *SWire) ValidateDeleteCondition(ctx context.Context) error
- func (wire *SWire) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SWireManager
- func (manager *SWireManager) FetchWireById(wireId string) *SWire
- func (manager *SWireManager) GetContextManager() []db.IModelManager
- func (manager *SWireManager) GetWireOfIp(ipAddr string) (*SWire, error)
- func (manager *SWireManager) InitializeData() error
- func (manager *SWireManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SWireManager) SyncWires(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc, ...) ([]SWire, []cloudprovider.ICloudWire, compare.SyncResult)
- func (manager *SWireManager) TotalCount(rangeObj db.IStandaloneModel, hostTypes []string) WiresCountStat
- func (manager *SWireManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SZone
- func (self *SZone) AllowGetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (zone *SZone) GeneralUsage() ZoneGeneralUsage
- func (zone *SZone) GetCloudRegionId() string
- func (zone *SZone) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (self *SZone) GetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (zone *SZone) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- func (zone *SZone) GetRegion() *SCloudregion
- func (zone *SZone) HostCount(status string, hostStatus string, enabled tristate.TriState, hostType string, ...) int
- func (zone *SZone) ValidateDeleteCondition(ctx context.Context) error
- type SZoneManager
- func (manager *SZoneManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SZoneManager) Count() int
- func (manager *SZoneManager) FetchZoneById(zoneId string) *SZone
- func (manager *SZoneManager) GetContextManager() []db.IModelManager
- func (manager *SZoneManager) InitializeData() error
- func (manager *SZoneManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SZoneManager) SyncZones(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, ...) ([]SZone, []cloudprovider.ICloudZone, compare.SyncResult)
- func (manager *SZoneManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
- type SchedStrategyType
- type SecurityGroupRuleSet
- type StorageCapacityStat
- type StorageStat
- type StoragesCapacityStat
- type WiresCountStat
- type ZoneGeneralUsage
Constants ¶
const ( BAREMETAL_AGENT_ENABLED = "enabled" BAREMETAL_AGENT_DISABLED = "disabled" BAREMETAL_AGENT_OFFLINE = "offline" )
const ( BILLING_TYPE_POSTPAID = "postpaid" BILLING_TYPE_PREPAID = "prepaid" )
const ( CACHED_IMAGE_REFRESH_SECONDS = 900 // 15 minutes CACHED_IMAGE_REFERENCE_SESSION_EXPIRE_SECONDS = 86400 // 1 day )
const ( CLOUD_PROVIDER_INIT = "init" CLOUD_PROVIDER_CONNECTED = "connected" CLOUD_PROVIDER_DISCONNECTED = "disconnected" CLOUD_PROVIDER_START_SYNC = "start_sync" CLOUD_PROVIDER_SYNCING = "syncing" CLOUD_PROVIDER_VMWARE = "VMware" CLOUD_PROVIDER_ALIYUN = "Aliyun" CLOUD_PROVIDER_QCLOUD = "Qcloud" CLOUD_PROVIDER_AZURE = "Azure" CLOUD_PROVIDER_AWS = "Aws" )
const ( CLOUD_REGION_STATUS_INSERVER = "inservice" CLOUD_REGION_STATUS_OUTOFSERVICE = "outofservice" )
const ( DISK_INIT = "init" DISK_REBUILD = "rebuild" DISK_ALLOC_FAILED = "alloc_failed" DISK_STARTALLOC = "start_alloc" DISK_ALLOCATING = "allocating" DISK_READY = "ready" DISK_RESET = "reset" DISK_DEALLOC = "deallocating" DISK_DEALLOC_FAILED = "dealloc_failed" DISK_UNKNOWN = "unknown" DISK_DETACHING = "detaching" DISK_ATTACHING = "attaching" DISK_START_SAVE = "start_save" DISK_SAVING = "saving" DISK_START_RESIZE = "start_resize" DISK_RESIZING = "resizing" DISK_START_MIGRATE = "start_migrate" DISK_POST_MIGRATE = "post_migrate" DISK_MIGRATING = "migrating" DISK_START_SNAPSHOT = "start_snapshot" DISK_SNAPSHOTING = "snapshoting" DISK_TYPE_SYS = "sys" DISK_TYPE_SWAP = "swap" DISK_TYPE_DATA = "data" DISK_BACKING_IMAGE = "image" )
const ( EIP_MODE_INSTANCE_PUBLICIP = "public_ip" EIP_MODE_STANDALONE_EIP = "elastic_ip" EIP_ASSOCIATE_TYPE_SERVER = "server" EIP_STATUS_READY = "ready" EIP_STATUS_UNKNOWN = "unknown" EIP_STATUS_ALLOCATE = "allocate" EIP_STATUS_ALLOCATE_FAIL = "allocate_fail" EIP_STATUS_DEALLOCATE = "deallocate" EIP_STATUS_DEALLOCATE_FAIL = "deallocate_fail" EIP_STATUS_ASSOCIATE = "associate" EIP_STATUS_ASSOCIATE_FAIL = "associate_fail" EIP_STATUS_DISSOCIATE = "dissociate" EIP_STATUS_DISSOCIATE_FAIL = "dissociate_fail" EIP_STATUS_CHANGE_BANDWIDTH = "change_bandwidth" EIP_CHARGE_TYPE_BY_TRAFFIC = "traffic" EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth" EIP_CHARGE_TYPE_DEFAULT = EIP_CHARGE_TYPE_BY_TRAFFIC )
const ( REDIS_TYPE = "REDIS" RDS_TYPE = "RDS" )
const ( VM_INIT = "init" VM_UNKNOWN = "unknown" VM_SCHEDULE = "schedule" VM_SCHEDULE_FAILED = "sched_fail" VM_CREATE_NETWORK = "network" VM_NETWORK_FAILED = "net_fail" VM_DEVICE_FAILED = "dev_fail" VM_CREATE_FAILED = "create_fail" VM_CREATE_DISK = "disk" VM_DISK_FAILED = "disk_fail" VM_START_DEPLOY = "start_deploy" VM_DEPLOYING = "deploying" VM_DEPLOY_FAILED = "deploy_fail" VM_READY = "ready" VM_START_START = "start_start" VM_STARTING = "starting" VM_START_FAILED = "start_fail" // # = ready VM_RUNNING = "running" VM_START_STOP = "start_stop" VM_STOPPING = "stopping" VM_STOP_FAILED = "stop_fail" // # = running VM_ATTACH_DISK_FAILED = "attach_disk_fail" VM_DETACH_DISK_FAILED = "detach_disk_fail" VM_START_SUSPEND = "start_suspend" VM_SUSPENDING = "suspending" VM_SUSPEND = "suspend" VM_SUSPEND_FAILED = "suspend_failed" VM_START_DELETE = "start_delete" VM_DELETE_FAIL = "delete_fail" VM_DELETING = "deleting" VM_DEALLOCATED = "deallocated" VM_START_MIGRATE = "start_migrate" VM_MIGRATING = "migrating" VM_MIGRATE_FAILED = "migrate_failed" VM_CHANGE_FLAVOR = "change_flavor" VM_CHANGE_FLAVOR_FAIL = "change_flavor_fail" VM_REBUILD_ROOT = "rebuild_root" VM_REBUILD_ROOT_FAIL = "rebuild_root_fail" VM_START_SNAPSHOT = "snapshot_start" VM_SNAPSHOT = "snapshot" VM_SNAPSHOT_DELETE = "snapshot_delete" VM_SNAPSHOT_STREAM = "block_stream" VM_SNAPSHOT_SUCC = "snapshot_succ" VM_SNAPSHOT_FAILED = "snapshot_failed" VM_SYNCING_STATUS = "syncing" VM_SYNC_CONFIG = "sync_config" VM_SYNC_FAIL = "sync_fail" VM_RESIZE_DISK = "resize_disk" VM_START_SAVE_DISK = "start_save_disk" VM_SAVE_DISK = "save_disk" VM_SAVE_DISK_FAILED = "save_disk_failed" VM_RESTORING_SNAPSHOT = "restoring_snapshot" VM_RESTORE_DISK = "restore_disk" VM_RESTORE_STATE = "restore_state" VM_RESTORE_FAILED = "restore_failed" VM_ASSOCIATE_EIP = "associate_eip" VM_DISSOCIATE_EIP = "dissociate_eip" VM_REMOVE_STATEFILE = "remove_state" VM_ADMIN = "admin" SHUTDOWN_STOP = "stop" SHUTDOWN_TERMINATE = "terminate" HYPERVISOR_KVM = "kvm" HYPERVISOR_CONTAINER = "container" HYPERVISOR_BAREMETAL = "baremetal" HYPERVISOR_ESXI = "esxi" HYPERVISOR_HYPERV = "hyperv" HYPERVISOR_ALIYUN = "aliyun" HYPERVISOR_QCLOUD = "qcloud" HYPERVISOR_AZURE = "azure" HYPERVISOR_AWS = "aws" // HYPERVISOR_DEFAULT = HYPERVISOR_KVM HYPERVISOR_DEFAULT = HYPERVISOR_ALIYUN )
const ( HOST_TYPE_BAREMETAL = "baremetal" HOST_TYPE_HYPERVISOR = "hypervisor" // KVM HOST_TYPE_ESXI = "esxi" // # VMWare vSphere ESXi HOST_TYPE_KUBELET = "kubelet" // # Kubernetes Kubelet HOST_TYPE_HYPERV = "hyperv" // # Microsoft Hyper-V HOST_TYPE_XEN = "xen" // # XenServer HOST_TYPE_ALIYUN = "aliyun" HOST_TYPE_AWS = "aws" HOST_TYPE_QCLOUD = "qcloud" HOST_TYPE_AZURE = "azure" HOST_TYPE_DEFAULT = HOST_TYPE_HYPERVISOR // # possible status HOST_ONLINE = "online" HOST_ENABLED = "online" HOST_OFFLINE = "offline" HOST_DISABLED = "offline" NIC_TYPE_IPMI = "ipmi" NIC_TYPE_ADMIN = "admin" BAREMETAL_INIT = "init" BAREMETAL_PREPARE = "prepare" BAREMETAL_PREPARE_FAIL = "prepare_fail" BAREMETAL_READY = "ready" BAREMETAL_RUNNING = "running" BAREMETAL_MAINTAINING = "maintaining" BAREMETAL_START_MAINTAIN = "start_maintain" BAREMETAL_DELETING = "deleting" BAREMETAL_DELETE = "delete" BAREMETAL_DELETE_FAIL = "delete_fail" BAREMETAL_UNKNOWN = "unknown" BAREMETAL_SYNCING_STATUS = "syncing_status" BAREMETAL_SYNC = "sync" BAREMETAL_SYNC_FAIL = "sync_fail" BAREMETAL_START_CONVERT = "start_convert" BAREMETAL_CONVERTING = "converting" BAREMETAL_START_FAIL = "start_fail" BAREMETAL_STOP_FAIL = "stop_fail" HOST_STATUS_RUNNING = BAREMETAL_RUNNING HOST_STATUS_READY = BAREMETAL_READY HOST_STATUS_UNKNOWN = BAREMETAL_UNKNOWN )
const ( IMAGE_STATUS_ACTIVE = "active" IMAGE_STATUS_QUEUED = "queued" IMAGE_STATUS_KILLED = "killed" IMAGE_STATUS_DELETED = "deleted" )
const ( DIRECT_PCI_TYPE = "PCI" GPU_HPC_TYPE = "GPU-HPC" // # for compute GPU_VGA_TYPE = "GPU-VGA" // # for display USB_TYPE = "USB" NIC_TYPE = "NIC" NVIDIA_VENDOR_ID = "10de" AMD_VENDOR_ID = "1002" )
const ( LB_STATUS_ENABLED = "enabled" LB_STATUS_DISABLED = "disabled" LB_STATUS_INIT = "init" LB_STATUS_RUNNING = "running" LB_STATUS_STOPPED = "stopped" LB_STATUS_CONFIGURING = "configuring" // config changes pending LB_STATUS_STOPPING = "stopping" LB_STATUS_DELETE_PENDING = "delete_pending" LB_STATUS_ERROR = "error" // bad things happen )
Load balancer status transition (for spec status)
create start stop delete init running - - - running - - stopped stopped stopped - running - -
Each entity will have spec and runtime version. Spec version will increment on entity attribute update. Runtime version will be filled by the scheduler to the newest spec it has seen and committed
When spec and runtime version differ, scheduler will set runtime version to "configuring", "stopping" and will finally transition to a terminal state.
In the case of instance has PendingDeleted marked, it is also the scheduler's duty to make the runtime status to stopped and finally the entity in question
const ( LB_ADDR_TYPE_INTRANET = "intranet" LB_ADDR_TYPE_INTERNET = "internet" )
Load Balancer network type (vpc or classic) determines viable backend servers (they should be from the same network type as the load balancer).
Load Balancer address type (intranet or internet) determins the scope the service provided by load balancer can be accessed. If it's intranet, then it will only be accessible from the specified network. If it's internet, then it's public and can be accessed from outside the cloud region
const ( LB_NETWORK_TYPE_CLASSIC = "classic" LB_NETWORK_TYPE_VPC = "vpc" )
const ( LB_LISTENER_TYPE_TCP = "tcp" LB_LISTENER_TYPE_UDP = "udp" LB_LISTENER_TYPE_HTTP = "http" LB_LISTENER_TYPE_HTTPS = "https" )
TODO https_direct sni
const ( LB_ACL_TYPE_BLACK = "black" LB_ACL_TYPE_WHITE = "white" )
const ( LB_TLS_CERT_PUBKEY_ALGO_RSA = "RSA" LB_TLS_CERT_PUBKEY_ALGO_ECDSA = "ECDSA" )
const ( LB_TLS_CIPHER_POLICY_1_0 = "tls_cipher_policy_1_0" LB_TLS_CIPHER_POLICY_1_1 = "tls_cipher_policy_1_1" LB_TLS_CIPHER_POLICY_1_2 = "tls_cipher_policy_1_2" LB_TLS_CIPHER_POLICY_1_2_strict = "tls_cipher_policy_1_2_strict" )
TODO may want extra for legacy apps
const ( LB_STICKY_SESSION_TYPE_INSERT = "insert" LB_STICKY_SESSION_TYPE_SERVER = "server" )
const ( LB_HEALTH_CHECK_TCP = "tcp" LB_HEALTH_CHECK_UDP = "udp" LB_HEALTH_CHECK_HTTP = "http" )
TODO maybe https check when field need comes ;)
const ( LB_HEALTH_CHECK_HTTP_CODE_2xx = "http_2xx" LB_HEALTH_CHECK_HTTP_CODE_3xx = "http_3xx" LB_HEALTH_CHECK_HTTP_CODE_4xx = "http_4xx" LB_HEALTH_CHECK_HTTP_CODE_5xx = "http_5xx" LB_HEALTH_CHECK_HTTP_CODE_DEFAULT = "http_2xx,http_3xx" )
const ( LB_BOOL_ON = "on" LB_BOOL_OFF = "off" )
const ( LB_SCHEDULER_RR = "rr" // round robin LB_SCHEDULER_WRR = "wrr" // weighted round robin LB_SCHEDULER_WLC = "wlc" // weighted least connection LB_SCHEDULER_SCH = "sch" // source-ip-based consistent hash LB_SCHEDULER_TCH = "tch" // 4-tuple-based consistent hash )
TODO
- qch, quic connection id - mh, maglev consistent hash
const ( LB_BACKEND_GUEST = "guest" LB_BACKEND_HOST = "host" )
TODO raw type
const ( // # DEFAULT_BANDWIDTH = options.default_bandwidth MAX_BANDWIDTH = 100000 SERVER_TYPE_GUEST = "guest" SERVER_TYPE_BAREMETAL = "baremetal" SERVER_TYPE_CONTAINER = "container" STATIC_ALLOC = "static" MAX_NETWORK_NAME_LEN = 11 EXTRA_DNS_UPDATE_TARGETS = "__extra_dns_update_targets" NETWORK_STATUS_INIT = "init" NETWORK_STATUS_PENDING = "pending" NETWORK_STATUS_AVAILABLE = "available" NETWORK_STATUS_FAILED = "failed" NETWORK_STATUS_UNKNOWN = "unknown" NETWORK_STATUS_START_DELETE = "start_delete" NETWORK_STATUS_DELETING = "deleting" NETWORK_STATUS_DELETED = "deleted" NETWORK_STATUS_DELETE_FAILED = "delete_failed" )
const ( STRATEGY_REQUIRE = "require" STRATEGY_EXCLUDE = "exclude" STRATEGY_PREFER = "prefer" STRATEGY_AVOID = "avoid" // # container used aggregate CONTAINER_AGGREGATE = "container" )
const ( // create by MANUAL = "manual" AUTO = "auto" SNAPSHOT_CREATING = "creating" SNAPSHOT_ROLLBACKING = "rollbacking" SNAPSHOT_FAILED = "create_failed" SNAPSHOT_READY = "ready" SNAPSHOT_DELETING = "deleting" SNAPSHOT_UNKNOWN = "unknown" )
const ( CACHED_IMAGE_STATUS_INIT = "init" CACHED_IMAGE_STATUS_SAVING = "saving" CACHED_IMAGE_STATUS_CACHING = "caching" CACHED_IMAGE_STATUS_READY = "ready" CACHED_IMAGE_STATUS_DELETING = "deleting" CACHED_IMAGE_STATUS_CACHE_FAILED = "cache_fail" DOWNLOAD_SESSION_LENGTH = 3600 * 3 // 3 hour )
const ( STORAGE_LOCAL = "local" STORAGE_BAREMETAL = "baremetal" STORAGE_SHEEPDOG = "sheepdog" STORAGE_RBD = "rbd" STORAGE_DOCKER = "docker" STORAGE_NAS = "nas" STORAGE_VSAN = "vsan" STORAGE_PUBLIC_CLOUD = "cloud" STORAGE_CLOUD_EFFICIENCY = "cloud_efficiency" STORAGE_CLOUD_SSD = "cloud_ssd" STORAGE_EPHEMERAL_SSD = "ephemeral_ssd" STORAGE_GP2_SSD = "gp2" // aws general purpose ssd STORAGE_IO1_SSD = "io1" // aws Provisioned IOPS SSD STORAGE_ST1_HDD = "st1" // aws Throughput Optimized HDD STORAGE_SC1_SSD = "sc1" // aws Cold HDD STORAGE_STANDARD_SSD = "standard" // aws Magnetic volumes STORAGE_ENABLED = "enabled" STORAGE_DISABLED = "disabled" STORAGE_OFFLINE = "offline" STORAGE_ONLINE = "online" DISK_TYPE_ROTATE = "rotate" DISK_TYPE_SSD = "ssd" DISK_TYPE_HYBRID = "hybrid" )
const ( VPC_STATUS_PENDING = "pending" VPC_STATUS_AVAILABLE = "available" VPC_STATUS_FAILED = "failed" VPC_STATUS_START_DELETE = "start_delete" VPC_STATUS_DELETING = "deleting" VPC_STATUS_DELETE_FAILED = "delete_failed" VPC_STATUS_DELETED = "deleted" VPC_STATUS_UNKNOWN = "unknown" MAX_VPC_PER_REGION = 3 )
const ( ZONE_ENABLE = "enable" ZONE_DISABLE = "disable" ZONE_SOLDOUT = "soldout" ZONE_LACK = "lack" )
const DNS_RECORDS_SEPARATOR = ","
const (
MAX_IFNAME_SIZE = 13
)
const MAX_TRIES = 10
const (
SECURITY_GROUP_SEPARATOR = ";"
)
Variables ¶
var ( ErrOutOfCPU = errors.New("out of CPU quota") ErrOutOfMemory = errors.New("out of memory quota") ErrOutOfStorage = errors.New("out of storage quota") ErrOutOfPort = errors.New("out of internal port quota") ErrOutOfEip = errors.New("out of eip quota") ErrOutOfEport = errors.New("out of external port quota") ErrOutOfBw = errors.New("out of internal bandwidth quota") ErrOutOfEbw = errors.New("out of external bandwidth quota") ErrOutOfKeypair = errors.New("out of keypair quota") ErrOutOfImage = errors.New("out of image quota") ErrOutOfGroup = errors.New("out of group quota") ErrOutOfSecgroup = errors.New("out of secgroup quota") ErrOutOfIsolatedDevice = errors.New("out of isolated device quota") ErrOutOfSnapshot = errors.New("out of snapshot quota") )
var ( DISK_TYPES = []string{DISK_TYPE_ROTATE, DISK_TYPE_SSD, DISK_TYPE_HYBRID} STORAGE_LOCAL_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS} STORAGE_SUPPORT_TYPES = STORAGE_LOCAL_TYPES STORAGE_ALL_TYPES = []string{ STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG, STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN, } STORAGE_LIMITED_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS, STORAGE_RBD} )
var HOSTTYPE_HYPERVISOR = map[string]string{ HOST_TYPE_HYPERVISOR: HYPERVISOR_KVM, HOST_TYPE_BAREMETAL: HYPERVISOR_BAREMETAL, HOST_TYPE_ESXI: HYPERVISOR_ESXI, HOST_TYPE_KUBELET: HYPERVISOR_CONTAINER, HOST_TYPE_ALIYUN: HYPERVISOR_ALIYUN, HOST_TYPE_AZURE: HYPERVISOR_AZURE, HOST_TYPE_AWS: HYPERVISOR_AWS, HOST_TYPE_QCLOUD: HYPERVISOR_QCLOUD, }
var HOST_TYPES = []string{HOST_TYPE_BAREMETAL, HOST_TYPE_HYPERVISOR, HOST_TYPE_ESXI, HOST_TYPE_KUBELET, HOST_TYPE_XEN, HOST_TYPE_ALIYUN, HOST_TYPE_AZURE, HOST_TYPE_AWS, HOST_TYPE_QCLOUD}
var HYPERVISORS = []string{HYPERVISOR_KVM, HYPERVISOR_BAREMETAL, HYPERVISOR_ESXI, HYPERVISOR_CONTAINER, HYPERVISOR_ALIYUN, HYPERVISOR_AZURE, HYPERVISOR_AWS, HYPERVISOR_QCLOUD}
var HYPERVISOR_HOSTTYPE = map[string]string{ HYPERVISOR_KVM: HOST_TYPE_HYPERVISOR, HYPERVISOR_BAREMETAL: HOST_TYPE_BAREMETAL, HYPERVISOR_ESXI: HOST_TYPE_ESXI, HYPERVISOR_CONTAINER: HOST_TYPE_KUBELET, HYPERVISOR_ALIYUN: HOST_TYPE_ALIYUN, HYPERVISOR_AZURE: HOST_TYPE_AZURE, HYPERVISOR_AWS: HOST_TYPE_AWS, HYPERVISOR_QCLOUD: HOST_TYPE_QCLOUD, }
var ID_VENDOR_MAP = map[string]string{ NVIDIA_VENDOR_ID: "NVIDIA", AMD_VENDOR_ID: "AMD", }
var LB_ACL_TYPES = validators.NewChoices( LB_ACL_TYPE_BLACK, LB_ACL_TYPE_WHITE, )
var LB_ADDR_TYPES = validators.NewChoices( LB_ADDR_TYPE_INTERNET, LB_ADDR_TYPE_INTRANET, )
var LB_BACKEND_TYPES = validators.NewChoices( LB_BACKEND_GUEST, LB_BACKEND_HOST, )
var LB_BOOL_VALUES = validators.NewChoices( LB_BOOL_ON, LB_BOOL_OFF, )
var LB_HEALTH_CHECK_HTTP_CODES = validators.NewChoices( LB_HEALTH_CHECK_HTTP_CODE_2xx, LB_HEALTH_CHECK_HTTP_CODE_3xx, LB_HEALTH_CHECK_HTTP_CODE_4xx, LB_HEALTH_CHECK_HTTP_CODE_5xx, )
var LB_HEALTH_CHECK_TYPES = validators.NewChoices( LB_HEALTH_CHECK_TCP, LB_HEALTH_CHECK_UDP, LB_HEALTH_CHECK_HTTP, )
var LB_HEALTH_CHECK_TYPES_TCP = validators.NewChoices( LB_HEALTH_CHECK_TCP, LB_HEALTH_CHECK_HTTP, )
var LB_HEALTH_CHECK_TYPES_UDP = validators.NewChoices( LB_HEALTH_CHECK_UDP, )
var LB_LISTENER_TYPES = validators.NewChoices( LB_LISTENER_TYPE_TCP, LB_LISTENER_TYPE_UDP, LB_LISTENER_TYPE_HTTP, LB_LISTENER_TYPE_HTTPS, )
var LB_NETWORK_TYPES = validators.NewChoices( LB_NETWORK_TYPE_CLASSIC, LB_NETWORK_TYPE_VPC, )
var LB_SCHEDULER_TYPES = validators.NewChoices( LB_SCHEDULER_RR, LB_SCHEDULER_WRR, LB_SCHEDULER_WLC, LB_SCHEDULER_SCH, LB_SCHEDULER_TCH, )
var LB_STATUS_RUNTIME = validators.NewChoices( LB_STATUS_INIT, LB_STATUS_CONFIGURING, LB_STATUS_RUNNING, LB_STATUS_STOPPING, LB_STATUS_STOPPED, LB_STATUS_ERROR, )
var LB_STATUS_SPEC = validators.NewChoices( LB_STATUS_ENABLED, LB_STATUS_DISABLED, )
var LB_STICKY_SESSION_TYPES = validators.NewChoices( LB_STICKY_SESSION_TYPE_INSERT, LB_STICKY_SESSION_TYPE_SERVER, )
var LB_TLS_CERT_PUBKEY_ALGOS = validators.NewChoices( LB_TLS_CERT_PUBKEY_ALGO_RSA, LB_TLS_CERT_PUBKEY_ALGO_ECDSA, )
var LB_TLS_CIPHER_POLICIES = validators.NewChoices( LB_TLS_CIPHER_POLICY_1_0, LB_TLS_CIPHER_POLICY_1_1, LB_TLS_CIPHER_POLICY_1_2, LB_TLS_CIPHER_POLICY_1_2_strict, )
var NIC_TYPES = []string{NIC_TYPE_IPMI, NIC_TYPE_ADMIN}
var PUBLIC_CLOUD_HYPERVISORS = []string{HYPERVISOR_ALIYUN, HYPERVISOR_AWS, HYPERVISOR_AZURE, HYPERVISOR_QCLOUD}
var QuotaManager *quotas.SQuotaManager
var STRATEGY_LIST = []string{STRATEGY_REQUIRE, STRATEGY_EXCLUDE, STRATEGY_PREFER, STRATEGY_AVOID}
var VALID_GPU_TYPES = []string{GPU_HPC_TYPE, GPU_VGA_TYPE}
var VALID_PASSTHROUGH_TYPES = []string{DIRECT_PCI_TYPE, USB_TYPE, NIC_TYPE, GPU_HPC_TYPE, GPU_VGA_TYPE}
var VENDOR_ID_MAP = map[string]string{ "NVIDIA": NVIDIA_VENDOR_ID, "AMD": AMD_VENDOR_ID, }
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_SNAPSHOT_STREAM}
Functions ¶
func AttachUsageQuery ¶
func ConvertStorageInfo2BaremetalStorages ¶
func ConvertStorageInfo2BaremetalStorages(storageInfo jsonutils.JSONObject) []*baremetal.BaremetalStorage
func GetAllModelSpecs ¶
func GetAllModelSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func GetDiskSpecV2 ¶
func GetDiskSpecV2(storageInfo jsonutils.JSONObject) jsonutils.JSONObject
func GetHostSpecs ¶
func GetHostSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func GetIPTenantIdPairs ¶
func GetIPTenantIdPairs()
func GetIsolatedDeviceSpecs ¶
func GetIsolatedDeviceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func GetModelsSpecs ¶
func GetModelsSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict, managers ...ISpecModelManager) (jsonutils.JSONObject, error)
func GetServerSpecs ¶
func GetServerSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func RegisterGuestDriver ¶
func RegisterGuestDriver(driver IGuestDriver)
func RegisterHostDriver ¶
func RegisterHostDriver(driver IHostDriver)
func RunBatchCreateTask ¶
func RunBatchCreateTask( ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, data jsonutils.JSONObject, pendingUsage SQuota, taskName string, )
func ValidateSnapshotName ¶
Types ¶
type DNSUpdateKeySecret ¶
type GuestnicsCount ¶
type HostsCountStat ¶
type IGuestDriver ¶
type IGuestDriver interface { GetHypervisor() string GetMaxVCpuCount() int GetMaxVMemSizeGB() int GetJsonDescAtHost(ctx context.Context, guest *SGuest, host *SHost) jsonutils.JSONObject ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) ValidateCreateHostData(ctx context.Context, userCred mcclient.TokenCredential, bmName string, host *SHost, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) PrepareDiskRaidConfig(host *SHost, params *jsonutils.JSONDict) error GetNamedNetworkConfiguration(guest *SGuest, userCred mcclient.TokenCredential, host *SHost, netConfig *SNetworkConfig) (*SNetwork, string, int8, IPAddlocationDirection) Attach2RandomNetwork(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, host *SHost, netConfig *SNetworkConfig, pendingUsage quotas.IQuota) error GetRandomNetworkTypes() []string ChooseHostStorage(host *SHost, backend string) *SStorage StartGuestCreateTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, pendingUsage quotas.IQuota, parentTaskId string) error RequestGuestCreateAllDisks(ctx context.Context, guest *SGuest, task taskman.ITask) error OnGuestCreateTaskComplete(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestGuestCreateInsertIso(ctx context.Context, imageId string, guest *SGuest, task taskman.ITask) error StartGuestStopTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error StartGuestResetTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, isHard bool, parentTaskId string) error StartGuestRestartTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, isForce bool, parentTaskId string) error RequestSoftReset(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestDeployGuestOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error OnGuestDeployTaskDataReceived(ctx context.Context, guest *SGuest, task taskman.ITask, data jsonutils.JSONObject) error OnGuestDeployTaskComplete(ctx context.Context, guest *SGuest, task taskman.ITask) error StartGuestSyncstatusTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error RequestSyncConfigOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error RequestSyncstatusOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential) (jsonutils.JSONObject, error) RequestStartOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential, task taskman.ITask) (jsonutils.JSONObject, error) RequestStopOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error StartDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error StartGuestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error RequestStopGuestForDelete(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestDetachDisksFromGuestForDelete(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestUndeployGuestOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error OnDeleteGuestFinalCleanup(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential) error PerformStart(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, data *jsonutils.JSONDict) error CheckDiskTemplateOnStorage(ctx context.Context, userCred mcclient.TokenCredential, imageId string, storageId string, task taskman.ITask) error GetGuestVncInfo(userCred mcclient.TokenCredential, guest *SGuest, host *SHost) (*jsonutils.JSONDict, error) RequestAttachDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestDetachDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error GetDetachDiskStatus() ([]string, error) GetAttachDiskStatus() ([]string, error) GetRebuildRootStatus() ([]string, error) GetChangeConfigStatus() ([]string, error) GetDeployStatus() ([]string, error) ValidateResizeDisk(guest *SGuest, disk *SDisk, storage *SStorage) error CanKeepDetachDisk() bool IsNeedRestartForResetLoginInfo() bool RequestDeleteDetachedDisk(ctx context.Context, disk *SDisk, task taskman.ITask, isPurge bool) error StartGuestDetachdiskTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error StartGuestAttachDiskTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error StartSuspendTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error RqeuestSuspendOnHost(ctx context.Context, guest *SGuest, task taskman.ITask) error AllowReconfigGuest() bool DoGuestCreateDisksTask(ctx context.Context, guest *SGuest, task taskman.ITask) error RequestChangeVmConfig(ctx context.Context, guest *SGuest, task taskman.ITask, vcpuCount, vmemSize int64) error RequestGuestHotAddIso(ctx context.Context, guest *SGuest, path string, task taskman.ITask) error RequestRebuildRootDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error StartGuestDiskSnapshotTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict) error RequestDiskSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, snapshotId, diskId string) error RequestDeleteSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, params *jsonutils.JSONDict) error RequestReloadDiskSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, params *jsonutils.JSONDict) error }
func GetDriver ¶
func GetDriver(hypervisor string) IGuestDriver
type IHostDriver ¶
type IHostDriver interface { GetHostType() string CheckAndSetCacheImage(ctx context.Context, host *SHost, storagecache *SStoragecache, task taskman.ITask) error ValidateUpdateDisk(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) RequestPrepareSaveDiskOnHost(ctx context.Context, host *SHost, disk *SDisk, imageId string, task taskman.ITask) error RequestSaveUploadImageOnHost(ctx context.Context, host *SHost, disk *SDisk, imageId string, task taskman.ITask, data jsonutils.JSONObject) error RequestAllocateDiskOnStorage(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask, content *jsonutils.JSONDict) error RequestDeallocateDiskOnHost(host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask) error RequestResizeDiskOnHostOnline(host *SHost, storage *SStorage, disk *SDisk, size int64, task taskman.ITask) error RequestResizeDiskOnHost(host *SHost, storage *SStorage, disk *SDisk, size int64, task taskman.ITask) error RequestDeleteSnapshotsWithStorage(ctx context.Context, host *SHost, snapshot *SSnapshot, task taskman.ITask) error RequestResetDisk(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error RequestCleanUpDiskSnapshots(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error PrepareConvert(host *SHost, image, raid string, data jsonutils.JSONObject) (*jsonutils.JSONDict, error) PrepareUnconvert(host *SHost) error FinishUnconvert(ctx context.Context, userCred mcclient.TokenCredential, host *SHost) error FinishConvert(userCred mcclient.TokenCredential, host *SHost, guest *SGuest, hostType string) error ConvertFailed(host *SHost) error GetRaidScheme(host *SHost, raid string) (string, error) }
func GetHostDriver ¶
func GetHostDriver(hostType string) IHostDriver
type ILoadbalancerSubResourceManager ¶
type ILoadbalancerSubResourceManager interface { db.IModelManager // PreDeleteSubs is to be called by upper manager to PreDelete models managed by this one PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery) }
type IPAddlocationDirection ¶
type IPAddlocationDirection string
const ( IPAllocationStepdown IPAddlocationDirection = "stepdown" IPAllocationStepup IPAddlocationDirection = "stepup" IPAllocationRadnom IPAddlocationDirection = "random" IPAllocationNone IPAddlocationDirection = "none" IPAllocationDefault = "" )
type ISpecModel ¶
type ISpecModel interface { db.IStandaloneModel GetSpec(statusCheck bool) *jsonutils.JSONDict }
func ListItems ¶
func ListItems(manager db.IModelManager, ctx context.Context, userCred mcclient.TokenCredential, queryDict *jsonutils.JSONDict) ([]ISpecModel, error)
type ISpecModelManager ¶
type ISpecModelManager interface { db.IStandaloneModelManager GetSpecIdent(spec *jsonutils.JSONDict) []string }
type IsolatedDeviceCountStat ¶
type NetworkPortStat ¶
type SBaremetalagent ¶
type SBaremetalagent struct { db.SStandaloneResourceBase SInfrastructure Status string `width:"36" charset:"ascii" nullable:"false" default:"disable" list:"user" create:"optional"` AccessIp string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_required"` ZoneId string `width:"128" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` }
func (*SBaremetalagent) AllowPerformDisable ¶
func (self *SBaremetalagent) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SBaremetalagent) AllowPerformEnable ¶
func (self *SBaremetalagent) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SBaremetalagent) AllowPerformOffline ¶
func (self *SBaremetalagent) AllowPerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SBaremetalagent) AllowPerformOnline ¶
func (self *SBaremetalagent) AllowPerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SBaremetalagent) GetExtraDetails ¶
func (self *SBaremetalagent) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SBaremetalagent) GetZone ¶
func (self *SBaremetalagent) GetZone() *SZone
func (*SBaremetalagent) PerformDisable ¶
func (self *SBaremetalagent) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalagent) PerformEnable ¶
func (self *SBaremetalagent) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalagent) PerformOffline ¶
func (self *SBaremetalagent) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalagent) PerformOnline ¶
func (self *SBaremetalagent) PerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaremetalagent) ValidateDeleteCondition ¶
func (self *SBaremetalagent) ValidateDeleteCondition(ctx context.Context) error
func (*SBaremetalagent) ValidateUpdateData ¶
func (self *SBaremetalagent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SBaremetalagentManager ¶
type SBaremetalagentManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var BaremetalagentManager *SBaremetalagentManager
func (*SBaremetalagentManager) ValidateCreateData ¶
func (manager *SBaremetalagentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SBillingResourceBase ¶
type SBillingResourceBase struct { BillingType string `width:"36" charset:"ascii" nullable:"true" default:"postpaid" list:"user" create:"optional"` ExpiredAt time.Time `nullable:"true" list:"user" create:"optional"` }
func (*SBillingResourceBase) GetChargeType ¶
func (self *SBillingResourceBase) GetChargeType() string
type SCachedimage ¶
type SCachedimage struct { db.SStandaloneResourceBase SInfrastructure Size int64 `nullable:"false" list:"admin" update:"admin" create:"admin_required"` // = Column(BigInteger, nullable=False) # in Byte // virtual_size = Column(BigInteger, nullable=False) # in Byte Info jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_required"` // Column(JSONEncodedDict, nullable=True) LastSync time.Time `list:"admin"` // = Column(DateTime) LastRef time.Time `list:"admin"` // = Column(DateTime) RefCount int `default:"0" list:"admin"` // = Column(Integer, default=0, server_default='0') }
func (*SCachedimage) AllowPerformRefresh ¶
func (self *SCachedimage) AllowPerformRefresh(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCachedimage) ChooseSourceStoragecacheInRange ¶
func (self *SCachedimage) ChooseSourceStoragecacheInRange(hostType string, excludes []string, rangeObjs interface{}) (*SStoragecachedimage, error)
func (*SCachedimage) GetCustomizeColumns ¶
func (self *SCachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCachedimage) PerformRefresh ¶
func (self *SCachedimage) PerformRefresh(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCachedimage) ValidateDeleteCondition ¶
func (self *SCachedimage) ValidateDeleteCondition(ctx context.Context) error
type SCachedimageManager ¶
type SCachedimageManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var CachedimageManager *SCachedimageManager
func (*SCachedimageManager) GetImageById ¶
func (manager *SCachedimageManager) GetImageById(ctx context.Context, userCred mcclient.TokenCredential, imageId string, refresh bool) (*SImage, error)
func (*SCachedimageManager) ImageAddRefCount ¶
func (manager *SCachedimageManager) ImageAddRefCount(imageId string)
type SCapabilities ¶
type SCapabilities struct { Hypervisors []string StorageTypes []string GPUModels []string MinNicCount int MaxNicCount int MinDataDiskCount int MaxDataDiskCount int SchedPolicySupport bool Usable bool Specs jsonutils.JSONObject }
func GetCapabilities ¶
func GetCapabilities(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, zone *SZone) (SCapabilities, error)
type SCloudaccount ¶
type SCloudaccount struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` Account string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False) Secret string `width:"256" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False) BalanceKey string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` LastSync time.Time `get:"admin" list:"admin"` // = Column(DateTime, nullable=True) Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(32, charset='ascii'), nullable=True) Sysinfo jsonutils.JSONObject `get:"admin"` // Column(JSONEncodedDict, nullable=True) Provider string `width:"64" charset:"ascii" list:"admin" create:"admin_required"` }
func (*SCloudaccount) AllowGetDetailsBalance ¶
func (self *SCloudaccount) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SCloudaccount) AllowPerformImport ¶
func (self *SCloudaccount) AllowPerformImport(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudaccount) AllowPerformSync ¶
func (self *SCloudaccount) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudaccount) AllowPerformUpdateCredential ¶
func (self *SCloudaccount) AllowPerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudaccount) CanSync ¶
func (self *SCloudaccount) CanSync() bool
func (*SCloudaccount) GetBalance ¶
func (self *SCloudaccount) GetBalance() (float64, error)
func (*SCloudaccount) GetCloudproviders ¶
func (self *SCloudaccount) GetCloudproviders() []SCloudprovider
func (*SCloudaccount) GetCustomizeColumns ¶
func (self *SCloudaccount) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudaccount) GetDetailsBalance ¶
func (self *SCloudaccount) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) GetDriver ¶
func (self *SCloudaccount) GetDriver() (cloudprovider.ICloudProvider, error)
func (*SCloudaccount) GetExtraDetails ¶
func (self *SCloudaccount) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudaccount) GetSubAccounts ¶
func (self *SCloudaccount) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SCloudaccount) ImportSubAccount ¶
func (self *SCloudaccount) ImportSubAccount(ctx context.Context, userCred mcclient.TokenCredential, subAccount cloudprovider.SSubAccount, autoCreateProject bool) (*SCloudprovider, bool, error)
func (*SCloudaccount) MarkStartSync ¶
func (self *SCloudaccount) MarkStartSync(userCred mcclient.TokenCredential)
func (*SCloudaccount) PerformDisable ¶
func (self *SCloudaccount) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) PerformEnable ¶
func (self *SCloudaccount) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) PerformImport ¶
func (self *SCloudaccount) PerformImport(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) PerformSync ¶
func (self *SCloudaccount) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) PerformUpdateCredential ¶
func (self *SCloudaccount) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudaccount) PostCreate ¶
func (self *SCloudaccount) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SCloudaccount) PreDelete ¶
func (self *SCloudaccount) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SCloudaccount) SaveSysInfo ¶
func (self *SCloudaccount) SaveSysInfo(info jsonutils.JSONObject)
func (*SCloudaccount) StartSyncCloudProviderInfoTask ¶
func (self *SCloudaccount) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, cloudProviders []SCloudprovider, syncRange *SSyncRange, parentTaskId string) error
func (*SCloudaccount) ValidateDeleteCondition ¶
func (self *SCloudaccount) ValidateDeleteCondition(ctx context.Context) error
func (*SCloudaccount) ValidateUpdateData ¶
func (self *SCloudaccount) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SCloudaccountManager ¶
type SCloudaccountManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var CloudaccountManager *SCloudaccountManager
func (*SCloudaccountManager) FetchCloudaccountById ¶
func (manager *SCloudaccountManager) FetchCloudaccountById(accountId string) *SCloudaccount
func (*SCloudaccountManager) FetchCloudaccountByIdOrName ¶
func (manager *SCloudaccountManager) FetchCloudaccountByIdOrName(accountId string) *SCloudaccount
func (*SCloudaccountManager) InitializeData ¶
func (manager *SCloudaccountManager) InitializeData() error
func (*SCloudaccountManager) ValidateCreateData ¶
func (manager *SCloudaccountManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SCloudprovider ¶
type SCloudprovider struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Hostname string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=False) // port = Column(Integer, nullable=False) Account string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False) Secret string `width:"256" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False) CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` ProjectId string `name:"tenant_id" width:"128" charset:"ascii" nullable:"true" list:"admin"` LastSync time.Time `get:"admin" list:"admin"` // = Column(DateTime, nullable=True) Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(32, charset='ascii'), nullable=True) Sysinfo jsonutils.JSONObject `get:"admin"` // Column(JSONEncodedDict, nullable=True) Provider string `width:"64" charset:"ascii" list:"admin" create:"admin_required"` }
func (*SCloudprovider) AllowGetDetailsBalance ¶
func (self *SCloudprovider) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SCloudprovider) AllowPerformChangeProject ¶
func (self *SCloudprovider) AllowPerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudprovider) AllowPerformSync ¶
func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudprovider) CanSync ¶
func (self *SCloudprovider) CanSync() bool
func (*SCloudprovider) GetBalance ¶
func (self *SCloudprovider) GetBalance() (float64, error)
func (*SCloudprovider) GetCloudaccount ¶
func (self *SCloudprovider) GetCloudaccount() *SCloudaccount
func (*SCloudprovider) GetCustomizeColumns ¶
func (self *SCloudprovider) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudprovider) GetDetailsBalance ¶
func (self *SCloudprovider) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudprovider) GetDriver ¶
func (self *SCloudprovider) GetDriver() (cloudprovider.ICloudProvider, error)
func (*SCloudprovider) GetExtraDetails ¶
func (self *SCloudprovider) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudprovider) GetGuestCount ¶
func (self *SCloudprovider) GetGuestCount() int
func (*SCloudprovider) GetHostCount ¶
func (self *SCloudprovider) GetHostCount() int
func (*SCloudprovider) GetOwnerProjectId ¶
func (self *SCloudprovider) GetOwnerProjectId() string
func (*SCloudprovider) MarkStartSync ¶
func (self *SCloudprovider) MarkStartSync(userCred mcclient.TokenCredential)
func (*SCloudprovider) PerformChangeProject ¶
func (self *SCloudprovider) PerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudprovider) PerformSync ¶
func (self *SCloudprovider) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudprovider) SaveSysInfo ¶
func (self *SCloudprovider) SaveSysInfo(info jsonutils.JSONObject)
func (*SCloudprovider) StartSyncCloudProviderInfoTask ¶
func (self *SCloudprovider) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, syncRange *SSyncRange, parentTaskId string) error
func (*SCloudprovider) ValidateDeleteCondition ¶
func (self *SCloudprovider) ValidateDeleteCondition(ctx context.Context) error
func (*SCloudprovider) ValidateUpdateData ¶
func (self *SCloudprovider) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SCloudproviderManager ¶
type SCloudproviderManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var CloudproviderManager *SCloudproviderManager
func (*SCloudproviderManager) FetchCloudproviderById ¶
func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider
func (*SCloudproviderManager) FetchCloudproviderByIdOrName ¶
func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider
func (*SCloudproviderManager) GetOwnerId ¶
func (manager *SCloudproviderManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
func (*SCloudproviderManager) InitializeData ¶
func (manager *SCloudproviderManager) InitializeData() error
func (*SCloudproviderManager) ValidateCreateData ¶
func (self *SCloudproviderManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SCloudproviderUsage ¶
type SCloudregion ¶
type SCloudregion struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure Latitude float32 `list:"user"` Longitude float32 `list:"user"` Provider string `width:"64" charset:"ascii" list:"user"` }
func (*SCloudregion) AllowPerformDefaultVpc ¶
func (self *SCloudregion) AllowPerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudregion) CustomizeCreate ¶
func (self *SCloudregion) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SCloudregion) GetCustomizeColumns ¶
func (self *SCloudregion) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudregion) GetExtraDetails ¶
func (self *SCloudregion) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SCloudregion) GetGuestCount ¶
func (self *SCloudregion) GetGuestCount(increment bool) int
func (*SCloudregion) GetVpcCount ¶
func (self *SCloudregion) GetVpcCount() int
func (*SCloudregion) GetZoneCount ¶
func (self *SCloudregion) GetZoneCount() int
func (*SCloudregion) PerformDefaultVpc ¶
func (self *SCloudregion) PerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudregion) ValidateDeleteCondition ¶
func (self *SCloudregion) ValidateDeleteCondition(ctx context.Context) error
func (*SCloudregion) ValidateUpdateCondition ¶
func (self *SCloudregion) ValidateUpdateCondition(ctx context.Context) error
type SCloudregionManager ¶
type SCloudregionManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var CloudregionManager *SCloudregionManager
func (*SCloudregionManager) AllowListItems ¶
func (manager *SCloudregionManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SCloudregionManager) FetchRegionById ¶
func (manager *SCloudregionManager) FetchRegionById(id string) *SCloudregion
func (*SCloudregionManager) InitializeData ¶
func (manager *SCloudregionManager) InitializeData() error
func (*SCloudregionManager) ListItemFilter ¶
func (manager *SCloudregionManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SCloudregionManager) SyncRegions ¶
func (manager *SCloudregionManager) SyncRegions(ctx context.Context, userCred mcclient.TokenCredential, provider string, regions []cloudprovider.ICloudRegion) ([]SCloudregion, []cloudprovider.ICloudRegion, compare.SyncResult)
func (*SCloudregionManager) ValidateCreateData ¶
func (manager *SCloudregionManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SDeployConfig ¶
type SDisk ¶
type SDisk struct { db.SSharableVirtualResourceBase SBillingResourceBase DiskFormat string `width:"32" charset:"ascii" nullable:"false" default:"qcow2" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=False, default='qcow2') DiskSize int `nullable:"false" list:"user"` // Column(Integer, nullable=False) # in MB AccessPath string `width:"256" charset:"ascii" nullable:"true" get:"user"` // = Column(VARCHAR(256, charset='ascii'), nullable=True) AutoDelete bool `nullable:"false" default:"false" get:"user" update:"user"` // Column(Boolean, nullable=False, default=False) StorageId string `width:"128" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True) // # backing template id and type TemplateId string `width:"256" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True) // # file system FsFormat string `width:"32" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True) // # disk type, OS, SWAP, DAT DiskType string `width:"32" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True) // # is persistent Nonpersistent bool `default:"false" list:"user"` // Column(Boolean, default=False) AutoSnapshot bool `default:"false" nullable:"true" get:"user" update:"user"` }
func (*SDisk) AllowGetDetailsConvertSnapshot ¶
func (self *SDisk) AllowGetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SDisk) AllowPerformCancelDelete ¶
func (self *SDisk) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) AllowPerformCreateSnapshot ¶
func (self *SDisk) AllowPerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) AllowPerformDiskReset ¶
func (self *SDisk) AllowPerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) AllowPerformPurge ¶
func (self *SDisk) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) AllowPerformResize ¶
func (self *SDisk) AllowPerformResize(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) AllowPerformSave ¶
func (self *SDisk) AllowPerformSave(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDisk) CleanUpDiskSnapshots ¶
func (self *SDisk) CleanUpDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, snapshot *SSnapshot) error
On disk reset, auto delete snapshots after the reset snapshot(reserve manualed snapshot)
func (*SDisk) ClearHostSchedCache ¶
func (*SDisk) CustomizeCreate ¶
func (self *SDisk) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SDisk) CustomizeDelete ¶
func (self *SDisk) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SDisk) GetAttachedGuests ¶
func (*SDisk) GetCloudprovider ¶
func (self *SDisk) GetCloudprovider() *SCloudprovider
func (*SDisk) GetCustomizeColumns ¶
func (self *SDisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SDisk) GetDetailsConvertSnapshot ¶
func (self *SDisk) GetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) GetExtraDetails ¶
func (self *SDisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SDisk) GetFetchUrl ¶
func (*SDisk) GetFsFormat ¶
func (*SDisk) GetGuestDiskCount ¶
func (*SDisk) GetGuestdisks ¶
func (self *SDisk) GetGuestdisks() []SGuestdisk
func (*SDisk) GetGuestsCount ¶
func (*SDisk) GetIDisk ¶
func (self *SDisk) GetIDisk() (cloudprovider.ICloudDisk, error)
func (*SDisk) GetIStorage ¶
func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
func (*SDisk) GetMountPoint ¶
func (*SDisk) GetPathAtHost ¶
func (*SDisk) GetRuningGuestCount ¶
func (*SDisk) GetShortDesc ¶
func (*SDisk) GetSnapshotCount ¶
func (*SDisk) GetStorage ¶
func (*SDisk) GetTemplateId ¶
func (*SDisk) PerformCancelDelete ¶
func (self *SDisk) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PerformCreateSnapshot ¶
func (self *SDisk) PerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PerformDiskReset ¶
func (self *SDisk) PerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PerformPurge ¶
func (self *SDisk) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PerformResize ¶
func (self *SDisk) PerformResize(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PerformSave ¶
func (self *SDisk) PerformSave(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDisk) PrepareSaveImage ¶
func (*SDisk) RealDelete ¶
func (*SDisk) SetDiskReady ¶
func (*SDisk) SetStorageByHost ¶
func (disk *SDisk) SetStorageByHost(hostId string, diskConfig *SDiskConfig) error
func (*SDisk) StartAllocate ¶
func (*SDisk) StartDiskCreateTask ¶
func (*SDisk) StartDiskDeleteTask ¶
func (*SDisk) StartDiskResizeTask ¶
func (*SDisk) StartDiskSaveTask ¶
func (*SDisk) StartResetDisk ¶
func (*SDisk) ToDiskInfo ¶
func (*SDisk) ValidateDeleteCondition ¶
func (*SDisk) ValidateUpdateData ¶
type SDiskConfig ¶
type SDiskManager ¶
type SDiskManager struct {
db.SSharableVirtualResourceBaseManager
}
var DiskManager *SDiskManager
func (*SDiskManager) AutoDiskSnapshot ¶
func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential)
func (*SDiskManager) CleanPendingDeleteDisks ¶
func (manager *SDiskManager) CleanPendingDeleteDisks(ctx context.Context, userCred mcclient.TokenCredential)
func (*SDiskManager) GetContextManager ¶
func (manager *SDiskManager) GetContextManager() []db.IModelManager
func (*SDiskManager) ListItemFilter ¶
func (manager *SDiskManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SDiskManager) OnCreateComplete ¶
func (manager *SDiskManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SDiskManager) SyncDisks ¶
func (manager *SDiskManager) SyncDisks(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, disks []cloudprovider.ICloudDisk, projectId string, projectSync bool) ([]SDisk, []cloudprovider.ICloudDisk, compare.SyncResult)
func (*SDiskManager) ValidateCreateData ¶
func (manager *SDiskManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SDnsRecord ¶
type SDnsRecord struct { db.SAdminSharableVirtualResourceBase Ttl int `nullable:"true" default:"1" create:"optional" list:"user" update:"user"` Enabled bool `nullable:"false" default:"true" create:"optional" list:"user"` }
func (*SDnsRecord) AddInfo ¶
func (rec *SDnsRecord) AddInfo(userCred mcclient.TokenCredential, data jsonutils.JSONObject) error
func (*SDnsRecord) AllowPerformAddRecords ¶
func (rec *SDnsRecord) AllowPerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDnsRecord) AllowPerformDisable ¶
func (rec *SDnsRecord) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDnsRecord) AllowPerformEnable ¶
func (rec *SDnsRecord) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDnsRecord) AllowPerformRemoveRecords ¶
func (rec *SDnsRecord) AllowPerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDnsRecord) GetInfo ¶
func (rec *SDnsRecord) GetInfo() []string
func (*SDnsRecord) PerformAddRecords ¶
func (rec *SDnsRecord) PerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDnsRecord) PerformDisable ¶
func (rec *SDnsRecord) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDnsRecord) PerformEnable ¶
func (rec *SDnsRecord) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDnsRecord) PerformRemoveRecords ¶
func (rec *SDnsRecord) PerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDnsRecord) ValidateUpdateData ¶
func (rec *SDnsRecord) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SDnsRecordManager ¶
type SDnsRecordManager struct {
db.SAdminSharableVirtualResourceBaseManager
}
var DnsRecordManager *SDnsRecordManager
func (*SDnsRecordManager) GetRecordsLimit ¶
func (man *SDnsRecordManager) GetRecordsLimit() int
GetRecordsLimit implements IAdminSharableVirtualModelManager
func (*SDnsRecordManager) GetRecordsSeparator ¶
func (man *SDnsRecordManager) GetRecordsSeparator() string
GetRecordsSeparator implements IAdminSharableVirtualModelManager
func (*SDnsRecordManager) ParseInputInfo ¶
func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) ([]string, error)
ParseInputInfo implements IAdminSharableVirtualModelManager
func (*SDnsRecordManager) QueryDns ¶
func (man *SDnsRecordManager) QueryDns(projectId, name string) *SDnsRecord
func (*SDnsRecordManager) QueryDnsIps ¶
func (man *SDnsRecordManager) QueryDnsIps(projectId, name, kind string) []*DnsIp
func (*SDnsRecordManager) ValidateCreateData ¶
func (man *SDnsRecordManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict, ) (*jsonutils.JSONDict, error)
type SDynamicschedtag ¶
type SDynamicschedtag struct { db.SStandaloneResourceBase SInfrastructure Condition string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"` SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"` Enabled bool `nullable:"false" default:"true" create:"optional" list:"user" update:"user"` }
dynamic schedtag is called before scan host candidates, dynamically adding additional schedtag to hosts condition examples:
host.sys_load > 1.5 || host.mem_used_percent > 0.7 => "high_load"
func (*SDynamicschedtag) AllowPerformEvaluate ¶
func (self *SDynamicschedtag) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SDynamicschedtag) GetCustomizeColumns ¶
func (self *SDynamicschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SDynamicschedtag) GetExtraDetails ¶
func (self *SDynamicschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SDynamicschedtag) PerformEvaluate ¶
func (self *SDynamicschedtag) PerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SDynamicschedtag) ValidateUpdateData ¶
func (self *SDynamicschedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SDynamicschedtagManager ¶
type SDynamicschedtagManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var DynamicschedtagManager *SDynamicschedtagManager
func (*SDynamicschedtagManager) ValidateCreateData ¶
func (manager *SDynamicschedtagManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SElasticip ¶
type SElasticip struct { db.SVirtualResourceBase SManagedResourceBase Mode string `width:"32" charset:"ascii" list:"user"` IpAddr string `width:"17" charset:"ascii" list:"user"` AssociateType string `width:"32" charset:"ascii" list:"user"` AssociateId string `width:"256" charset:"ascii" list:"user"` Bandwidth int `list:"user" create:"required"` ChargeType string `list:"user" create:"required" default:"traffic"` AutoDellocate tristate.TriState `default:"false" get:"user" create:"optional"` CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` }
func (*SElasticip) AllowPerformAssociate ¶
func (self *SElasticip) AllowPerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SElasticip) AllowPerformChangeBandwidth ¶
func (self *SElasticip) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SElasticip) AllowPerformDissociate ¶
func (self *SElasticip) AllowPerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SElasticip) AllowPerformPurge ¶
func (self *SElasticip) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SElasticip) AllowPerformSync ¶
func (self *SElasticip) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SElasticip) AssociateVM ¶
func (self *SElasticip) AssociateVM(userCred mcclient.TokenCredential, vm *SGuest) error
func (*SElasticip) CustomizeDelete ¶
func (self *SElasticip) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SElasticip) Delete ¶
func (self *SElasticip) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SElasticip) Dissociate ¶
func (self *SElasticip) Dissociate(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SElasticip) DoChangeBandwidth ¶
func (self *SElasticip) DoChangeBandwidth(userCred mcclient.TokenCredential, bandwidth int) error
func (*SElasticip) DoPendingDelete ¶
func (self *SElasticip) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SElasticip) GetAssociateVM ¶
func (self *SElasticip) GetAssociateVM() *SGuest
func (*SElasticip) GetCustomizeColumns ¶
func (self *SElasticip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SElasticip) GetExtraDetails ¶
func (self *SElasticip) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SElasticip) GetIEip ¶
func (self *SElasticip) GetIEip() (cloudprovider.ICloudEIP, error)
func (*SElasticip) GetIRegion ¶
func (self *SElasticip) GetIRegion() (cloudprovider.ICloudRegion, error)
func (*SElasticip) GetRegion ¶
func (self *SElasticip) GetRegion() *SCloudregion
func (*SElasticip) GetShortDesc ¶
func (self *SElasticip) GetShortDesc() *jsonutils.JSONDict
func (*SElasticip) PerformAssociate ¶
func (self *SElasticip) PerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SElasticip) PerformChangeBandwidth ¶
func (self *SElasticip) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SElasticip) PerformDissociate ¶
func (self *SElasticip) PerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SElasticip) PerformPurge ¶
func (self *SElasticip) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SElasticip) PerformSync ¶
func (self *SElasticip) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SElasticip) PostCreate ¶
func (self *SElasticip) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SElasticip) RealDelete ¶
func (self *SElasticip) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SElasticip) StartEipAssociateTask ¶
func (self *SElasticip) StartEipAssociateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error
func (*SElasticip) StartEipChangeBandwidthTask ¶
func (self *SElasticip) StartEipChangeBandwidthTask(ctx context.Context, userCred mcclient.TokenCredential, bandwidth int64) error
func (*SElasticip) StartEipDeallocateTask ¶
func (self *SElasticip) StartEipDeallocateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
func (*SElasticip) StartEipDissociateTask ¶
func (self *SElasticip) StartEipDissociateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
func (*SElasticip) StartEipSyncstatusTask ¶
func (self *SElasticip) StartEipSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
func (*SElasticip) SyncInstanceWithCloudEip ¶
func (self *SElasticip) SyncInstanceWithCloudEip(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudEIP) error
func (*SElasticip) SyncWithCloudEip ¶
func (self *SElasticip) SyncWithCloudEip(userCred mcclient.TokenCredential, ext cloudprovider.ICloudEIP, projectId string, projectSync bool) error
func (*SElasticip) ValidateDeleteCondition ¶
func (self *SElasticip) ValidateDeleteCondition(ctx context.Context) error
type SElasticipManager ¶
type SElasticipManager struct {
db.SVirtualResourceBaseManager
}
var ElasticipManager *SElasticipManager
func (*SElasticipManager) ListItemFilter ¶
func (manager *SElasticipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SElasticipManager) SyncEips ¶
func (manager *SElasticipManager) SyncEips(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, eips []cloudprovider.ICloudEIP, projectId string, projectSync bool) compare.SyncResult
func (*SElasticipManager) TotalCount ¶
func (manager *SElasticipManager) TotalCount(projectId string, rangeObj db.IStandaloneModel, hostTypes []string) EipUsage
func (*SElasticipManager) ValidateCreateData ¶
func (manager *SElasticipManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SGroup ¶
type SGroup struct { db.SVirtualResourceBase ServiceType string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) ParentId string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) ZoneId string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=True) SchedStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”) }
type SGroupJointsBase ¶
type SGroupJointsBase struct { db.SVirtualJointResourceBase SrvtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) }
func (*SGroupJointsBase) GetGroup ¶
func (self *SGroupJointsBase) GetGroup() *SGuest
type SGroupJointsManager ¶
type SGroupJointsManager struct {
db.SVirtualJointResourceBaseManager
}
func NewGroupJointsManager ¶
func NewGroupJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SGroupJointsManager
type SGroupManager ¶
type SGroupManager struct {
db.SVirtualResourceBaseManager
}
var GroupManager *SGroupManager
type SGroupguest ¶
type SGroupguest struct { SGroupJointsBase Tag string `width:"256" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(256, charset='ascii'), nullable=True) GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) }
func (*SGroupguest) Delete ¶
func (self *SGroupguest) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGroupguest) Detach ¶
func (self *SGroupguest) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGroupguest) GetCustomizeColumns ¶
func (self *SGroupguest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGroupguest) GetExtraDetails ¶
func (self *SGroupguest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGroupguest) GetGuest ¶
func (self *SGroupguest) GetGuest() *SGuest
func (*SGroupguest) Master ¶
func (joint *SGroupguest) Master() db.IStandaloneModel
func (*SGroupguest) Slave ¶
func (joint *SGroupguest) Slave() db.IStandaloneModel
type SGroupguestManager ¶
type SGroupguestManager struct {
SGroupJointsManager
}
var GroupguestManager *SGroupguestManager
type SGroupnetwork ¶
type SGroupnetwork struct { SGroupJointsBase NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) IpAddr string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) Index int8 `nullable:"false" default:"0" list:"user" list:"user" update:"user" create:"optional"` // Column(TINYINT, nullable=False, default=0) EipId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True) }
func (*SGroupnetwork) Delete ¶
func (self *SGroupnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGroupnetwork) Detach ¶
func (self *SGroupnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGroupnetwork) GetCustomizeColumns ¶
func (self *SGroupnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGroupnetwork) GetExtraDetails ¶
func (self *SGroupnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGroupnetwork) Master ¶
func (joint *SGroupnetwork) Master() db.IStandaloneModel
func (*SGroupnetwork) Slave ¶
func (joint *SGroupnetwork) Slave() db.IStandaloneModel
type SGroupnetworkManager ¶
type SGroupnetworkManager struct {
SGroupJointsManager
}
var GroupnetworkManager *SGroupnetworkManager
type SGuest ¶
type SGuest struct { db.SVirtualResourceBase SBillingResourceBase VcpuCount int8 `nullable:"false" default:"1" list:"user" create:"optional"` // Column(TINYINT, nullable=False, default=1) VmemSize int `nullable:"false" list:"user" create:"required"` // Column(Integer, nullable=False) BootOrder string `width:"8" charset:"ascii" nullable:"true" default:"cdn" list:"user" update:"user" create:"optional"` // Column(VARCHAR(8, charset='ascii'), nullable=True, default='cdn') DisableDelete tristate.TriState `nullable:"false" default:"true" list:"user" update:"user" create:"optional"` // Column(Boolean, nullable=False, default=True) ShutdownBehavior string `width:"16" charset:"ascii" default:"stop" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), default=SHUTDOWN_STOP) KeypairId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) HostId string `width:"36" charset:"ascii" nullable:"true" list:"admin" get:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Vga string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Vdi string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Machine string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Bios string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) OsType string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) FlavorId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) SecgrpId string `width:"36" charset:"ascii" nullable:"true" get:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True) AdminSecgrpId string `width:"36" charset:"ascii" nullable:"true" get:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Hypervisor string `width:"16" charset:"ascii" nullable:"false" default:"kvm" list:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False, default=HYPERVISOR_DEFAULT) }
func (*SGuest) AllowDeleteItem ¶
func (self *SGuest) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowGetDetailsDesc ¶
func (self *SGuest) AllowGetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SGuest) AllowGetDetailsMonitor ¶
func (self *SGuest) AllowGetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SGuest) AllowGetDetailsVnc ¶
func (self *SGuest) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SGuest) AllowPerformAssignSecgroup ¶
func (self *SGuest) AllowPerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformAssociateEip ¶
func (self *SGuest) AllowPerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformAttachIsolatedDevice ¶
func (self *SGuest) AllowPerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformAttachdisk ¶
func (self *SGuest) AllowPerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformAttachnetwork ¶
func (self *SGuest) AllowPerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformCancelDelete ¶
func (model *SGuest) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformChangeBandwidth ¶
func (self *SGuest) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformChangeConfig ¶
func (self *SGuest) AllowPerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformCreateEip ¶
func (self *SGuest) AllowPerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformCreatedisk ¶
func (self *SGuest) AllowPerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDeploy ¶
func (self *SGuest) AllowPerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDetachIsolatedDevice ¶
func (self *SGuest) AllowPerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDetachdisk ¶
func (self *SGuest) AllowPerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDetachnetwork ¶
func (self *SGuest) AllowPerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDiskSnapshot ¶
func (self *SGuest) AllowPerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformDissociateEip ¶
func (self *SGuest) AllowPerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformLiveMigrate ¶
func (self *SGuest) AllowPerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformMigrate ¶
func (self *SGuest) AllowPerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformPurge ¶
func (self *SGuest) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformRebuildRoot ¶
func (self *SGuest) AllowPerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformReset ¶
func (self *SGuest) AllowPerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformRestart ¶
func (self *SGuest) AllowPerformRestart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformRevokeSecgroup ¶
func (self *SGuest) AllowPerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformSaveImage ¶
func (self *SGuest) AllowPerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformSendkeys ¶
func (self *SGuest) AllowPerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformStart ¶
func (self *SGuest) AllowPerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformStop ¶
func (self *SGuest) AllowPerformStop(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformSuspend ¶
func (self *SGuest) AllowPerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformSync ¶
func (self *SGuest) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformSyncstatus ¶
func (self *SGuest) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) AllowPerformUserData ¶
func (self *SGuest) AllowPerformUserData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuest) Attach2Network ¶
func (*SGuest) AttachDisk ¶
func (*SGuest) CategorizeDisks ¶
func (self *SGuest) CategorizeDisks() SGuestDiskCategory
func (*SGuest) CategorizeNics ¶
func (self *SGuest) CategorizeNics() SGuestNicCategory
func (*SGuest) CheckQemuVersion ¶
if qemuVer >= compareVer return true
func (*SGuest) CreateDisksOnHost ¶
func (*SGuest) CreateIsolatedDeviceOnHost ¶
func (*SGuest) CreateNetworksOnHost ¶
func (*SGuest) CustomizeCreate ¶
func (guest *SGuest) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SGuest) CustomizeDelete ¶
func (self *SGuest) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SGuest) DeleteAllDisksInDB ¶
func (*SGuest) DetachAllNetworks ¶
func (*SGuest) DetachDisk ¶
func (*SGuest) DoCancelPendingDelete ¶
func (*SGuest) DoPendingDelete ¶
func (self *SGuest) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SGuest) FillDiskSchedDesc ¶
func (*SGuest) FillGroupSchedDesc ¶
func (*SGuest) FillNetSchedDesc ¶
func (*SGuest) GetApptags ¶
func (*SGuest) GetCustomizeColumns ¶
func (self *SGuest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuest) GetDeployConfigOnHost ¶
func (*SGuest) GetDetailsDesc ¶
func (self *SGuest) GetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) GetDetailsIso ¶
func (self *SGuest) GetDetailsIso(userCred mcclient.TokenCredential) jsonutils.JSONObject
func (*SGuest) GetDetailsMonitor ¶
func (self *SGuest) GetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) GetDetailsVnc ¶
func (self *SGuest) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) GetDisks ¶
func (guest *SGuest) GetDisks() []SGuestdisk
func (*SGuest) GetDisksQuery ¶
func (*SGuest) GetDriver ¶
func (guest *SGuest) GetDriver() IGuestDriver
func (*SGuest) GetEip ¶
func (self *SGuest) GetEip() (*SElasticip, error)
func (*SGuest) GetExtraDetails ¶
func (self *SGuest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuest) GetGroups ¶
func (guest *SGuest) GetGroups() []SGroupguest
func (*SGuest) GetGuestDisk ¶
func (guest *SGuest) GetGuestDisk(diskId string) *SGuestdisk
func (*SGuest) GetHostType ¶
func (*SGuest) GetHypervisor ¶
func (*SGuest) GetIsolatedDevices ¶
func (self *SGuest) GetIsolatedDevices() []SIsolatedDevice
func (*SGuest) GetJsonDescAtBaremetal ¶
func (*SGuest) GetJsonDescAtHypervisor ¶
func (*SGuest) GetKeypairPublicKey ¶
func (*SGuest) GetNetworks ¶
func (guest *SGuest) GetNetworks() []SGuestnetwork
func (*SGuest) GetNetworksQuery ¶
func (*SGuest) GetQemuVersion ¶
func (self *SGuest) GetQemuVersion(userCred mcclient.TokenCredential) string
func (*SGuest) GetRealIps ¶
func (*SGuest) GetSecRules ¶
func (self *SGuest) GetSecRules() []secrules.SecurityRule
func (*SGuest) GetSecgroupName ¶
func (*SGuest) GetShortDesc ¶
func (*SGuest) GetTemplateId ¶
func (*SGuest) InsertIsoSucc ¶
func (*SGuest) IsExitOnly ¶
func (*SGuest) IsLegalKey ¶
func (*SGuest) IsNetworkAllocated ¶
func (*SGuest) JoinGroups ¶
func (self *SGuest) JoinGroups(userCred mcclient.TokenCredential, params *jsonutils.JSONDict)
func (*SGuest) LeaveAllGroups ¶
func (self *SGuest) LeaveAllGroups(userCred mcclient.TokenCredential)
func (*SGuest) NetworkCount ¶
func (*SGuest) NotifyAdminServerEvent ¶
func (*SGuest) NotifyServerEvent ¶
func (*SGuest) PerformAssignSecgroup ¶
func (self *SGuest) PerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformAssociateEip ¶
func (self *SGuest) PerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformAttachIsolatedDevice ¶
func (self *SGuest) PerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformAttachdisk ¶
func (self *SGuest) PerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformAttachnetwork ¶
func (self *SGuest) PerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformCancelDelete ¶
func (self *SGuest) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformChangeBandwidth ¶
func (self *SGuest) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformChangeConfig ¶
func (self *SGuest) PerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformCreateEip ¶
func (self *SGuest) PerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformCreatedisk ¶
func (self *SGuest) PerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDeploy ¶
func (self *SGuest) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDetachIsolatedDevice ¶
func (self *SGuest) PerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDetachdisk ¶
func (self *SGuest) PerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDetachnetwork ¶
func (self *SGuest) PerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDiskSnapshot ¶
func (self *SGuest) PerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformDissociateEip ¶
func (self *SGuest) PerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformLiveMigrate ¶
func (self *SGuest) PerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformMigrate ¶
func (self *SGuest) PerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformPurge ¶
func (self *SGuest) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformRebuildRoot ¶
func (self *SGuest) PerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformReset ¶
func (self *SGuest) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformRestart ¶
func (self *SGuest) PerformRestart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformRevokeSecgroup ¶
func (self *SGuest) PerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformSaveImage ¶
func (self *SGuest) PerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformSendkeys ¶
func (self *SGuest) PerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformStart ¶
func (self *SGuest) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformStatus ¶
func (self *SGuest) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformStop ¶
func (self *SGuest) PerformStop(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformSuspend ¶
func (self *SGuest) PerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformSync ¶
func (self *SGuest) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformSyncstatus ¶
func (self *SGuest) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PerformUserData ¶
func (self *SGuest) PerformUserData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuest) PostCreate ¶
func (guest *SGuest) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SGuest) RealDelete ¶
func (*SGuest) SaveDeployInfo ¶
func (self *SGuest) SaveDeployInfo(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject)
func (*SGuest) SendMonitorCommand ¶
func (self *SGuest) SendMonitorCommand(ctx context.Context, userCred mcclient.TokenCredential, cmd string) (jsonutils.JSONObject, error)
func (*SGuest) SetDisableDelete ¶
func (*SGuest) StartAutoDeleteGuestTask ¶
func (*SGuest) StartChangeConfigTask ¶
func (*SGuest) StartDeleteGuestTask ¶
func (*SGuest) StartDiskSnapshot ¶
func (*SGuest) StartGuestCreateDiskTask ¶
func (*SGuest) StartGuestCreateTask ¶
func (*SGuest) StartGuestDeployTask ¶
func (*SGuest) StartGuestLiveMigrateTask ¶
func (*SGuest) StartGuestSaveImage ¶
func (*SGuest) StartGuestStopTask ¶
func (*SGuest) StartGueststartTask ¶
func (*SGuest) StartInsertIsoTask ¶
func (*SGuest) StartMigrateTask ¶
func (*SGuest) StartRebuildRootTask ¶
func (*SGuest) StartSuspendTask ¶
func (*SGuest) StartSyncTask ¶
func (*SGuest) StartSyncstatus ¶
func (*SGuest) StartUndeployGuestTask ¶
func (*SGuest) SyncVMDisks ¶
func (self *SGuest) SyncVMDisks(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vdisks []cloudprovider.ICloudDisk, projectId string, projectSync bool) compare.SyncResult
func (*SGuest) SyncVMEip ¶
func (self *SGuest) SyncVMEip(ctx context.Context, userCred mcclient.TokenCredential, extEip cloudprovider.ICloudEIP, projectId string) compare.SyncResult
func (*SGuest) SyncVMNics ¶
func (self *SGuest) SyncVMNics(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vnics []cloudprovider.ICloudNic) compare.SyncResult
func (*SGuest) ToSchedDesc ¶
func (*SGuest) ValidateAttachDisk ¶
func (*SGuest) ValidateDeleteCondition ¶
func (*SGuest) ValidateResizeDisk ¶
func (*SGuest) ValidateUpdateData ¶
func (*SGuest) VerifySendKeys ¶
type SGuestCountStat ¶
type SGuestDiskCategory ¶
type SGuestJointsBase ¶
type SGuestJointsBase struct { db.SVirtualJointResourceBase GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) }
type SGuestJointsManager ¶
type SGuestJointsManager struct {
db.SVirtualJointResourceBaseManager
}
func NewGuestJointsManager ¶
func NewGuestJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SGuestJointsManager
type SGuestManager ¶
type SGuestManager struct {
db.SVirtualResourceBaseManager
}
var GuestManager *SGuestManager
func (*SGuestManager) AllowListItems ¶
func (manager *SGuestManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SGuestManager) CleanPendingDeleteServers ¶
func (manager *SGuestManager) CleanPendingDeleteServers(ctx context.Context, userCred mcclient.TokenCredential)
func (*SGuestManager) ExtraSearchConditions ¶
func (manager *SGuestManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
func (*SGuestManager) FetchGuestById ¶
func (manager *SGuestManager) FetchGuestById(guestId string) *SGuest
func (*SGuestManager) GetExportExtraKeys ¶
func (manager *SGuestManager) GetExportExtraKeys(ctx context.Context, query jsonutils.JSONObject, rowMap map[string]string) *jsonutils.JSONDict
func (*SGuestManager) GetIpInProjectWithName ¶
func (manager *SGuestManager) GetIpInProjectWithName(projectId, name string, isExitOnly bool) []string
func (*SGuestManager) GetSpecIdent ¶
func (manager *SGuestManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
func (*SGuestManager) ListItemExportKeys ¶
func (manager *SGuestManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SGuestManager) ListItemFilter ¶
func (manager *SGuestManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SGuestManager) OnCreateComplete ¶
func (manager *SGuestManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SGuestManager) TotalCount ¶
func (manager *SGuestManager) TotalCount( projectId string, rangeObj db.IStandaloneModel, status []string, hypervisors []string, includeSystem bool, pendingDelete bool, hostType string, ) SGuestCountStat
func (*SGuestManager) ValidateCreateData ¶
func (manager *SGuestManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SGuestNicCategory ¶
type SGuestNicCategory struct { InternalNics []SGuestnetwork ExternalNics []SGuestnetwork }
type SGuestcdrom ¶
type SGuestcdrom struct { db.SModelBase Id string `width:"36" charset:"ascii" primary:"true"` // = Column(VARCHAR(36, charset='ascii'), primary_key=True) ImageId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Name string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True) Path string `width:"256" charset:"ascii" nullable:"true"` // Column(VARCHAR(256, charset='ascii'), nullable=True) Size int `nullable:"false" default:"0"` // = Column(Integer, nullable=False, default=0) UpdatedAt time.Time `nullable:"false" updated_at:"true" nullable:"false"` UpdateVersion int `default:"0" nullable:"false" auto_version:"true"` }
func (*SGuestcdrom) GetDetails ¶
func (self *SGuestcdrom) GetDetails() string
type SGuestcdromManager ¶
type SGuestcdromManager struct {
db.SModelBaseManager
}
var GuestcdromManager *SGuestcdromManager
type SGuestdisk ¶
type SGuestdisk struct { SGuestJointsBase DiskId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) ImagePath string `width:"256" charset:"ascii" nullable:"false" get:"user" create:"required"` // Column(VARCHAR(256, charset='ascii'), nullable=False) Driver string `width:"32" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True) CacheMode string `width:"32" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True) AioMode string `width:"32" charset:"ascii" nullable:"true" get:"user" update:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True) Mountpoint string `width:"256" charset:"utf8" nullable:"true" get:"user"` // Column(VARCHAR(256, charset='utf8'), nullable=True) Index int8 `nullable:"false" default:"0" list:"user" update:"user"` // Column(TINYINT(4), nullable=False, default=0) }
func (*SGuestdisk) AllowDeleteItem ¶
func (self *SGuestdisk) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuestdisk) Delete ¶
func (self *SGuestdisk) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGuestdisk) Detach ¶
func (self *SGuestdisk) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGuestdisk) DoSave ¶
func (self *SGuestdisk) DoSave(driver string, cache string, mountpoint string) error
func (*SGuestdisk) GetCustomizeColumns ¶
func (self *SGuestdisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuestdisk) GetDetailedJson ¶
func (self *SGuestdisk) GetDetailedJson() *jsonutils.JSONDict
func (*SGuestdisk) GetDetailedString ¶
func (self *SGuestdisk) GetDetailedString() string
func (*SGuestdisk) GetDisk ¶
func (self *SGuestdisk) GetDisk() *SDisk
func (*SGuestdisk) GetExtraDetails ¶
func (self *SGuestdisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuestdisk) GetJsonDescAtHost ¶
func (self *SGuestdisk) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject
func (*SGuestdisk) Master ¶
func (joint *SGuestdisk) Master() db.IStandaloneModel
func (*SGuestdisk) Slave ¶
func (joint *SGuestdisk) Slave() db.IStandaloneModel
func (*SGuestdisk) ToDiskInfo ¶
func (self *SGuestdisk) ToDiskInfo() DiskInfo
func (*SGuestdisk) ValidateUpdateData ¶
func (self *SGuestdisk) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SGuestdiskManager ¶
type SGuestdiskManager struct {
SGuestJointsManager
}
var GuestdiskManager *SGuestdiskManager
func (*SGuestdiskManager) AllowCreateItem ¶
func (manager *SGuestdiskManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
type SGuestnetwork ¶
type SGuestnetwork struct { SGuestJointsBase NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) MacAddr string `width:"32" charset:"ascii" nullable:"false" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=False) IpAddr string `width:"16" charset:"ascii" nullable:"false" list:"user"` // Column(VARCHAR(16, charset='ascii'), nullable=True) Ip6Addr string `width:"64" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(64, charset='ascii'), nullable=True) Driver string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(16, charset='ascii'), nullable=True) BwLimit int `nullable:"false" default:"0" list:"user"` // Column(Integer, nullable=False, default=0) # Mbps Index int8 `nullable:"false" default:"0" list:"user" update:"user"` // Column(TINYINT, nullable=False, default=0) Virtual bool `default:"false" list:"user"` // Column(Boolean, default=False) Ifname string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(16, charset='ascii'), nullable=True) }
func (*SGuestnetwork) AllowDeleteItem ¶
func (gn *SGuestnetwork) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuestnetwork) Delete ¶
func (self *SGuestnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGuestnetwork) Detach ¶
func (self *SGuestnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SGuestnetwork) GetCustomizeColumns ¶
func (self *SGuestnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuestnetwork) GetDetailedString ¶
func (self *SGuestnetwork) GetDetailedString() string
func (*SGuestnetwork) GetExtraDetails ¶
func (self *SGuestnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SGuestnetwork) GetFreeIfname ¶
func (self *SGuestnetwork) GetFreeIfname(network *SNetwork, ifTable map[string]bool) string
func (*SGuestnetwork) GetGuest ¶
func (self *SGuestnetwork) GetGuest() *SGuest
func (*SGuestnetwork) GetIfname ¶
func (self *SGuestnetwork) GetIfname() string
func (*SGuestnetwork) GetJsonDescAtHost ¶
func (self *SGuestnetwork) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject
func (*SGuestnetwork) GetNetwork ¶
func (gn *SGuestnetwork) GetNetwork() *SNetwork
func (*SGuestnetwork) GetVirtualIPs ¶
func (self *SGuestnetwork) GetVirtualIPs() []string
func (*SGuestnetwork) IsAllocated ¶
func (self *SGuestnetwork) IsAllocated() bool
func (*SGuestnetwork) IsExit ¶
func (self *SGuestnetwork) IsExit() bool
func (*SGuestnetwork) LogDetachEvent ¶
func (self *SGuestnetwork) LogDetachEvent(userCred mcclient.TokenCredential, guest *SGuest, network *SNetwork)
func (*SGuestnetwork) Master ¶
func (joint *SGuestnetwork) Master() db.IStandaloneModel
func (*SGuestnetwork) Slave ¶
func (joint *SGuestnetwork) Slave() db.IStandaloneModel
func (*SGuestnetwork) ValidateUpdateData ¶
func (self *SGuestnetwork) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SGuestnetworkManager ¶
type SGuestnetworkManager struct {
SGuestJointsManager
}
var GuestnetworkManager *SGuestnetworkManager
func (*SGuestnetworkManager) AllowCreateItem ¶
func (manager *SGuestnetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SGuestnetworkManager) DeleteGuestNics ¶
func (manager *SGuestnetworkManager) DeleteGuestNics(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, network *SNetwork, reserve bool) error
func (*SGuestnetworkManager) GenerateMac ¶
func (manager *SGuestnetworkManager) GenerateMac(netId string, suggestion string) string
func (*SGuestnetworkManager) GetGuestByAddress ¶
func (manager *SGuestnetworkManager) GetGuestByAddress(address string) *SGuest
type SHost ¶
type SHost struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure SManagedResourceBase Rack string `width:"16" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) Slots string `width:"16" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) AccessMac string `width:"32" charset:"ascii" nullable:"false" index:"true" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False, index=True) AccessIp string `width:"16" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(256, charset='ascii'), nullable=True) SysInfo jsonutils.JSONObject `nullable:"true" search:"admin" get:"admin" update:"admin" create:"admin_optional"` // Column(JSONEncodedDict, nullable=True) SN string `width:"128" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(128, charset='ascii'), nullable=True) CpuCount int8 `nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(TINYINT, nullable=True) # cpu count NodeCount int8 `nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(TINYINT, nullable=True) CpuDesc string `width:"64" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(64, charset='ascii'), nullable=True) CpuMhz int `nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True) # cpu MHz CpuCache int `nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True) # cpu Cache in KB CpuReserved int8 `nullable:"true" default:"0" list:"admin" update:"admin" create:"admin_optional"` // Column(TINYINT, nullable=True, default=0) CpuCmtbound float32 `nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // = Column(Float, nullable=True) MemSize int `nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True) # memory size in MB MemReserved int `nullable:"true" default:"0" list:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True, default=0) # memory reserved in MB MemCmtbound float32 `nullable:"true" update:"admin" create:"admin_optional"` // = Column(Float, nullable=True) StorageSize int `nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True) # storage size in MB StorageType string `width:"20" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(20, charset='ascii'), nullable=True) StorageDriver string `width:"20" charset:"ascii" nullable:"true" update:"admin" create:"admin_optional"` // Column(VARCHAR(20, charset='ascii'), nullable=True) StorageInfo jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(JSONEncodedDict, nullable=True) IpmiInfo jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(JSONEncodedDict, nullable=True) // Status string = Column(VARCHAR(16, charset='ascii'), nullable=False, default=baremetalstatus.INIT) # status HostStatus string `width:"16" charset:"ascii" nullable:"false" default:"offline" list:"admin"` // Column(VARCHAR(16, charset='ascii'), nullable=False, server_default=HOST_OFFLINE, default=HOST_OFFLINE) ZoneId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False) HostType string `width:"36" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False) Version string `width:"64" charset:"ascii" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(64, charset='ascii')) IsBaremetal bool `nullable:"true" default:"false" list:"admin" update:"true" create:"admin_optional"` // Column(Boolean, nullable=True, default=False) IsMaintenance bool `nullable:"true" default:"false" list:"admin"` // Column(Boolean, nullable=True, default=False) LastPingAt time.Time `` }
func (*SHost) AllowGetDetailsIpmi ¶
func (self *SHost) AllowGetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SHost) AllowGetDetailsVnc ¶
func (self *SHost) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SHost) AllowPerformAddNetif ¶
func (self *SHost) AllowPerformAddNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformCacheImage ¶
func (self *SHost) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformConvertHypervisor ¶
func (self *SHost) AllowPerformConvertHypervisor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformDisable ¶
func (self *SHost) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformDisableNetif ¶
func (self *SHost) AllowPerformDisableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformEnableNetif ¶
func (self *SHost) AllowPerformEnableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformMaintenance ¶
func (self *SHost) AllowPerformMaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformOffline ¶
func (self *SHost) AllowPerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformOnline ¶
func (self *SHost) AllowPerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformPing ¶
func (self *SHost) AllowPerformPing(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformPrepare ¶
func (self *SHost) AllowPerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformRemoveAllNetifs ¶
func (self *SHost) AllowPerformRemoveAllNetifs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformRemoveNetif ¶
func (self *SHost) AllowPerformRemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformReset ¶
func (self *SHost) AllowPerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformStart ¶
func (self *SHost) AllowPerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformStop ¶
func (self *SHost) AllowPerformStop(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformSyncstatus ¶
func (self *SHost) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformUndoConvert ¶
func (self *SHost) AllowPerformUndoConvert(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) AllowPerformUnmaintenance ¶
func (self *SHost) AllowPerformUnmaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHost) Attach2Network ¶
func (self *SHost) Attach2Network(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, net *SNetwork, ipAddr, allocDir string, reserved, requireDesignatedIp bool) error
func (*SHost) Attach2Storage ¶
func (*SHost) Attach2Wire ¶
func (*SHost) BaremetalSyncRequest ¶
func (*SHost) ClearSchedDescCache ¶
func (*SHost) CustomizeDelete ¶
func (self *SHost) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SHost) DeleteBaremetalnetwork ¶
func (self *SHost) DeleteBaremetalnetwork(ctx context.Context, userCred mcclient.TokenCredential, bn *SHostnetwork, reserve bool)
func (*SHost) DisableNetif ¶
func (self *SHost) DisableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error
func (*SHost) EnableNetif ¶
func (self *SHost) EnableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, network, ipAddr, allocDir string, reserve, requireDesignatedIp bool) error
func (*SHost) FetchIpmiInfo ¶
func (*SHost) GetAdminNetInterface ¶
func (self *SHost) GetAdminNetInterface() *SNetInterface
func (*SHost) GetAttach2Network ¶
func (self *SHost) GetAttach2Network(network *SNetwork) *SHostnetwork
func (*SHost) GetAttachedStorageCapacity ¶
func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity
func (*SHost) GetAttachedStorages ¶
func (*SHost) GetBaremetalServer ¶
func (*SHost) GetBaremetalnetworks ¶
func (self *SHost) GetBaremetalnetworks() []SHostnetwork
func (*SHost) GetBaremetalnetworksQuery ¶
func (*SHost) GetBaremetalstorage ¶
func (self *SHost) GetBaremetalstorage() *SHoststorage
func (*SHost) GetCPUOvercommitBound ¶
func (*SHost) GetCpuCount ¶
func (*SHost) GetCustomizeColumns ¶
func (self *SHost) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHost) GetDetailsIpmi ¶
func (self *SHost) GetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) GetDetailsVnc ¶
func (self *SHost) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) GetDriverWithDefault ¶
func (self *SHost) GetDriverWithDefault() IHostDriver
func (*SHost) GetExtraDetails ¶
func (self *SHost) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHost) GetFetchUrl ¶
func (*SHost) GetGuestCount ¶
func (*SHost) GetGuestsQuery ¶
func (*SHost) GetHardwareSpecification ¶
func (*SHost) GetHostDriver ¶
func (self *SHost) GetHostDriver() IHostDriver
func (*SHost) GetHostschedtags ¶
func (self *SHost) GetHostschedtags() []SHostschedtag
func (*SHost) GetHoststorageOfId ¶
func (self *SHost) GetHoststorageOfId(storageId string) *SHoststorage
func (*SHost) GetHoststorages ¶
func (self *SHost) GetHoststorages() []SHoststorage
func (*SHost) GetHoststoragesQuery ¶
func (*SHost) GetHostwires ¶
func (*SHost) GetIHost ¶
func (self *SHost) GetIHost() (cloudprovider.ICloudHost, error)
func (*SHost) GetLeastUsedStorage ¶
func (*SHost) GetLocalStoragecache ¶
func (self *SHost) GetLocalStoragecache() *SStoragecache
func (*SHost) GetMasterHostwire ¶
func (*SHost) GetMasterWire ¶
func (*SHost) GetMemSize ¶
func (*SHost) GetMemoryOvercommitBound ¶
func (*SHost) GetNetInterface ¶
func (self *SHost) GetNetInterface(mac string) *SNetInterface
func (*SHost) GetNetInterfaces ¶
func (self *SHost) GetNetInterfaces() []SNetInterface
func (*SHost) GetNetifName ¶
func (self *SHost) GetNetifName(netif *SNetInterface) string
func (*SHost) GetNetifsOnWire ¶
func (self *SHost) GetNetifsOnWire(wire *SWire) []SNetInterface
func (*SHost) GetNetinterfaceWithNetworkAndCredential ¶
func (self *SHost) GetNetinterfaceWithNetworkAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) (*SNetInterface, *SNetwork)
func (*SHost) GetNetworkWithIdAndCredential ¶
func (*SHost) GetNonsystemGuestCount ¶
func (*SHost) GetRegion ¶
func (self *SHost) GetRegion() *SCloudregion
func (*SHost) GetRunningGuestCount ¶
func (*SHost) GetStorageCount ¶
func (*SHost) GetVirtualCPUCount ¶
func (*SHost) GetVirtualMemorySize ¶
func (*SHost) GetWireCount ¶
func (*SHost) GetWiresQuery ¶
func (*SHost) InitializedGuestStart ¶
func (*SHost) InitializedGuestStop ¶
func (*SHost) IsBaremetalAgentReady ¶
func (*SHost) PerformAddNetif ¶
func (self *SHost) PerformAddNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformCacheImage ¶
func (self *SHost) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformConvertHypervisor ¶
func (self *SHost) PerformConvertHypervisor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformDisable ¶
func (self *SHost) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformDisableNetif ¶
func (self *SHost) PerformDisableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformEnableNetif ¶
func (self *SHost) PerformEnableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformMaintenance ¶
func (self *SHost) PerformMaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformOffline ¶
func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformOnline ¶
func (self *SHost) PerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformPing ¶
func (self *SHost) PerformPing(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformPrepare ¶
func (self *SHost) PerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformRemoveAllNetifs ¶
func (self *SHost) PerformRemoveAllNetifs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformRemoveNetif ¶
func (self *SHost) PerformRemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformReset ¶
func (self *SHost) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformStart ¶
func (self *SHost) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformStop ¶
func (self *SHost) PerformStop(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformSyncstatus ¶
func (self *SHost) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformUndoConvert ¶
func (self *SHost) PerformUndoConvert(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PerformUnmaintenance ¶
func (self *SHost) PerformUnmaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) PostCreate ¶
func (self *SHost) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SHost) RealDelete ¶
func (*SHost) RemoveNetif ¶
func (self *SHost) RemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error
func (*SHost) Request ¶
func (self *SHost) Request(userCred mcclient.TokenCredential, method string, url string, headers http.Header, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHost) StartBaremetalUnmaintenanceTask ¶
func (*SHost) StartDeleteBaremetalTask ¶
func (*SHost) StartImageCacheTask ¶
func (*SHost) StartPrepareTask ¶
func (*SHost) StartSyncAllGuestsStatusTask ¶
func (*SHost) StartSyncstatus ¶
func (*SHost) SyncAttachedStorageStatus ¶
func (self *SHost) SyncAttachedStorageStatus()
func (*SHost) SyncHostStorages ¶
func (self *SHost) SyncHostStorages(ctx context.Context, userCred mcclient.TokenCredential, storages []cloudprovider.ICloudStorage) compare.SyncResult
func (*SHost) SyncHostVMs ¶
func (self *SHost) SyncHostVMs(ctx context.Context, userCred mcclient.TokenCredential, vms []cloudprovider.ICloudVM, projectId string, projectSync bool) ([]SGuest, []cloudprovider.ICloudVM, compare.SyncResult)
func (*SHost) SyncHostWires ¶
func (self *SHost) SyncHostWires(ctx context.Context, userCred mcclient.TokenCredential, wires []cloudprovider.ICloudWire) compare.SyncResult
func (*SHost) UpdateDiskConfig ¶
func (*SHost) UpdateDnsRecord ¶
func (self *SHost) UpdateDnsRecord(netif *SNetInterface, isAdd bool)
func (*SHost) UpdateDnsRecords ¶
func (*SHost) ValidateDeleteCondition ¶
func (*SHost) ValidateUpdateData ¶
type SHostGuestResourceUsage ¶
type SHostJointsBase ¶
type SHostJointsBase struct {
db.SJointResourceBase
}
func (*SHostJointsBase) AllowDeleteItem ¶
func (self *SHostJointsBase) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHostJointsBase) AllowGetDetails ¶
func (self *SHostJointsBase) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SHostJointsBase) AllowUpdateItem ¶
func (self *SHostJointsBase) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
type SHostJointsManager ¶
type SHostJointsManager struct {
db.SJointResourceBaseManager
}
func NewHostJointsManager ¶
func NewHostJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IStandaloneModelManager) SHostJointsManager
func (*SHostJointsManager) AllowAttach ¶
func (manager *SHostJointsManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, master db.IStandaloneModel, slave db.IStandaloneModel) bool
func (*SHostJointsManager) AllowCreateItem ¶
func (manager *SHostJointsManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHostJointsManager) AllowListDescendent ¶
func (manager *SHostJointsManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, model db.IStandaloneModel, query jsonutils.JSONObject) bool
func (*SHostJointsManager) AllowListItems ¶
func (manager *SHostJointsManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
type SHostManager ¶
type SHostManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var HostManager *SHostManager
func (*SHostManager) AllowCreateItem ¶
func (manager *SHostManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SHostManager) AllowGetPropertyBmStartRegisterScript ¶
func (self *SHostManager) AllowGetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SHostManager) ClearAllSchedDescCache ¶
func (maanger *SHostManager) ClearAllSchedDescCache() error
func (*SHostManager) ClearSchedDescCache ¶
func (maanger *SHostManager) ClearSchedDescCache(hostId string) error
func (*SHostManager) FetchHostById ¶
func (manager *SHostManager) FetchHostById(hostId string) *SHost
func (*SHostManager) GetContextManager ¶
func (manager *SHostManager) GetContextManager() []db.IModelManager
func (*SHostManager) GetHostsByManagerAndRegion ¶
func (manager *SHostManager) GetHostsByManagerAndRegion(managerId string, regionId string) []SHost
func (*SHostManager) GetPropertyBmStartRegisterScript ¶
func (self *SHostManager) GetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SHostManager) GetSpecIdent ¶
func (manager *SHostManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
func (*SHostManager) ListItemFilter ¶
func (manager *SHostManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SHostManager) SyncHosts ¶
func (manager *SHostManager) SyncHosts(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, zone *SZone, hosts []cloudprovider.ICloudHost, projectSync bool) ([]SHost, []cloudprovider.ICloudHost, compare.SyncResult)
func (*SHostManager) TotalCount ¶
func (manager *SHostManager) TotalCount( userCred mcclient.TokenCredential, rangeObj db.IStandaloneModel, hostStatus, status string, hostTypes []string, enabled, isBaremetal tristate.TriState, ) HostsCountStat
func (*SHostManager) ValidateCreateData ¶
func (manager *SHostManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SHostManager) ValidateSizeParams ¶
type SHostnetwork ¶
type SHostnetwork struct { SHostJointsBase BaremetalId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) IpAddr string `width:"16" charset:"ascii" list:"admin"` // Column(VARCHAR(16, charset='ascii')) MacAddr string `width:"18" charset:"ascii" list:"admin"` // Column(VARCHAR(18, charset='ascii')) }
func (*SHostnetwork) Delete ¶
func (bn *SHostnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHostnetwork) Detach ¶
func (bn *SHostnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHostnetwork) GetCustomizeColumns ¶
func (bn *SHostnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostnetwork) GetExtraDetails ¶
func (bn *SHostnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostnetwork) GetHost ¶
func (bn *SHostnetwork) GetHost() *SHost
func (*SHostnetwork) GetNetInterface ¶
func (bn *SHostnetwork) GetNetInterface() *SNetInterface
func (*SHostnetwork) GetNetwork ¶
func (bn *SHostnetwork) GetNetwork() *SNetwork
func (*SHostnetwork) Master ¶
func (bn *SHostnetwork) Master() db.IStandaloneModel
func (*SHostnetwork) Slave ¶
func (bn *SHostnetwork) Slave() db.IStandaloneModel
type SHostnetworkManager ¶
type SHostnetworkManager struct {
SHostJointsManager
}
var HostnetworkManager *SHostnetworkManager
func (*SHostnetworkManager) GetHostByAddress ¶
func (man *SHostnetworkManager) GetHostByAddress(addr string) *SHost
func (*SHostnetworkManager) GetHostNetworkByAddress ¶
func (man *SHostnetworkManager) GetHostNetworkByAddress(addr string) *SHostnetwork
func (*SHostnetworkManager) GetNetworkByAddress ¶
func (man *SHostnetworkManager) GetNetworkByAddress(addr string) *SNetwork
func (*SHostnetworkManager) QueryByAddress ¶
func (man *SHostnetworkManager) QueryByAddress(addr string) *sqlchemy.SQuery
type SHostschedtag ¶
type SHostschedtag struct { SHostJointsBase HostId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // =Column(VARCHAR(36, charset='ascii'), nullable=False) }
func (*SHostschedtag) Delete ¶
func (self *SHostschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHostschedtag) Detach ¶
func (self *SHostschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHostschedtag) GetCustomizeColumns ¶
func (self *SHostschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostschedtag) GetExtraDetails ¶
func (self *SHostschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostschedtag) Master ¶
func (joint *SHostschedtag) Master() db.IStandaloneModel
func (*SHostschedtag) Slave ¶
func (joint *SHostschedtag) Slave() db.IStandaloneModel
type SHostschedtagManager ¶
type SHostschedtagManager struct {
SHostJointsManager
}
var HostschedtagManager *SHostschedtagManager
type SHoststorage ¶
type SHoststorage struct { SHostJointsBase MountPoint string `width:"256" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"required"` // Column(VARCHAR(256, charset='ascii'), nullable=False) HostId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False) StorageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False) Config *jsonutils.JSONArray `nullable:"true" get:"admin"` // Column(JSONEncodedDict, nullable=True) RealCapacity int `nullable:"true" list:"admin"` // Column(Integer, nullable=True) }
func (*SHoststorage) Delete ¶
func (self *SHoststorage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHoststorage) Detach ¶
func (self *SHoststorage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SHoststorage) GetCustomizeColumns ¶
func (self *SHoststorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHoststorage) GetExtraDetails ¶
func (self *SHoststorage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHoststorage) GetGuestDiskCount ¶
func (self *SHoststorage) GetGuestDiskCount() int
func (*SHoststorage) GetHost ¶
func (self *SHoststorage) GetHost() *SHost
func (*SHoststorage) GetStorage ¶
func (self *SHoststorage) GetStorage() *SStorage
func (*SHoststorage) Master ¶
func (joint *SHoststorage) Master() db.IStandaloneModel
func (*SHoststorage) Slave ¶
func (joint *SHoststorage) Slave() db.IStandaloneModel
func (*SHoststorage) ValidateDeleteCondition ¶
func (self *SHoststorage) ValidateDeleteCondition(ctx context.Context) error
type SHoststorageManager ¶
type SHoststorageManager struct {
SHostJointsManager
}
var HoststorageManager *SHoststorageManager
func (*SHoststorageManager) GetStorages ¶
func (manager *SHoststorageManager) GetStorages(hostId string) ([]SHoststorage, error)
func (*SHoststorageManager) ValidateCreateData ¶
func (manager *SHoststorageManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SHostwire ¶
type SHostwire struct { SHostJointsBase Bridge string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False) Interface string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False) IsMaster bool `nullable:"true" default:"false" update:"admin" create:"admin_optional"` // Column(Boolean, nullable=True, default=False) MacAddr string `width:"18" charset:"ascii" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(18, charset='ascii')) HostId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False) WireId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False) }
func (*SHostwire) GetCustomizeColumns ¶
func (self *SHostwire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostwire) GetExtraDetails ¶
func (self *SHostwire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SHostwire) GetGuestnicsCount ¶
func (*SHostwire) Master ¶
func (joint *SHostwire) Master() db.IStandaloneModel
func (*SHostwire) Slave ¶
func (joint *SHostwire) Slave() db.IStandaloneModel
type SHostwireManager ¶
type SHostwireManager struct {
SHostJointsManager
}
var HostwireManager *SHostwireManager
type SInfrastructure ¶
type SInfrastructure struct { }
func (*SInfrastructure) AllowDeleteItem ¶
func (self *SInfrastructure) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SInfrastructure) AllowGetDetails ¶
func (self *SInfrastructure) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SInfrastructure) AllowUpdateItem ¶
func (self *SInfrastructure) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
type SInfrastructureManager ¶
type SInfrastructureManager struct { }
func (*SInfrastructureManager) AllowCreateItem ¶
func (self *SInfrastructureManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SInfrastructureManager) AllowListItems ¶
func (self *SInfrastructureManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
type SIsolatedDevice ¶
type SIsolatedDevice struct { db.SStandaloneResourceBase HostId string `width:"36" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False, default=”, server_default=”, index=True) // # PCI / GPU-HPC / GPU-VGA / USB / NIC DevType string `width:"16" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False, default=”, server_default=”, index=True) // # Specific device name read from lspci command, e.g. `Tesla K40m` ... Model string `width:"32" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False, default=”, server_default=”, index=True) GuestId string `width:"36" charset:"ascii" nullable:"true" index:"true" list:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=True, index=True) // # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr` Addr string `width:"16" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) VendorDeviceId string `width:"16" charset:"ascii" nullable:"true" list:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) }
func (*SIsolatedDevice) ClearSchedDescCache ¶
func (self *SIsolatedDevice) ClearSchedDescCache() error
func (*SIsolatedDevice) CustomizeDelete ¶
func (self *SIsolatedDevice) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SIsolatedDevice) GetCustomizeColumns ¶
func (self *SIsolatedDevice) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SIsolatedDevice) GetExtraDetails ¶
func (self *SIsolatedDevice) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SIsolatedDevice) GetShortDesc ¶
func (self *SIsolatedDevice) GetShortDesc() *jsonutils.JSONDict
func (*SIsolatedDevice) GetSpec ¶
func (self *SIsolatedDevice) GetSpec(statusCheck bool) *jsonutils.JSONDict
func (*SIsolatedDevice) RealDelete ¶
func (self *SIsolatedDevice) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SIsolatedDevice) ValidateDeleteCondition ¶
func (self *SIsolatedDevice) ValidateDeleteCondition(ctx context.Context) error
type SIsolatedDeviceConfig ¶
type SIsolatedDeviceManager ¶
type SIsolatedDeviceManager struct {
db.SStandaloneResourceBaseManager
}
var IsolatedDeviceManager *SIsolatedDeviceManager
func (*SIsolatedDeviceManager) AllowCreateItem ¶
func (manager *SIsolatedDeviceManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SIsolatedDeviceManager) AllowListItems ¶
func (manager *SIsolatedDeviceManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SIsolatedDeviceManager) DeleteDevicesByHost ¶
func (manager *SIsolatedDeviceManager) DeleteDevicesByHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost)
func (*SIsolatedDeviceManager) ExtraSearchConditions ¶
func (manager *SIsolatedDeviceManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
func (*SIsolatedDeviceManager) FindByHost ¶
func (manager *SIsolatedDeviceManager) FindByHost(id string) []SIsolatedDevice
func (*SIsolatedDeviceManager) FindByHosts ¶
func (manager *SIsolatedDeviceManager) FindByHosts(ids []string) []SIsolatedDevice
func (*SIsolatedDeviceManager) FindUnusedByModels ¶
func (manager *SIsolatedDeviceManager) FindUnusedByModels(models []string) ([]SIsolatedDevice, error)
func (*SIsolatedDeviceManager) FindUnusedGpusOnHost ¶
func (manager *SIsolatedDeviceManager) FindUnusedGpusOnHost(hostId string) ([]SIsolatedDevice, error)
func (*SIsolatedDeviceManager) GetSpecIdent ¶
func (man *SIsolatedDeviceManager) GetSpecIdent(spec *jsonutils.JSONDict) []string
func (*SIsolatedDeviceManager) ListItemFilter ¶
func (manager *SIsolatedDeviceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SIsolatedDeviceManager) ReleaseDevicesOfGuest ¶
func (manager *SIsolatedDeviceManager) ReleaseDevicesOfGuest(guest *SGuest, userCred mcclient.TokenCredential) error
func (*SIsolatedDeviceManager) TotalCount ¶
func (manager *SIsolatedDeviceManager) TotalCount(hostType []string, rangeObj db.IStandaloneModel) IsolatedDeviceCountStat
func (*SIsolatedDeviceManager) UnusedGpuQuery ¶
func (manager *SIsolatedDeviceManager) UnusedGpuQuery() *sqlchemy.SQuery
type SKeypair ¶
type SKeypair struct { db.SStandaloneResourceBase Scheme string `width:"12" charset:"ascii" nullable:"true" default:"RSA" list:"user" create:"required"` // Column(VARCHAR(length=12, charset='ascii'), nullable=True, default='RSA') Fingerprint string `width:"48" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(length=48, charset='ascii'), nullable=False) PrivateKey string `width:"2048" charset:"ascii" nullable:"false" create:"optional"` // Column(VARCHAR(length=2048, charset='ascii'), nullable=False) PublicKey string `width:"1024" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(length=1024, charset='ascii'), nullable=False) OwnerId string `width:"128" charset:"ascii" index:"true" nullable:"false" create:"required"` // Column(VARCHAR(length=36, charset='ascii'), index=True, nullable=False) }
func (*SKeypair) AllowDeleteItem ¶
func (self *SKeypair) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SKeypair) AllowGetDetails ¶
func (self *SKeypair) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SKeypair) AllowGetDetailsPrivatekey ¶
func (keypair *SKeypair) AllowGetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SKeypair) AllowUpdateItem ¶
func (*SKeypair) GetCustomizeColumns ¶
func (self *SKeypair) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SKeypair) GetDetailsPrivatekey ¶
func (keypair *SKeypair) GetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SKeypair) GetExtraDetails ¶
func (self *SKeypair) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SKeypair) GetLinkedGuestsCount ¶
func (*SKeypair) GetOwnerProjectId ¶
type SKeypairManager ¶
type SKeypairManager struct {
db.SStandaloneResourceBaseManager
}
var KeypairManager *SKeypairManager
func (*SKeypairManager) AllowCreateItem ¶
func (manager *SKeypairManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SKeypairManager) AllowListItems ¶
func (manager *SKeypairManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SKeypairManager) FetchByIdOrName ¶
func (manager *SKeypairManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)
func (*SKeypairManager) FetchByName ¶
func (manager *SKeypairManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)
func (*SKeypairManager) FilterByOwner ¶
func (*SKeypairManager) GetOwnerId ¶
func (manager *SKeypairManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
func (*SKeypairManager) ListItemFilter ¶
func (manager *SKeypairManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SKeypairManager) ValidateCreateData ¶
func (manager *SKeypairManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancer ¶
type SLoadbalancer struct { db.SVirtualResourceBase Address string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"` AddressType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"` NetworkType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"` NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` ZoneId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"user" update:"user"` }
TODO build errors on pkg/httperrors/errors.go NewGetManagerError NewMissingArgumentError NewInvalidArgumentError
TODO ZoneId or RegionId bandwidth scheduler
TODO update backendgroupid
func (*SLoadbalancer) AllowPerformStatus ¶
func (lb *SLoadbalancer) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancer) CustomizeDelete ¶
func (lb *SLoadbalancer) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SLoadbalancer) Delete ¶
func (lb *SLoadbalancer) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancer) GetCustomizeColumns ¶
func (lb *SLoadbalancer) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancer) GetExtraDetails ¶
func (lb *SLoadbalancer) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancer) PostCreate ¶
func (lb *SLoadbalancer) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SLoadbalancer) PreDelete ¶
func (lb *SLoadbalancer) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancer) PreDeleteSubs ¶
func (lb *SLoadbalancer) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancer) ValidateUpdateData ¶
func (lb *SLoadbalancer) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerAcl ¶
type SLoadbalancerAcl struct { db.SSharableVirtualResourceBase AclEntries *SLoadbalancerAclEntries `list:"user" update:"user" create:"required"` }
func (*SLoadbalancerAcl) AllowPerformPatch ¶
func (lbacl *SLoadbalancerAcl) AllowPerformPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool
func (*SLoadbalancerAcl) AllowPerformStatus ¶
func (lbacl *SLoadbalancerAcl) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerAcl) Delete ¶
func (lbacl *SLoadbalancerAcl) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerAcl) PerformPatch ¶
func (lbacl *SLoadbalancerAcl) PerformPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
PerformPatch patches acl entries by adding then deleting the specified acls. This is intended mainly for command line operations.
func (*SLoadbalancerAcl) PreDelete ¶
func (lbacl *SLoadbalancerAcl) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerAcl) ValidateDeleteCondition ¶
func (lbacl *SLoadbalancerAcl) ValidateDeleteCondition(ctx context.Context) error
func (*SLoadbalancerAcl) ValidateUpdateData ¶
func (lbacl *SLoadbalancerAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerAclEntries ¶
type SLoadbalancerAclEntries []*SLoadbalancerAclEntry
func (*SLoadbalancerAclEntries) IsZero ¶
func (aclEntries *SLoadbalancerAclEntries) IsZero() bool
func (*SLoadbalancerAclEntries) String ¶
func (aclEntries *SLoadbalancerAclEntries) String() string
type SLoadbalancerAclEntry ¶
type SLoadbalancerAclManager ¶
type SLoadbalancerAclManager struct {
db.SSharableVirtualResourceBaseManager
}
var LoadbalancerAclManager *SLoadbalancerAclManager
func (*SLoadbalancerAclManager) ValidateCreateData ¶
func (man *SLoadbalancerAclManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerAgent ¶
type SLoadbalancerAgent struct { db.SStandaloneResourceBase SInfrastructure HbLastSeen time.Time `nullable:"true" list:"admin" update:"admin"` HbTimeout int `nullable:"true" list:"admin" update:"admin" create:"optional" default:"3600"` Params *SLoadbalancerAgentParams `create:"optional" get:"admin"` Loadbalancers time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerListeners time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerListenerRules time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerBackendGroups time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerBackends time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerAcls time.Time `nullable:"true" list:"admin" update:"admin"` LoadbalancerCertificates time.Time `nullable:"true" list:"admin" update:"admin"` }
TODO
- scrub stale backends: Guests with deleted=1
- agent configuration params
func (*SLoadbalancerAgent) AllowPerformHb ¶
func (lbagent *SLoadbalancerAgent) AllowPerformHb(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool
func (*SLoadbalancerAgent) AllowPerformParamsPatch ¶
func (lbagent *SLoadbalancerAgent) AllowPerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool
func (*SLoadbalancerAgent) IsActive ¶
func (lbagent *SLoadbalancerAgent) IsActive() bool
func (*SLoadbalancerAgent) PerformHb ¶
func (lbagent *SLoadbalancerAgent) PerformHb(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SLoadbalancerAgent) PerformParamsPatch ¶
func (lbagent *SLoadbalancerAgent) PerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SLoadbalancerAgent) ValidateUpdateData ¶
func (lbagent *SLoadbalancerAgent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerAgentManager ¶
type SLoadbalancerAgentManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var LoadbalancerAgentManager *SLoadbalancerAgentManager
func (*SLoadbalancerAgentManager) AllowCreateItem ¶
func (man *SLoadbalancerAgentManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers ¶
func (man *SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerAgentManager) ValidateCreateData ¶
func (man *SLoadbalancerAgentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerAgentParams ¶
type SLoadbalancerAgentParams struct { KeepalivedConfTmpl string HaproxyConfTmpl string TelegrafConfTmpl string Vrrp SLoadbalancerAgentParamsVrrp Haproxy SLoadbalancerAgentParamsHaproxy Telegraf SLoadbalancerAgentParamsTelegraf }
func (*SLoadbalancerAgentParams) IsZero ¶
func (p *SLoadbalancerAgentParams) IsZero() bool
func (*SLoadbalancerAgentParams) String ¶
func (p *SLoadbalancerAgentParams) String() string
type SLoadbalancerAgentParamsHaproxy ¶
type SLoadbalancerAgentParamsTelegraf ¶
type SLoadbalancerAgentParamsVrrp ¶
type SLoadbalancerBackend ¶
type SLoadbalancerBackend struct { db.SVirtualResourceBase BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` BackendId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` BackendType string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` Weight int `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` Address string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` Port int `nullable:"false" list:"user" create:"required" update:"user"` }
func (*SLoadbalancerBackend) AllowPerformStatus ¶
func (lbb *SLoadbalancerBackend) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerBackend) Delete ¶
func (lbb *SLoadbalancerBackend) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerBackend) PreDelete ¶
func (lbb *SLoadbalancerBackend) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerBackend) ValidateUpdateData ¶
func (lbb *SLoadbalancerBackend) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerBackendGroup ¶
type SLoadbalancerBackendGroup struct { db.SVirtualResourceBase LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` }
func (*SLoadbalancerBackendGroup) AllowPerformStatus ¶
func (lbbg *SLoadbalancerBackendGroup) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerBackendGroup) Delete ¶
func (lbbg *SLoadbalancerBackendGroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerBackendGroup) GetCustomizeColumns ¶
func (lbbg *SLoadbalancerBackendGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerBackendGroup) GetExtraDetails ¶
func (lbbg *SLoadbalancerBackendGroup) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerBackendGroup) GetLoadbalancer ¶
func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancer() *SLoadbalancer
func (*SLoadbalancerBackendGroup) PreDelete ¶
func (lbbg *SLoadbalancerBackendGroup) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerBackendGroup) PreDeleteSubs ¶
func (lbbg *SLoadbalancerBackendGroup) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerBackendGroup) ValidateDeleteCondition ¶
func (lbbg *SLoadbalancerBackendGroup) ValidateDeleteCondition(ctx context.Context) error
type SLoadbalancerBackendGroupManager ¶
type SLoadbalancerBackendGroupManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerBackendGroupManager *SLoadbalancerBackendGroupManager
func (*SLoadbalancerBackendGroupManager) ListItemFilter ¶
func (man *SLoadbalancerBackendGroupManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SLoadbalancerBackendGroupManager) PreDeleteSubs ¶
func (man *SLoadbalancerBackendGroupManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
func (*SLoadbalancerBackendGroupManager) ValidateCreateData ¶
func (man *SLoadbalancerBackendGroupManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerBackendManager ¶
type SLoadbalancerBackendManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerBackendManager *SLoadbalancerBackendManager
func (*SLoadbalancerBackendManager) ListItemFilter ¶
func (man *SLoadbalancerBackendManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SLoadbalancerBackendManager) PreDeleteSubs ¶
func (man *SLoadbalancerBackendManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
func (*SLoadbalancerBackendManager) ValidateCreateData ¶
func (man *SLoadbalancerBackendManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerCertificate ¶
type SLoadbalancerCertificate struct { db.SVirtualResourceBase Certificate string `create:"required" list:"admin" 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"` FingerprintSha256 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"` }
TODO
- notify users of cert expiration
- ca info: self-signed, public ca
func (*SLoadbalancerCertificate) AllowPerformStatus ¶
func (lbcert *SLoadbalancerCertificate) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerCertificate) Delete ¶
func (lbcert *SLoadbalancerCertificate) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerCertificate) PreDelete ¶
func (lbcert *SLoadbalancerCertificate) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerCertificate) ValidateDeleteCondition ¶
func (lbcert *SLoadbalancerCertificate) ValidateDeleteCondition(ctx context.Context) error
func (*SLoadbalancerCertificate) ValidateUpdateData ¶
func (lbcert *SLoadbalancerCertificate) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerCertificateManager ¶
type SLoadbalancerCertificateManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerCertificateManager *SLoadbalancerCertificateManager
func (*SLoadbalancerCertificateManager) PreDeleteSubs ¶
func (man *SLoadbalancerCertificateManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
func (*SLoadbalancerCertificateManager) ValidateCreateData ¶
func (man *SLoadbalancerCertificateManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerHTTPListener ¶
type SLoadbalancerHTTPListener struct { StickySession string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` StickySessionType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` StickySessionCookie string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` StickySessionCookieTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` //XForwardedForSLBIP bool `nullable:"false" list:"user" create:"optional"` //XForwardedForSLBID bool `nullable:"false" list:"user" create:"optional"` XForwardedFor bool `nullable:"false" list:"user" create:"optional" update:"user"` Gzip bool `nullable:"false" list:"user" create:"optional" update:"user"` }
TODO sensible default for knobs
type SLoadbalancerHTTPSListener ¶
type SLoadbalancerHTTPSListener struct { CertificateId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` TLSCipherPolicy string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` EnableHttp2 bool `create:"optional" list:"user"` }
TODO
- CACertificate string
- Certificate2Id // multiple certificates for rsa, ecdsa
- Use certificate for tcp listener
- Customize ciphers?
type SLoadbalancerListener ¶
type SLoadbalancerListener struct { db.SVirtualResourceBase LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` ListenerType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` ListenerPort int `nullable:"false" list:"user" create:"required"` BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` Bandwidth int `nullable:"false" list:"user" create:"optional" update:"user"` Scheduler string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"` ClientRequestTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` ClientIdleTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` BackendConnectTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` BackendIdleTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` AclStatus string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` AclType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` AclId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheck string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckDomain string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckURI string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckHttpCode string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckRise int `nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckFall int `nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckTimeout int `nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckInterval int `nullable:"false" list:"user" create:"optional" update:"user"` HealthCheckReq string `list:"user" create:"optional" update:"user"` HealthCheckExp string `list:"user" create:"optional" update:"user"` SLoadbalancerTCPListener SLoadbalancerUDPListener SLoadbalancerHTTPListener SLoadbalancerHTTPSListener }
func (*SLoadbalancerListener) AllowPerformStatus ¶
func (lblis *SLoadbalancerListener) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerListener) Delete ¶
func (lblis *SLoadbalancerListener) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerListener) GetCustomizeColumns ¶
func (lblis *SLoadbalancerListener) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerListener) GetExtraDetails ¶
func (lblis *SLoadbalancerListener) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerListener) PreDelete ¶
func (lblis *SLoadbalancerListener) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerListener) PreDeleteSubs ¶
func (lblis *SLoadbalancerListener) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerListener) ValidateUpdateData ¶
func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerListenerManager ¶
type SLoadbalancerListenerManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerListenerManager *SLoadbalancerListenerManager
func (*SLoadbalancerListenerManager) ListItemFilter ¶
func (man *SLoadbalancerListenerManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SLoadbalancerListenerManager) PreDeleteSubs ¶
func (man *SLoadbalancerListenerManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
func (*SLoadbalancerListenerManager) ValidateCreateData ¶
func (man *SLoadbalancerListenerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerListenerRule ¶
type SLoadbalancerListenerRule struct { db.SVirtualResourceBase ListenerId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"` BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"` Domain string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional"` Path string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional"` }
func (*SLoadbalancerListenerRule) AllowPerformStatus ¶
func (lbr *SLoadbalancerListenerRule) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SLoadbalancerListenerRule) Delete ¶
func (lbr *SLoadbalancerListenerRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerListenerRule) GetCustomizeColumns ¶
func (lbr *SLoadbalancerListenerRule) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerListenerRule) GetExtraDetails ¶
func (lbr *SLoadbalancerListenerRule) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SLoadbalancerListenerRule) PreDelete ¶
func (lbr *SLoadbalancerListenerRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SLoadbalancerListenerRule) ValidateUpdateData ¶
func (lbr *SLoadbalancerListenerRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerListenerRuleManager ¶
type SLoadbalancerListenerRuleManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerListenerRuleManager *SLoadbalancerListenerRuleManager
func (*SLoadbalancerListenerRuleManager) ListItemFilter ¶
func (man *SLoadbalancerListenerRuleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SLoadbalancerListenerRuleManager) PreDeleteSubs ¶
func (man *SLoadbalancerListenerRuleManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
func (*SLoadbalancerListenerRuleManager) ValidateCreateData ¶
func (man *SLoadbalancerListenerRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerManager ¶
type SLoadbalancerManager struct {
db.SVirtualResourceBaseManager
}
var LoadbalancerManager *SLoadbalancerManager
func (*SLoadbalancerManager) ListItemFilter ¶
func (man *SLoadbalancerManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SLoadbalancerManager) ValidateCreateData ¶
func (man *SLoadbalancerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SLoadbalancerNetwork ¶
type SLoadbalancerNetwork struct { db.SVirtualJointResourceBase LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" key_index:"true" list:"admin"` NetworkId string `width:"36" charset:"ascii" nullable:"false" key_index:"true" list:"admin"` IpAddr string `width:"16" charset:"ascii" list:"admin"` }
func (*SLoadbalancerNetwork) Delete ¶
func (lbNetwork *SLoadbalancerNetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SLoadbalancerNetwork) Network ¶
func (ln *SLoadbalancerNetwork) Network() *SNetwork
type SLoadbalancerNetworkDeleteData ¶
type SLoadbalancerNetworkDeleteData struct {
// contains filtered or unexported fields
}
type SLoadbalancerNetworkRequestData ¶
type SLoadbalancerNetworkRequestData struct {
// contains filtered or unexported fields
}
type SLoadbalancerNotifier ¶
type SLoadbalancerNotifier struct{}
TODO notify on post create/update/delete
func (*SLoadbalancerNotifier) PostCreate ¶
func (n *SLoadbalancerNotifier) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
type SLoadbalancerStatus ¶
type SLoadbalancerStatus struct {
RuntimeStatus string `width:"36" charset:"ascii" nullable:"false" default:"init" list:"user"`
}
type SLoadbalancerTCPListener ¶
type SLoadbalancerTCPListener struct{}
type SLoadbalancerUDPListener ¶
type SLoadbalancerUDPListener struct{}
type SLoadbalancernetworkManager ¶
type SLoadbalancernetworkManager struct {
db.SVirtualJointResourceBaseManager
}
var LoadbalancernetworkManager *SLoadbalancernetworkManager
func (*SLoadbalancernetworkManager) DeleteLoadbalancerNetwork ¶
func (m *SLoadbalancernetworkManager) DeleteLoadbalancerNetwork(ctx context.Context, userCred mcclient.TokenCredential, req *SLoadbalancerNetworkDeleteData) error
func (*SLoadbalancernetworkManager) NewLoadbalancerNetwork ¶
func (m *SLoadbalancernetworkManager) NewLoadbalancerNetwork(ctx context.Context, userCred mcclient.TokenCredential, req *SLoadbalancerNetworkRequestData) (*SLoadbalancerNetwork, error)
type SManagedResourceBase ¶
type SManagedResourceBase struct {
ManagerId string `width:"128" charset:"ascii" nullable:"true" list:"admin" create:"admin_optional"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True)
}
func (*SManagedResourceBase) GetCloudprovider ¶
func (self *SManagedResourceBase) GetCloudprovider() *SCloudprovider
func (*SManagedResourceBase) GetDriver ¶
func (self *SManagedResourceBase) GetDriver() (cloudprovider.ICloudProvider, error)
func (*SManagedResourceBase) IsManaged ¶
func (self *SManagedResourceBase) IsManaged() bool
type SNetInterface ¶
type SNetInterface struct { db.SModelBase Mac string `width:"36" charset:"ascii" primary:"true"` // Column(VARCHAR(36, charset='ascii'), primary_key=True) BaremetalId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True) WireId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Rate int `nullable:"true"` // Column(Integer, nullable=True) # Mbps NicType string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True) Index int8 `nullable:"true"` // Column(TINYINT, nullable=True) LinkUp bool `nullable:"true"` // Column(Boolean, nullable=True) Mtu int16 `nullable:"true"` // Column(SMALLINT, nullable=True) }
func (*SNetInterface) GetBaremetal ¶
func (netif *SNetInterface) GetBaremetal() *SHost
func (*SNetInterface) GetBaremetalNetwork ¶
func (netif *SNetInterface) GetBaremetalNetwork() *SHostnetwork
func (*SNetInterface) GetCandidateNetworkForIp ¶
func (self *SNetInterface) GetCandidateNetworkForIp(userCred mcclient.TokenCredential, ipAddr string) (*SNetwork, error)
func (*SNetInterface) GetId ¶
func (netif *SNetInterface) GetId() string
func (*SNetInterface) GetWire ¶
func (netif *SNetInterface) GetWire() *SWire
func (*SNetInterface) IsUsableServernic ¶
func (self *SNetInterface) IsUsableServernic() bool
func (*SNetInterface) Remove ¶
func (self *SNetInterface) Remove(ctx context.Context, userCred mcclient.TokenCredential) error
type SNetInterfaceManager ¶
type SNetInterfaceManager struct {
db.SModelBaseManager
}
var NetInterfaceManager *SNetInterfaceManager
func (*SNetInterfaceManager) FetchByMac ¶
func (manager *SNetInterfaceManager) FetchByMac(mac string) (*SNetInterface, error)
type SNetwork ¶
type SNetwork struct { db.SSharableVirtualResourceBase GuestIpStart string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False) GuestIpEnd string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False) GuestIpMask int8 `nullable:"false" list:"user" update:"user" create:"required"` // Column(TINYINT, nullable=False) GuestGateway string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) GuestDns string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) GuestDhcp string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) GuestDomain string `width:"128" charset:"ascii" nullable:"true" get:"user" update:"user"` // Column(VARCHAR(128, charset='ascii'), nullable=True) GuestIp6Start string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True) GuestIp6End string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True) GuestIp6Mask int8 `nullable:"true"` // Column(TINYINT, nullable=True) GuestGateway6 string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True) GuestDns6 string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True) GuestDomain6 string `width:"128" charset:"ascii" nullable:"true"` // Column(VARCHAR(128, charset='ascii'), nullable=True) VlanId int `nullable:"false" default:"1" list:"user" update:"user" create:"optional"` // Column(Integer, nullable=False, default=1) WireId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False) ServerType string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) AllocPolicy string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True) AllocTimoutSeconds int `default:"0" nullable:"true" get:"admin"` }
func ChooseCandidateNetworks ¶
func (*SNetwork) AllowGetDetailsReservedIps ¶
func (self *SNetwork) AllowGetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SNetwork) AllowPerformPurge ¶
func (self *SNetwork) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SNetwork) AllowPerformReleaseReservedIp ¶
func (self *SNetwork) AllowPerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SNetwork) AllowPerformReserveIp ¶
func (self *SNetwork) AllowPerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SNetwork) CustomizeCreate ¶
func (self *SNetwork) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SNetwork) CustomizeDelete ¶
func (self *SNetwork) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SNetwork) GetBaremetalNicsCount ¶
func (*SNetwork) GetCustomizeColumns ¶
func (self *SNetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SNetwork) GetDetailsReservedIps ¶
func (self *SNetwork) GetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SNetwork) GetExtraDetails ¶
func (self *SNetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SNetwork) GetGroupNicsCount ¶
func (*SNetwork) GetGuestIpv4StartAddress ¶
func (*SNetwork) GetGuestnicsCount ¶
func (*SNetwork) GetINetwork ¶
func (self *SNetwork) GetINetwork() (cloudprovider.ICloudNetwork, error)
func (*SNetwork) GetLoadbalancerIpsCount ¶
func (*SNetwork) GetNetAddr ¶
func (*SNetwork) GetReservedNicsCount ¶
func (*SNetwork) GetTotalNicCount ¶
func (*SNetwork) GetUsedAddresses ¶
func (*SNetwork) GetUsedIfnames ¶
func (*SNetwork) IsExitNetwork ¶
func (*SNetwork) PerformPurge ¶
func (self *SNetwork) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SNetwork) PerformReleaseReservedIp ¶
func (self *SNetwork) PerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SNetwork) PerformReserveIp ¶
func (self *SNetwork) PerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SNetwork) PostCreate ¶
func (self *SNetwork) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SNetwork) RealDelete ¶
func (*SNetwork) StartDeleteNetworkTask ¶
func (*SNetwork) SyncWithCloudNetwork ¶
func (self *SNetwork) SyncWithCloudNetwork(userCred mcclient.TokenCredential, extNet cloudprovider.ICloudNetwork, projectId string, projectSync bool) error
func (*SNetwork) UpdateBaremetalNetmap ¶
func (self *SNetwork) UpdateBaremetalNetmap(nic *SHostnetwork, name string)
func (*SNetwork) UpdateNetmap ¶
func (*SNetwork) ValidateDeleteCondition ¶
func (*SNetwork) ValidateUpdateCondition ¶
func (*SNetwork) ValidateUpdateData ¶
type SNetworkConfig ¶
type SNetworkManager ¶
type SNetworkManager struct {
db.SSharableVirtualResourceBaseManager
}
var NetworkManager *SNetworkManager
func (*SNetworkManager) AllowCreateItem ¶
func (manager *SNetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SNetworkManager) CustomizeFilterList ¶
func (manager *SNetworkManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*db.CustomizeListFilters, error)
func (*SNetworkManager) GetContextManager ¶
func (manager *SNetworkManager) GetContextManager() []db.IModelManager
func (*SNetworkManager) GetNetworkOfIP ¶
func (*SNetworkManager) InitializeData ¶
func (manager *SNetworkManager) InitializeData() error
func (*SNetworkManager) ListItemFilter ¶
func (manager *SNetworkManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SNetworkManager) SyncNetworks ¶
func (manager *SNetworkManager) SyncNetworks(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire, nets []cloudprovider.ICloudNetwork, projectId string, projectSync bool) ([]SNetwork, []cloudprovider.ICloudNetwork, compare.SyncResult)
func (*SNetworkManager) TotalPortCount ¶
func (manager *SNetworkManager) TotalPortCount(userCred mcclient.TokenCredential, rangeObj db.IStandaloneModel) NetworkPortStat
func (*SNetworkManager) ValidateCreateData ¶
func (manager *SNetworkManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SQuota ¶
type SQuota struct { Cpu int Memory int Storage int Port int Eip int Eport int Bw int Ebw int Keypair int Image int Group int Secgroup int IsolatedDevice int Snapshot int }
func (*SQuota) FetchSystemQuota ¶
func (self *SQuota) FetchSystemQuota()
func (*SQuota) FetchUsage ¶
type SReservedip ¶
type SReservedip struct { db.SResourceBase Id int64 `primary:"true" auto_increment:"true" list:"admin"` // = Column(BigInteger, primary_key=True) NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=False) IpAddr string `width:"16" charset:"ascii" list:"admin"` // Column(VARCHAR(16, charset='ascii')) Notes string `width:"512" charset:"utf8" nullable:"true" list:"admin"` // ]Column(VARCHAR(512, charset='utf8'), nullable=True) }
func (*SReservedip) AllowDeleteItem ¶
func (self *SReservedip) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SReservedip) AllowGetDetails ¶
func (self *SReservedip) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SReservedip) AllowUpdateItem ¶
func (self *SReservedip) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
func (*SReservedip) GetCustomizeColumns ¶
func (self *SReservedip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SReservedip) GetNetwork ¶
func (self *SReservedip) GetNetwork() *SNetwork
func (*SReservedip) Release ¶
func (self *SReservedip) Release(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork) error
type SReservedipManager ¶
type SReservedipManager struct {
db.SResourceBaseManager
}
var ReservedipManager *SReservedipManager
func (*SReservedipManager) AllowCreateItem ¶
func (manager *SReservedipManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SReservedipManager) AllowListItems ¶
func (manager *SReservedipManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SReservedipManager) GetReservedIP ¶
func (manager *SReservedipManager) GetReservedIP(network *SNetwork, ip string) *SReservedip
func (*SReservedipManager) GetReservedIPs ¶
func (manager *SReservedipManager) GetReservedIPs(network *SNetwork) []SReservedip
func (*SReservedipManager) ListItemFilter ¶
func (manager *SReservedipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SReservedipManager) ReserveIP ¶
func (manager *SReservedipManager) ReserveIP(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string) error
type SSchedpolicy ¶
type SSchedpolicy struct { db.SStandaloneResourceBase SInfrastructure Condition string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"` SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"` Strategy string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"` Enabled bool `nullable:"false" default:"true" create:"optional" list:"user" update:"user"` }
sched policy is called before calling scheduler, add additional preferences for schedtags
func (*SSchedpolicy) AllowPerformEvaluate ¶
func (self *SSchedpolicy) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSchedpolicy) GetCustomizeColumns ¶
func (self *SSchedpolicy) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSchedpolicy) GetExtraDetails ¶
func (self *SSchedpolicy) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSchedpolicy) PerformEvaluate ¶
func (self *SSchedpolicy) PerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSchedpolicy) ValidateUpdateData ¶
func (self *SSchedpolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SSchedpolicyManager ¶
type SSchedpolicyManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var SchedpolicyManager *SSchedpolicyManager
func (*SSchedpolicyManager) ValidateCreateData ¶
func (manager *SSchedpolicyManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SSchedtag ¶
type SSchedtag struct { db.SStandaloneResourceBase SInfrastructure DefaultStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”) }
func (*SSchedtag) AllowGetDetails ¶
func (self *SSchedtag) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSchedtag) GetCustomizeColumns ¶
func (self *SSchedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSchedtag) GetExtraDetails ¶
func (self *SSchedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSchedtag) GetHostCount ¶
func (*SSchedtag) GetHostQuery ¶
func (*SSchedtag) GetShortDesc ¶
func (*SSchedtag) ValidateDeleteCondition ¶
func (*SSchedtag) ValidateUpdateData ¶
type SSchedtagManager ¶
type SSchedtagManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var SchedtagManager *SSchedtagManager
func (*SSchedtagManager) AllowListItems ¶
func (manager *SSchedtagManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSchedtagManager) ValidateCreateData ¶
func (manager *SSchedtagManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
func (*SSchedtagManager) ValidateSchedtags ¶
func (manager *SSchedtagManager) ValidateSchedtags(userCred mcclient.TokenCredential, schedtags map[string]string) (map[string]string, error)
type SSecurityGroup ¶
type SSecurityGroup struct { db.SSharableVirtualResourceBase IsDirty bool `nullable:"false" default:"false"` // Column(Boolean, nullable=False, default=False) }
func (*SSecurityGroup) AllowPerformClone ¶
func (self *SSecurityGroup) AllowPerformClone(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSecurityGroup) DoSync ¶
func (self *SSecurityGroup) DoSync(ctx context.Context, userCred mcclient.TokenCredential)
func (*SSecurityGroup) GetCustomizeColumns ¶
func (self *SSecurityGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSecurityGroup) GetExtraDetails ¶
func (self *SSecurityGroup) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSecurityGroup) GetGuests ¶
func (self *SSecurityGroup) GetGuests() []SGuest
func (*SSecurityGroup) GetGuestsCount ¶
func (self *SSecurityGroup) GetGuestsCount() int
func (*SSecurityGroup) GetGuestsQuery ¶
func (self *SSecurityGroup) GetGuestsQuery() *sqlchemy.SQuery
func (*SSecurityGroup) PerformClone ¶
func (self *SSecurityGroup) PerformClone(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSecurityGroup) SyncWithCloudSecurityGroup ¶
func (self *SSecurityGroup) SyncWithCloudSecurityGroup(userCred mcclient.TokenCredential, extSec cloudprovider.ICloudSecurityGroup, projectId string, projectSync bool) error
func (*SSecurityGroup) ValidateDeleteCondition ¶
func (self *SSecurityGroup) ValidateDeleteCondition(ctx context.Context) error
type SSecurityGroupManager ¶
type SSecurityGroupManager struct {
db.SSharableVirtualResourceBaseManager
}
var SecurityGroupManager *SSecurityGroupManager
func (*SSecurityGroupManager) DelaySync ¶
func (manager *SSecurityGroupManager) DelaySync(ctx context.Context, userCred mcclient.TokenCredential, idStr string)
func (*SSecurityGroupManager) FetchSecgroupById ¶
func (manager *SSecurityGroupManager) FetchSecgroupById(secId string) *SSecurityGroup
func (*SSecurityGroupManager) InitializeData ¶
func (manager *SSecurityGroupManager) InitializeData() error
func (*SSecurityGroupManager) SyncSecgroups ¶
func (manager *SSecurityGroupManager) SyncSecgroups(ctx context.Context, userCred mcclient.TokenCredential, secgroups []cloudprovider.ICloudSecurityGroup, projectId string, projectSync bool) ([]SSecurityGroup, []cloudprovider.ICloudSecurityGroup, compare.SyncResult)
func (*SSecurityGroupManager) ValidateCreateData ¶
func (manager *SSecurityGroupManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict, ) (*jsonutils.JSONDict, error)
type SSecurityGroupRule ¶
type SSecurityGroupRule struct { db.SResourceBase Id string `width:"128" charset:"ascii" primary:"true" list:"user"` Priority int64 `default:"1" list:"user" update:"user" list:"user"` Protocol string `width:"5" charset:"ascii" nullable:"false" list:"user" update:"user"` Ports string `width:"256" charset:"ascii" list:"user" update:"user"` Direction string `width:"3" charset:"ascii" list:"user" create:"required"` CIDR string `width:"256" charset:"ascii" list:"user" update:"user"` Action string `width:"5" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"` Description string `width:"256" charset:"utf8" list:"user" update:"user"` SecgroupID string `width:"128" charset:"ascii" create:"required"` }
func (*SSecurityGroupRule) AllowDeleteItem ¶
func (self *SSecurityGroupRule) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSecurityGroupRule) AllowUpdateItem ¶
func (self *SSecurityGroupRule) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
func (*SSecurityGroupRule) BeforeInsert ¶
func (self *SSecurityGroupRule) BeforeInsert()
func (*SSecurityGroupRule) Delete ¶
func (self *SSecurityGroupRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SSecurityGroupRule) GetSecGroup ¶
func (self *SSecurityGroupRule) GetSecGroup() *SSecurityGroup
func (*SSecurityGroupRule) PostCreate ¶
func (self *SSecurityGroupRule) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SSecurityGroupRule) PostUpdate ¶
func (self *SSecurityGroupRule) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SSecurityGroupRule) PreDelete ¶
func (self *SSecurityGroupRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SSecurityGroupRule) SingleRules ¶
func (self *SSecurityGroupRule) SingleRules() ([]secrules.SecurityRule, error)
func (*SSecurityGroupRule) String ¶
func (self *SSecurityGroupRule) String() string
func (*SSecurityGroupRule) ValidateUpdateData ¶
func (self *SSecurityGroupRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SSecurityGroupRuleManager ¶
type SSecurityGroupRuleManager struct {
db.SResourceBaseManager
}
var SecurityGroupRuleManager *SSecurityGroupRuleManager
func (*SSecurityGroupRuleManager) AllowCreateItem ¶
func (manager *SSecurityGroupRuleManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSecurityGroupRuleManager) AllowListItems ¶
func (manager *SSecurityGroupRuleManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSecurityGroupRuleManager) FilterById ¶
func (*SSecurityGroupRuleManager) ListItemFilter ¶
func (manager *SSecurityGroupRuleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (sql *sqlchemy.SQuery, err error)
func (*SSecurityGroupRuleManager) SyncRules ¶
func (manager *SSecurityGroupRuleManager) SyncRules(ctx context.Context, userCred mcclient.TokenCredential, secgroup *SSecurityGroup, rules []secrules.SecurityRule) ([]SSecurityGroupRule, []SSecurityGroupRule, compare.SyncResult)
func (*SSecurityGroupRuleManager) ValidateCreateData ¶
func (manager *SSecurityGroupRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SSnapshot ¶
type SSnapshot struct { db.SVirtualResourceBase SManagedResourceBase DiskId string `width:"36" charset:"ascii" nullable:"true" create:"required" key_index:"true" list:"user"` StorageId string `width:"36" charset:"ascii" nullable:"true" list:"admin"` CreatedBy string `width:"36" charset:"ascii" nullable:"false" default:"manual" list:"admin"` Location string `charset:"ascii" nullable:"true" list:"admin"` Size int `nullable:"false" list:"user"` // MB OutOfChain bool `nullable:"false" default:"false" index:"true" list:"admin"` FakeDeleted bool `nullable:"false" default:"false" index:"true"` DiskType string `width:"32" charset:"ascii" nullable:"true" list:"user"` CloudregionId string `width:"36" charset:"ascii" nullable:"true" list:"user"` }
func (*SSnapshot) AllowCreateItem ¶
func (self *SSnapshot) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSnapshot) AllowDeleteItem ¶
func (self *SSnapshot) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSnapshot) AllowGetDetails ¶
func (self *SSnapshot) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSnapshot) AllowListItems ¶
func (self *SSnapshot) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSnapshot) AllowPerformDeleted ¶
func (self *SSnapshot) AllowPerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSnapshot) AllowPerformPurge ¶
func (self *SSnapshot) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSnapshot) AllowUpdateItem ¶
func (*SSnapshot) CustomizeCreate ¶
func (self *SSnapshot) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SSnapshot) CustomizeDelete ¶
func (self *SSnapshot) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SSnapshot) FakeDelete ¶
func (*SSnapshot) GetCustomizeColumns ¶
func (self *SSnapshot) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSnapshot) GetExtraDetails ¶
func (self *SSnapshot) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SSnapshot) GetISnapshotRegion ¶
func (self *SSnapshot) GetISnapshotRegion() (cloudprovider.ICloudRegion, error)
func (*SSnapshot) GetRegion ¶
func (self *SSnapshot) GetRegion() *SCloudregion
func (*SSnapshot) GetShortDesc ¶
func (*SSnapshot) PerformDeleted ¶
func (self *SSnapshot) PerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSnapshot) PerformPurge ¶
func (self *SSnapshot) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSnapshot) RealDelete ¶
func (*SSnapshot) StartSnapshotDeleteTask ¶
func (*SSnapshot) StartSnapshotsDeleteTask ¶
func (*SSnapshot) SyncWithCloudSnapshot ¶
func (self *SSnapshot) SyncWithCloudSnapshot(userCred mcclient.TokenCredential, ext cloudprovider.ICloudSnapshot, projectId string, projectSync bool, region *SCloudregion) error
Only sync snapshot status
type SSnapshotManager ¶
type SSnapshotManager struct {
db.SVirtualResourceBaseManager
}
var SnapshotManager *SSnapshotManager
func (*SSnapshotManager) AllowGetPropertyMaxCount ¶
func (self *SSnapshotManager) AllowGetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SSnapshotManager) AllowPerformDeleteDiskSnapshots ¶
func (self *SSnapshotManager) AllowPerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SSnapshotManager) CreateSnapshot ¶
func (self *SSnapshotManager) CreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, createdBy, diskId, guestId, location, name string) (*SSnapshot, error)
func (*SSnapshotManager) GetConvertSnapshot ¶
func (self *SSnapshotManager) GetConvertSnapshot(deleteSnapshot *SSnapshot) (*SSnapshot, error)
func (*SSnapshotManager) GetDiskFirstSnapshot ¶
func (self *SSnapshotManager) GetDiskFirstSnapshot(diskId string) *SSnapshot
func (*SSnapshotManager) GetDiskSnapshotCount ¶
func (self *SSnapshotManager) GetDiskSnapshotCount(diskId string) int
func (*SSnapshotManager) GetDiskSnapshots ¶
func (self *SSnapshotManager) GetDiskSnapshots(diskId string) []SSnapshot
func (*SSnapshotManager) GetDiskSnapshotsByCreate ¶
func (self *SSnapshotManager) GetDiskSnapshotsByCreate(diskId, createdBy string) []SSnapshot
func (*SSnapshotManager) GetPropertyMaxCount ¶
func (self *SSnapshotManager) GetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSnapshotManager) ListItemFilter ¶
func (manager *SSnapshotManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SSnapshotManager) PerformDeleteDiskSnapshots ¶
func (self *SSnapshotManager) PerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSnapshotManager) SyncSnapshots ¶
func (manager *SSnapshotManager) SyncSnapshots(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, snapshots []cloudprovider.ICloudSnapshot, projectId string, projectSync bool) compare.SyncResult
type SStorage ¶
type SStorage struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure SManagedResourceBase Capacity int `nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(Integer, nullable=False) # capacity of disk in MB Reserved int `nullable:"true" default:"0" list:"admin" update:"admin"` // Column(Integer, nullable=True, default=0) StorageType string `width:"32" charset:"ascii" nullable:"false" list:"user" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False) MediumType string `width:"32" charset:"ascii" nullable:"false" list:"user" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False) Cmtbound float32 `nullable:"true" list:"admin" update:"admin"` // Column(Float, nullable=True) StorageConf jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin"` // = Column(JSONEncodedDict, nullable=True) ZoneId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"admin_required"` StoragecacheId string `width:"36" charset:"ascii" nullable:"true" list:"admin" get:"admin"` }
func (*SStorage) AllowPerformCacheImage ¶
func (self *SStorage) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SStorage) AllowPerformUncacheImage ¶
func (self *SStorage) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SStorage) GetAllAttachingHosts ¶
func (*SStorage) GetAttachedHosts ¶
func (*SStorage) GetCapacity ¶
func (*SStorage) GetCustomizeColumns ¶
func (self *SStorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SStorage) GetDiskCount ¶
func (*SStorage) GetFreeCapacity ¶
func (*SStorage) GetHostCount ¶
func (*SStorage) GetIStorage ¶
func (self *SStorage) GetIStorage() (cloudprovider.ICloudStorage, error)
func (*SStorage) GetMasterHost ¶
func (*SStorage) GetOvercommitBound ¶
func (*SStorage) GetReserved ¶
func (*SStorage) GetSnapshotCount ¶
func (*SStorage) GetStoragecache ¶
func (self *SStorage) GetStoragecache() *SStoragecache
func (*SStorage) GetUsedCapacity ¶
func (*SStorage) PerformCacheImage ¶
func (self *SStorage) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SStorage) PerformUncacheImage ¶
func (self *SStorage) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SStorage) SetStoragecache ¶
func (self *SStorage) SetStoragecache(cache *SStoragecache) error
func (*SStorage) SyncStatusWithHosts ¶
func (self *SStorage) SyncStatusWithHosts()
type SStorageCapacity ¶
type SStorageManager ¶
type SStorageManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var StorageManager *SStorageManager
func (*SStorageManager) AllowListItems ¶
func (manager *SStorageManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SStorageManager) FetchStorageById ¶
func (manager *SStorageManager) FetchStorageById(storageId string) *SStorage
func (*SStorageManager) GetContextManager ¶
func (manager *SStorageManager) GetContextManager() []db.IModelManager
func (*SStorageManager) InitializeData ¶
func (manager *SStorageManager) InitializeData() error
func (*SStorageManager) ListItemFilter ¶
func (manager *SStorageManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SStorageManager) SyncStorages ¶
func (manager *SStorageManager) SyncStorages(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, zone *SZone, storages []cloudprovider.ICloudStorage) ([]SStorage, []cloudprovider.ICloudStorage, compare.SyncResult)
func (*SStorageManager) TotalCapacity ¶
func (manager *SStorageManager) TotalCapacity(rangeObj db.IStandaloneModel, hostTypes []string) StoragesCapacityStat
func (*SStorageManager) ValidateCreateData ¶
func (manager *SStorageManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SStoragecache ¶
type SStoragecache struct { db.SStandaloneResourceBase SInfrastructure SManagedResourceBase Path string `width:"256" charset:"utf8" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // = Column(VARCHAR(256, charset='utf8'), nullable=True) }
func (*SStoragecache) AllowPerformCacheImage ¶
func (self *SStoragecache) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SStoragecache) AllowPerformUncacheImage ¶
func (self *SStoragecache) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SStoragecache) GetCustomizeColumns ¶
func (self *SStoragecache) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SStoragecache) GetExtraDetails ¶
func (self *SStoragecache) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SStoragecache) GetHost ¶
func (self *SStoragecache) GetHost() (*SHost, error)
func (*SStoragecache) GetIStorageCache ¶
func (self *SStoragecache) GetIStorageCache() (cloudprovider.ICloudStoragecache, error)
func (*SStoragecache) PerformCacheImage ¶
func (self *SStoragecache) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SStoragecache) PerformUncacheImage ¶
func (self *SStoragecache) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SStoragecache) StartImageCacheTask ¶
func (self *SStoragecache) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isForce bool, parentTaskId string) error
func (*SStoragecache) StartImageUncacheTask ¶
func (self *SStoragecache) StartImageUncacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isForce bool, parentTaskId string) error
func (*SStoragecache) ValidateDeleteCondition ¶
func (self *SStoragecache) ValidateDeleteCondition(ctx context.Context) error
type SStoragecacheManager ¶
type SStoragecacheManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var StoragecacheManager *SStoragecacheManager
func (*SStoragecacheManager) ListItemFilter ¶
func (manager *SStoragecacheManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SStoragecacheManager) SyncWithCloudStoragecache ¶
func (manager *SStoragecacheManager) SyncWithCloudStoragecache(cloudCache cloudprovider.ICloudStoragecache) (*SStoragecache, error)
type SStoragecachedimage ¶
type SStoragecachedimage struct { db.SJointResourceBase SInfrastructure StoragecacheId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` CachedimageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` ExternalId string `width:"256" charset:"utf8" nullable:"false" get:"admin"` Status string `width:"32" charset:"ascii" nullable:"false" default:"init" list:"admin" update:"admin" create:"admin_required"` // = Column(VARCHAR(32, charset='ascii'), nullable=False, Path string `width:"256" charset:"utf8" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // = Column(VARCHAR(256, charset='utf8'), nullable=True) LastDownload time.Time `get:"admin"` // = Column(DateTime) DownloadRefcnt int `get:"admin"` // = Column(Integer) }
func (*SStoragecachedimage) AddDownloadRefcount ¶
func (self *SStoragecachedimage) AddDownloadRefcount() error
func (*SStoragecachedimage) Delete ¶
func (self *SStoragecachedimage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SStoragecachedimage) Detach ¶
func (self *SStoragecachedimage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SStoragecachedimage) GetCachedimage ¶
func (self *SStoragecachedimage) GetCachedimage() *SCachedimage
func (*SStoragecachedimage) GetCustomizeColumns ¶
func (self *SStoragecachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SStoragecachedimage) GetExtraDetails ¶
func (self *SStoragecachedimage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SStoragecachedimage) GetHost ¶
func (self *SStoragecachedimage) GetHost() (*SHost, error)
func (*SStoragecachedimage) GetStoragecache ¶
func (self *SStoragecachedimage) GetStoragecache() *SStoragecache
func (*SStoragecachedimage) Master ¶
func (joint *SStoragecachedimage) Master() db.IStandaloneModel
func (*SStoragecachedimage) SetExternalId ¶
func (self *SStoragecachedimage) SetExternalId(externalId string) error
func (*SStoragecachedimage) SetStatus ¶
func (self *SStoragecachedimage) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
func (*SStoragecachedimage) Slave ¶
func (joint *SStoragecachedimage) Slave() db.IStandaloneModel
func (*SStoragecachedimage) ValidateDeleteCondition ¶
func (self *SStoragecachedimage) ValidateDeleteCondition(ctx context.Context) error
type SStoragecachedimageManager ¶
type SStoragecachedimageManager struct { db.SJointResourceBaseManager SInfrastructureManager }
var StoragecachedimageManager *SStoragecachedimageManager
func (*SStoragecachedimageManager) AllowListDescendent ¶
func (manager *SStoragecachedimageManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, model db.IStandaloneModel, query jsonutils.JSONObject) bool
func (*SStoragecachedimageManager) GetStoragecachedimage ¶
func (manager *SStoragecachedimageManager) GetStoragecachedimage(cacheId string, imageId string) *SStoragecachedimage
func (*SStoragecachedimageManager) Register ¶
func (manager *SStoragecachedimageManager) Register(ctx context.Context, userCred mcclient.TokenCredential, cacheId, imageId string) *SStoragecachedimage
type SSyncRange ¶
type SSyncRange struct { Force bool FullSync bool ProjectSync bool Region []string Zone []string Host []string }
func (*SSyncRange) NeedSyncInfo ¶
func (sr *SSyncRange) NeedSyncInfo() bool
func (*SSyncRange) Normalize ¶
func (sr *SSyncRange) Normalize() error
type SVCenter ¶
type SVCenter struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure Hostname string `width:"64" charset:"ascii" nullable:"false" list:"admin"` // = Column(VARCHAR(64, charset='ascii'), nullable=False) Port int `nullable:"false" list:"admin"` // = Column(Integer, nullable=False) Account string `width:"64" charset:"ascii" nullable:"false" list:"admin"` // = Column(VARCHAR(64, charset='ascii'), nullable=False) Password string `width:"256" charset:"ascii" nullable:"false"` // = Column(VARCHAR(256, charset='ascii'), nullable=False) LastSync time.Time `nullable:"true" get:"admin"` // = Column(DateTime, nullable=True) Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // = Column(VARCHAR(32, charset='ascii'), nullable=True) Sysinfo jsonutils.JSONObject `nullable:"true" get:"admin"` // = Column(JSONEncodedDict, nullable=True) }
type SVCenterManager ¶
type SVCenterManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var VCenterManager *SVCenterManager
func (*SVCenterManager) AllowCreateItem ¶
func (manager *SVCenterManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
type SVpc ¶
type SVpc struct { db.SEnabledStatusStandaloneResourceBase SInfrastructure SManagedResourceBase IsDefault bool `default:"false" list:"admin" create:"admin_optional"` CidrBlock string `width:"64" charset:"ascii" nullable:"true" list:"admin" create:"admin_required"` CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` }
func (*SVpc) AllowPerformPurge ¶
func (self *SVpc) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SVpc) CustomizeCreate ¶
func (self *SVpc) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SVpc) CustomizeDelete ¶
func (self *SVpc) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SVpc) GetCloudRegionId ¶
func (*SVpc) GetCustomizeColumns ¶
func (self *SVpc) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SVpc) GetExtraDetails ¶
func (self *SVpc) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SVpc) GetIRegion ¶
func (self *SVpc) GetIRegion() (cloudprovider.ICloudRegion, error)
func (*SVpc) GetNetworkCount ¶
func (*SVpc) GetRegion ¶
func (self *SVpc) GetRegion() *SCloudregion
func (*SVpc) GetWireCount ¶
func (*SVpc) PerformPurge ¶
func (self *SVpc) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SVpc) PostCreate ¶
func (self *SVpc) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SVpc) RealDelete ¶
func (*SVpc) StartDeleteVpcTask ¶
func (*SVpc) SyncWithCloudVpc ¶
func (self *SVpc) SyncWithCloudVpc(extVPC cloudprovider.ICloudVpc) error
type SVpcManager ¶
type SVpcManager struct { db.SEnabledStatusStandaloneResourceBaseManager SInfrastructureManager }
var VpcManager *SVpcManager
func (*SVpcManager) GetContextManager ¶
func (manager *SVpcManager) GetContextManager() []db.IModelManager
func (*SVpcManager) InitializeData ¶
func (manager *SVpcManager) InitializeData() error
func (*SVpcManager) ListItemFilter ¶
func (manager *SVpcManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SVpcManager) SyncVPCs ¶
func (manager *SVpcManager) SyncVPCs(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, vpcs []cloudprovider.ICloudVpc) ([]SVpc, []cloudprovider.ICloudVpc, compare.SyncResult)
func (*SVpcManager) ValidateCreateData ¶
func (manager *SVpcManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SWire ¶
type SWire struct { db.SStandaloneResourceBase SInfrastructure Bandwidth int `list:"admin" update:"admin" nullable:"false" create:"admin_required"` // = Column(Integer, nullable=False) # bandwidth of network in Mbps ScheduleRank int `list:"admin" update:"admin"` // = Column(Integer, default=0, nullable=True) ZoneId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // = Column(VARCHAR(36, charset='ascii'), nullable=False) VpcId string `wdith:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` }
func (*SWire) GetCandidateNetworkForIp ¶
func (*SWire) GetCandidatePrivateNetwork ¶
func (*SWire) GetCandidatePublicNetwork ¶
func (*SWire) GetCustomizeColumns ¶
func (self *SWire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SWire) GetExtraDetails ¶
func (self *SWire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SWire) GetHostwires ¶
func (*SWire) GetIWire ¶
func (self *SWire) GetIWire() (cloudprovider.ICloudWire, error)
func (*SWire) NetworkCount ¶
func (*SWire) ValidateDeleteCondition ¶
func (*SWire) ValidateUpdateData ¶
type SWireManager ¶
type SWireManager struct { db.SStandaloneResourceBaseManager SInfrastructureManager }
var WireManager *SWireManager
func (*SWireManager) FetchWireById ¶
func (manager *SWireManager) FetchWireById(wireId string) *SWire
func (*SWireManager) GetContextManager ¶
func (manager *SWireManager) GetContextManager() []db.IModelManager
func (*SWireManager) GetWireOfIp ¶
func (manager *SWireManager) GetWireOfIp(ipAddr string) (*SWire, error)
func (*SWireManager) InitializeData ¶
func (manager *SWireManager) InitializeData() error
func (*SWireManager) ListItemFilter ¶
func (manager *SWireManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SWireManager) SyncWires ¶
func (manager *SWireManager) SyncWires(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc, wires []cloudprovider.ICloudWire) ([]SWire, []cloudprovider.ICloudWire, compare.SyncResult)
func (*SWireManager) TotalCount ¶
func (manager *SWireManager) TotalCount(rangeObj db.IStandaloneModel, hostTypes []string) WiresCountStat
func (*SWireManager) ValidateCreateData ¶
func (manager *SWireManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SZone ¶
type SZone struct { db.SStatusStandaloneResourceBase SInfrastructure Location string `width:"256" charset:"utf8" get:"user" update:"admin"` // = Column(VARCHAR(256, charset='utf8')) Contacts string `width:"256" charset:"utf8" get:"user" update:"admin"` // = Column(VARCHAR(256, charset='utf8')) NameCn string `width:"256" charset:"utf8"` // = Column(VARCHAR(256, charset='utf8')) // status = Column(VARCHAR(36, charset='ascii'), nullable=False, default=ZONE_DISABLE) ManagerUri string `width:"256" charset:"ascii" list:"admin" update:"admin"` // = Column(VARCHAR(256, charset='ascii'), nullable=True) // admin_id = Column(VARCHAR(36, charset='ascii'), nullable=False) CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"admin_required"` }
func (*SZone) AllowGetDetailsCapability ¶
func (self *SZone) AllowGetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SZone) GeneralUsage ¶
func (zone *SZone) GeneralUsage() ZoneGeneralUsage
func (*SZone) GetCloudRegionId ¶
func (*SZone) GetCustomizeColumns ¶
func (zone *SZone) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SZone) GetDetailsCapability ¶
func (self *SZone) GetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SZone) GetExtraDetails ¶
func (zone *SZone) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
func (*SZone) GetRegion ¶
func (zone *SZone) GetRegion() *SCloudregion
type SZoneManager ¶
type SZoneManager struct { db.SStatusStandaloneResourceBaseManager SInfrastructureManager }
var ZoneManager *SZoneManager
func (*SZoneManager) AllowListItems ¶
func (manager *SZoneManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SZoneManager) Count ¶
func (manager *SZoneManager) Count() int
func (*SZoneManager) FetchZoneById ¶
func (manager *SZoneManager) FetchZoneById(zoneId string) *SZone
func (*SZoneManager) GetContextManager ¶
func (manager *SZoneManager) GetContextManager() []db.IModelManager
func (*SZoneManager) InitializeData ¶
func (manager *SZoneManager) InitializeData() error
func (*SZoneManager) ListItemFilter ¶
func (manager *SZoneManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SZoneManager) SyncZones ¶
func (manager *SZoneManager) SyncZones(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, zones []cloudprovider.ICloudZone) ([]SZone, []cloudprovider.ICloudZone, compare.SyncResult)
func (*SZoneManager) ValidateCreateData ¶
func (manager *SZoneManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SchedStrategyType ¶
type SchedStrategyType string
type SecurityGroupRuleSet ¶
type SecurityGroupRuleSet []SSecurityGroupRule
func (SecurityGroupRuleSet) Len ¶
func (v SecurityGroupRuleSet) Len() int
func (SecurityGroupRuleSet) Less ¶
func (v SecurityGroupRuleSet) Less(i, j int) bool
func (SecurityGroupRuleSet) Swap ¶
func (v SecurityGroupRuleSet) Swap(i, j int)
type StorageCapacityStat ¶
type StorageStat ¶
type StoragesCapacityStat ¶
type WiresCountStat ¶
Source Files ¶
- baremetalagents.go
- billingresource.go
- cachedimages.go
- capabilities.go
- cloudaccounts.go
- cloudproviders.go
- cloudregions.go
- disks.go
- dnsrecords.go
- doc.go
- dynamicschedtags.go
- elasticips.go
- groupguests.go
- groupjoints.go
- groupnetworks.go
- groups.go
- guestcdrom.go
- guestdisks.go
- guestdrivers.go
- guestjoints.go
- guestnetworks.go
- guests.go
- helper.go
- hostdrivers.go
- hostjoints.go
- hostnetworks.go
- hosts.go
- hostschedtags.go
- hoststorages.go
- hostwires.go
- images.go
- inframanagers.go
- initdb.go
- isolated_devices.go
- keypairs.go
- loadbalancer_common.go
- loadbalancer_const.go
- loadbalanceracls.go
- loadbalanceragents.go
- loadbalancerbackendgroups.go
- loadbalancerbackends.go
- loadbalancercertificates.go
- loadbalancerlistenerrules.go
- loadbalancerlisteners.go
- loadbalancernetworks.go
- loadbalancers.go
- managedresource.go
- netinterfaces.go
- networks.go
- quotas.go
- reservedips.go
- schedpolicies.go
- schedtags.go
- secgrouprules.go
- secgroups.go
- snapshots.go
- specs.go
- storagecachedimages.go
- storagecaches.go
- storages.go
- usage.go
- vcenters.go
- vpcs.go
- wires.go
- zones.go