Documentation ¶
Index ¶
- Constants
- Variables
- func AttachUsageQuery(q *sqlchemy.SQuery, hosts *sqlchemy.SSubQuery, ...) *sqlchemy.SQuery
- 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 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 IPAddlocationDirection
- type ISpecModel
- type ISpecModelManager
- type IsolatedDeviceCountStat
- type NetworkPortStat
- 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 SCloudprovider
- func (self *SCloudprovider) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) AllowPerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (self *SCloudprovider) CanSync() bool
- func (self *SCloudprovider) GetBalance() (float64, error)
- 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) MarkStartSync(userCred mcclient.TokenCredential)
- func (self *SCloudprovider) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudprovider) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (self *SCloudprovider) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- func (self *SCloudprovider) SaveSysInfo(info jsonutils.JSONObject)
- 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) AllowPerformGetSubAccounts(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider
- func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider
- func (manager *SCloudproviderManager) InitializeData() error
- func (manager *SCloudproviderManager) PerformGetSubAccounts(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, 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 (disk *SDisk) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...)
- 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 (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) 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) AllowPerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (rec *SDnsRecord) GetInfo() []string
- func (rec *SDnsRecord) GetTtl() int
- func (rec *SDnsRecord) PerformAddRecords(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) CheckNameForDnsType(name, recType string) (err error)
- func (man *SDnsRecordManager) GetRecordsLimit() int
- func (man *SDnsRecordManager) GetRecordsSeparator() string
- func (man *SDnsRecordManager) GetRecordsType(recs []string) string
- func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) (rec []string, err 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 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) 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) 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) 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) 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) 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 (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) 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) StartRebuildRootTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, ...) error
- func (self *SGuest) StartSuspendTask(ctx context.Context, userCred mcclient.TokenCredential) 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) 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) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- 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) 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) GetAdminNetInterface() *SNetInterface
- func (self *SHost) GetAttach2Network(network *SNetwork) *SHostnetwork
- func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity
- func (self *SHost) GetAttachedStorages(storageType string) []SStorage
- 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) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- 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) 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) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (self *SHost) Request(userCred mcclient.TokenCredential, method string, url string, ...) (jsonutils.JSONObject, error)
- func (self *SHost) StartDeleteBaremetalTask(userCred mcclient.TokenCredential) 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) ValidateDeleteCondition(ctx context.Context) 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 (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) 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
- 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) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
- 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 (self *SKeypair) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (self *SKeypair) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) *jsonutils.JSONDict
- 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) FilterByOwner(q *sqlchemy.SQuery, owner string) *sqlchemy.SQuery
- func (manager *SKeypairManager) GetOwnerId(userCred mcclient.TokenCredential) 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 SManagedResourceBase
- type SNetInterface
- 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) 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) 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) 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 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) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- 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) 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
- 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) 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) 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 ¶
View Source
const ( 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" )
View Source
const ( BILLING_TYPE_POSTPAID = "postpaid" BILLING_TYPE_PREPAID = "prepaid" )
View Source
const ( CACHED_IMAGE_REFRESH_SECONDS = 900 // 15 minutes CACHED_IMAGE_REFERENCE_SESSION_EXPIRE_SECONDS = 86400 // 1 day )
View Source
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_AZURE = "Azure" )
View Source
const ( CLOUD_REGION_STATUS_INSERVER = "inservice" CLOUD_REGION_STATUS_OUTOFSERVICE = "outofservice" )
View Source
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" )
View Source
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 )
View Source
const ( REDIS_TYPE = "REDIS" RDS_TYPE = "RDS" )
View Source
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_AZURE = "azure" // HYPERVISOR_DEFAULT = HYPERVISOR_KVM HYPERVISOR_DEFAULT = HYPERVISOR_ALIYUN )
View Source
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_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" HOST_STATUS_INIT = "init" HOST_STATUS_PREPARE = "prepare" HOST_STATUS_PREPARE_FAIL = "prepare_fail" HOST_STATUS_READY = "ready" HOST_STATUS_RUNNING = "running" HOST_STATUS_MAINTAINING = "maintaining" HOST_STATUS_START_MAINTAIN = "start_maintain" HOST_STATUS_DELETING = "deleting" HOST_STATUS_DELETE = "delete" HOST_STATUS_DELETE_FAIL = "delete_fail" HOST_STATUS_UNKNOWN = "unknown" HOST_STATUS_SYNCING_STATUS = "syncing_status" HOST_STATUS_SYNC = "sync" HOST_STATUS_SYNC_FAIL = "sync_fail" HOST_STATUS_START_CONVERT = "start_convert" HOST_STATUS_CONVERTING = "converting" )
View Source
const ( IMAGE_STATUS_ACTIVE = "active" IMAGE_STATUS_QUEUED = "queued" IMAGE_STATUS_KILLED = "killed" IMAGE_STATUS_DELETED = "deleted" )
View Source
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" )
View Source
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" )
View Source
const ( STRATEGY_REQUIRE = "require" STRATEGY_EXCLUDE = "exclude" STRATEGY_PREFER = "prefer" STRATEGY_AVOID = "avoid" // # container used aggregate CONTAINER_AGGREGATE = "container" )
View Source
const ( // create by MANUAL = "manual" AUTO = "auto" SNAPSHOT_CREATING = "creating" SNAPSHOT_FAILED = "create_failed" SNAPSHOT_READY = "ready" SNAPSHOT_DELETING = "deleting" SNAPSHOT_UNKNOWN = "unknown" )
View Source
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 )
View Source
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_ENABLED = "enabled" STORAGE_DISABLED = "disabled" STORAGE_OFFLINE = "offline" STORAGE_ONLINE = "online" DISK_TYPE_ROTATE = "rotate" DISK_TYPE_SSD = "ssd" DISK_TYPE_HYBRID = "hybrid" )
View Source
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 )
View Source
const ( ZONE_ENABLE = "enable" ZONE_DISABLE = "disable" ZONE_SOLDOUT = "soldout" ZONE_LACK = "lack" )
View Source
const (
DNS_RECORDS_SEPARATOR = ","
)
View Source
const (
MAX_IFNAME_SIZE = 13
)
View Source
const MAX_TRIES = 10
View Source
const (
SECURITY_GROUP_SEPARATOR = ";"
)
Variables ¶
View Source
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") )
View Source
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, } )
View Source
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, }
View Source
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}
View Source
var HYPERVISORS = []string{HYPERVISOR_KVM, HYPERVISOR_BAREMETAL, HYPERVISOR_ESXI, HYPERVISOR_CONTAINER, HYPERVISOR_ALIYUN, HYPERVISOR_AZURE}
View Source
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, }
View Source
var ID_VENDOR_MAP = map[string]string{ NVIDIA_VENDOR_ID: "NVIDIA", AMD_VENDOR_ID: "AMD", }
View Source
var NIC_TYPES = []string{NIC_TYPE_IPMI, NIC_TYPE_ADMIN}
View Source
var PUBLIC_CLOUD_HYPERVISORS = []string{HYPERVISOR_ALIYUN, HYPERVISOR_AZURE}
View Source
var QuotaManager *quotas.SQuotaManager
View Source
var STRATEGY_LIST = []string{STRATEGY_REQUIRE, STRATEGY_EXCLUDE, STRATEGY_PREFER, STRATEGY_AVOID}
View Source
var VALID_GPU_TYPES = []string{GPU_HPC_TYPE, GPU_VGA_TYPE}
View Source
var VALID_PASSTHROUGH_TYPES = []string{DIRECT_PCI_TYPE, USB_TYPE, NIC_TYPE, GPU_HPC_TYPE, GPU_VGA_TYPE}
View Source
var VENDOR_ID_MAP = map[string]string{ "NVIDIA": NVIDIA_VENDOR_ID, "AMD": AMD_VENDOR_ID, }
View Source
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}
View Source
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_SNAPSHOT_STREAM}
Functions ¶
func AttachUsageQuery ¶
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 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 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 }
func GetHostDriver ¶
func GetHostDriver(hostType string) IHostDriver
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 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 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) 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) AllowPerformSync ¶
func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudprovider) AllowPerformUpdateCredential ¶
func (self *SCloudprovider) AllowPerformUpdateCredential(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) 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) MarkStartSync ¶
func (self *SCloudprovider) MarkStartSync(userCred mcclient.TokenCredential)
func (*SCloudprovider) PerformSync ¶
func (self *SCloudprovider) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudprovider) PerformUpdateCredential ¶
func (self *SCloudprovider) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCloudprovider) PostCreate ¶
func (self *SCloudprovider) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SCloudprovider) SaveSysInfo ¶
func (self *SCloudprovider) SaveSysInfo(info jsonutils.JSONObject)
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) AllowPerformGetSubAccounts ¶
func (manager *SCloudproviderManager) AllowPerformGetSubAccounts(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SCloudproviderManager) FetchCloudproviderById ¶
func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider
func (*SCloudproviderManager) FetchCloudproviderByIdOrName ¶
func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider
func (*SCloudproviderManager) InitializeData ¶
func (manager *SCloudproviderManager) InitializeData() error
func (*SCloudproviderManager) PerformGetSubAccounts ¶
func (manager *SCloudproviderManager) PerformGetSubAccounts(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, 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:"false" list:"admin" create:"required"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False) // # 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) PostCreate ¶
func (disk *SDisk) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SDisk) PrepareSaveImage ¶
func (*SDisk) RealDelete ¶
func (*SDisk) SetDiskReady ¶
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) SyncDisks ¶
func (manager *SDiskManager) SyncDisks(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, disks []cloudprovider.ICloudDisk) ([]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:"0" create:"optional" list:"user" update:"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) 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) GetTtl ¶
func (rec *SDnsRecord) GetTtl() int
func (*SDnsRecord) PerformAddRecords ¶
func (rec *SDnsRecord) PerformAddRecords(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) CheckNameForDnsType ¶
func (man *SDnsRecordManager) CheckNameForDnsType(name, recType string) (err error)
func (*SDnsRecordManager) GetRecordsLimit ¶
func (man *SDnsRecordManager) GetRecordsLimit() int
GetRecordsLimit implements IAdminSharableVirtualModelManager
func (*SDnsRecordManager) GetRecordsSeparator ¶
func (man *SDnsRecordManager) GetRecordsSeparator() string
GetRecordsSeparator implements IAdminSharableVirtualModelManager
func (*SDnsRecordManager) GetRecordsType ¶
func (man *SDnsRecordManager) GetRecordsType(recs []string) string
func (*SDnsRecordManager) ParseInputInfo ¶
func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) (rec []string, err 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 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) 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) 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) 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) 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) 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) 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) 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) 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) StartGuestSaveImage ¶
func (*SGuest) StartGuestStopTask ¶
func (*SGuest) StartGueststartTask ¶
func (*SGuest) StartInsertIsoTask ¶
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) compare.SyncResult
func (*SGuest) SyncVMEip ¶
func (self *SGuest) SyncVMEip(ctx context.Context, userCred mcclient.TokenCredential, extEip cloudprovider.ICloudEIP) compare.SyncResult
func (*SGuest) SyncVMNics ¶
func (self *SGuest) SyncVMNics(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vnics []cloudprovider.ICloudNic) compare.SyncResult
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" nillable:"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) }
func (*SHost) AllowGetDetailsVnc ¶
func (self *SHost) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SHost) Attach2Storage ¶
func (*SHost) Attach2Wire ¶
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) 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) 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) GetDetailsVnc ¶
func (self *SHost) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
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) 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) RealDelete ¶
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) StartDeleteBaremetalTask ¶
func (self *SHost) StartDeleteBaremetalTask(userCred mcclient.TokenCredential) error
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) ([]SGuest, []cloudprovider.ICloudVM, compare.SyncResult)
func (*SHost) SyncHostWires ¶
func (self *SHost) SyncHostWires(ctx context.Context, userCred mcclient.TokenCredential, wires []cloudprovider.ICloudWire) compare.SyncResult
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) 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) 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) ([]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
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:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False) HostId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False) StorageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // 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) 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) ExtraSearchConditions ¶
func (manager *SIsolatedDeviceManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition
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:"optional"` // Column(VARCHAR(length=12, charset='ascii'), nullable=True, default='RSA') Fingerprint string `width:"48" charset:"ascii" nullable:"false" list:"user"` // Column(VARCHAR(length=48, charset='ascii'), nullable=False) PrivateKey string `width:"2048" charset:"ascii" nullable:"false"` // Column(VARCHAR(length=2048, charset='ascii'), nullable=False) PublicKey string `width:"1024" charset:"ascii" nullable:"false" list:"user"` // Column(VARCHAR(length=1024, charset='ascii'), nullable=False) OwnerId string `width:"128" charset:"ascii" index:"true" nullable:"false"` // 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) AllowUpdateItem ¶
func (*SKeypair) GetCustomizeColumns ¶
func (self *SKeypair) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict
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) FilterByOwner ¶
func (*SKeypairManager) GetOwnerId ¶
func (manager *SKeypairManager) GetOwnerId(userCred mcclient.TokenCredential) 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 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) GetId ¶
func (netif *SNetInterface) GetId() string
func (*SNetInterface) GetWire ¶
func (netif *SNetInterface) GetWire() *SWire
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) 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) error
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) 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) ([]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 SSchedtag ¶
type SSchedtag struct { db.SStandaloneResourceBase 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
}
var SchedtagManager *SSchedtagManager
func (*SSchedtagManager) AllowCreateItem ¶
func (manager *SSchedtagManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
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) 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) ([]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) 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, region *SCloudregion) error
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) 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
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 ¶
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) 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) 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 ¶
- baremetalstatus.go
- billingresource.go
- cachedimages.go
- capabilities.go
- cloudproviders.go
- cloudregions.go
- disks.go
- dnsrecords.go
- doc.go
- elasticips.go
- groupguests.go
- groupjoints.go
- groupnetworks.go
- groups.go
- guestcdrom.go
- guestdisks.go
- guestdrivers.go
- guestjoints.go
- guestnetworks.go
- guests.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
- managedresource.go
- netinterfaces.go
- networks.go
- quotas.go
- reservedips.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
Click to show internal directories.
Click to hide internal directories.