models

package
v0.3.9-5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 128 Imported by: 55

Documentation

Index

Constants

View Source
const (
	REDIS_TYPE = "REDIS"
	RDS_TYPE   = "RDS"
)
View Source
const (
	IMAGE_TYPE_NORMAL = "normal"
	IMAGE_TYPE_GUEST  = "guest"
)
View Source
const (
	MAX_IFNAME_SIZE = 13
	MAX_HINT_LEN    = MAX_IFNAME_SIZE - 4          // 9
	HINT_BASE_LEN   = 6                            // 6
	HINT_RAND_LEN   = MAX_HINT_LEN - HINT_BASE_LEN // 3

	MAX_GUESTNIC_TO_SAME_NETWORK = 2
)
View Source
const (
	DIRECT_PCI_TYPE = api.DIRECT_PCI_TYPE
	GPU_HPC_TYPE    = api.GPU_HPC_TYPE // # for compute
	GPU_VGA_TYPE    = api.GPU_VGA_TYPE // # for display
	USB_TYPE        = api.USB_TYPE
	NIC_TYPE        = api.NIC_TYPE

	NVIDIA_VENDOR_ID = api.NVIDIA_VENDOR_ID
	AMD_VENDOR_ID    = api.AMD_VENDOR_ID
)
View Source
const (
	STRATEGY_REQUIRE = api.STRATEGY_REQUIRE
	STRATEGY_EXCLUDE = api.STRATEGY_EXCLUDE
	STRATEGY_PREFER  = api.STRATEGY_PREFER
	STRATEGY_AVOID   = api.STRATEGY_AVOID

	// # container used aggregate
	CONTAINER_AGGREGATE = api.CONTAINER_AGGREGATE
)
View Source
const (
	LOCK_CLASS_guestnetworks_mapped_addr = "guestnetworks-mapped-addr"
	LOCK_OBJ_guestnetworks_mapped_addr   = "the-addr"

	LOCK_CLASS_hosts_mapped_addr = "hosts-mapped-addr"
	LOCK_OBJ_hosts_mapped_addr   = "the-addr"
)
View Source
const DNS_RECORDS_SEPARATOR = ","
View Source
const (
	EMPTY_MD5 = "d751713988987e9331980363e24189ce"
)
View Source
const ErrExistSD = errors.Error("snapshotpolicy disk has been exist")
View Source
const ErrStorageInUse = errors.Error("StorageInUse")
View Source
const (
	SECURITY_GROUP_SEPARATOR = ";"
)

Variables

View Source
var (
	DomainQuota               SDomainQuota
	DomainQuotaManager        *SQuotaManager
	DomainUsageManager        *SQuotaManager
	DomainPendingUsageManager *SQuotaManager
)
View Source
var (
	InfrasQuota               SInfrasQuota
	InfrasQuotaManager        *SQuotaManager
	InfrasUsageManager        *SQuotaManager
	InfrasPendingUsageManager *SQuotaManager
)
View Source
var (
	ProjectQuota               SProjectQuota
	ProjectQuotaManager        *SQuotaManager
	ProjectUsageManager        *SQuotaManager
	ProjectPendingUsageManager *SQuotaManager
)
View Source
var (
	Quota                    SQuota
	QuotaManager             *SQuotaManager
	QuotaUsageManager        *SQuotaManager
	QuotaPendingUsageManager *SQuotaManager
)
View Source
var (
	RegionQuota               SRegionQuota
	RegionQuotaManager        *SQuotaManager
	RegionUsageManager        *SQuotaManager
	RegionPendingUsageManager *SQuotaManager
)
View Source
var (
	ScalingTimerManager *SScalingTimerManager
	ScalingAlarmManager *SScalingAlarmManager
)
View Source
var (
	ZoneQuota               SZoneQuota
	ZoneQuotaManager        *SQuotaManager
	ZoneUsageManager        *SQuotaManager
	ZonePendingUsageManager *SQuotaManager
)
View Source
var CapacityUsedCloudStorageProvider = []string{
	api.CLOUD_PROVIDER_VMWARE,
}
View Source
var CoolingTimeLocation, _ = time.LoadLocation("Asia/Shanghai")
View Source
var HypervisorIndependentInstanceSnapshot = []string{
	api.HYPERVISOR_KVM,
}
View Source
var ID_VENDOR_MAP = api.ID_VENDOR_MAP
View Source
var LB_CERTS_TO_BE_PURGE = map[string][]string{}
View Source
var METADATA_EXT_HOST2WIRE_KEY = "ext:vmware:host2wire"
View Source
var (
	METADATA_EXT_SCHEDTAG_KEY = "ext:schedtag"
)
View Source
var ProviderHasSubSnapshot = []string{
	api.CLOUD_PROVIDER_ONECLOUD,
}
View Source
var STRATEGY_LIST = api.STRATEGY_LIST
View Source
var (
	TIMERLANG = "timerLang"
)
View Source
var VALID_GPU_TYPES = api.VALID_GPU_TYPES
View Source
var VALID_PASSTHROUGH_TYPES = api.VALID_PASSTHROUGH_TYPES
View Source
var VENDOR_ID_MAP = api.VENDOR_ID_MAP

Functions

func ApplySchedPolicies

func ApplySchedPolicies(input *schedapi.ScheduleInput) *schedapi.ScheduleInput

func AttachUsageQuery

func AttachUsageQuery(
	q *sqlchemy.SQuery,
	hosts *sqlchemy.SSubQuery,
	hostTypes []string,
	resourceTypes []string,
	providers []string, brands []string, cloudEnv string,
	rangeObjs []db.IStandaloneModel,
) *sqlchemy.SQuery

func Brand2Hypervisor

func Brand2Hypervisor(brand string) string

func CheckBillingResourceExpireAt

func CheckBillingResourceExpireAt(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func CheckingSecgroupIds

func CheckingSecgroupIds(ctx context.Context, userCred mcclient.TokenCredential, secgroupIds []string) ([]string, error)

func ChooseNetworkByAddressCount

func ChooseNetworkByAddressCount(nets []*SNetwork) (*SNetwork, *SNetwork)

func CloudProviderFilter

func CloudProviderFilter(q *sqlchemy.SQuery, managerIdField sqlchemy.IQueryField, providers []string, brands []string, cloudEnv string) *sqlchemy.SQuery

func ConvertStorageInfo2BaremetalStorages

func ConvertStorageInfo2BaremetalStorages(storageInfo jsonutils.JSONObject) []*baremetal.BaremetalStorage

func DeleteResourceJointSchedtags

func DeleteResourceJointSchedtags(obj IModelWithSchedtag, ctx context.Context, userCred mcclient.TokenCredential) error

func GetAllModelSpecs

func GetAllModelSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func GetAvailableHostCount

func GetAvailableHostCount(userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (int, error)

func GetDiskSpecV2

func GetDiskSpecV2(storageInfo jsonutils.JSONObject) api.DiskDriverSpec

func GetDynamicConditionInput

func GetDynamicConditionInput(man IDynamicResourceManager, input *jsonutils.JSONDict) *jsonutils.JSONDict

func GetIPTenantIdPairs

func GetIPTenantIdPairs()

func GetIsolatedDeviceSpecs

func GetIsolatedDeviceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func GetModelSpec

func GetModelSpec(manager ISpecModelManager, model ISpecModel) (jsonutils.JSONObject, error)

func GetModelsSpecs

func GetModelsSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict, managers ...ISpecModelManager) (jsonutils.JSONObject, error)

func GetNotSupportAutoRenewHypervisors

func GetNotSupportAutoRenewHypervisors() []string

func GetObjectPtr

func GetObjectPtr(obj interface{}) interface{}

GetObjectPtr wraps the given value with pointer: V => *V, *V => **V, etc.

func GetPropertySkusSyncTasks

func GetPropertySkusSyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query apis.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func GetSchedtagsDetailsToResource

func GetSchedtagsDetailsToResource(obj IModelWithSchedtag, ctx context.Context, extra *jsonutils.JSONDict) *jsonutils.JSONDict

func GetSchedtagsDetailsToResourceV2

func GetSchedtagsDetailsToResourceV2(obj IModelWithSchedtag, ctx context.Context) []api.SchedtagShortDescDetails

func GetServerSpecs

func GetServerSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func GetSpecIdentKey

func GetSpecIdentKey(keys []string) string

func Hypervisor2Brand

func Hypervisor2Brand(hypervisor string) string

func InitDB

func InitDB() error

func InitSyncWorkers

func InitSyncWorkers(count int)

func IsExitNetworkInfo

func IsExitNetworkInfo(userCred mcclient.TokenCredential, netConfig *api.NetworkConfig) bool

func IsNeedSkipSync

func IsNeedSkipSync(ext cloudprovider.ICloudResource) (bool, string)

func IsOneCloudVpcResource

func IsOneCloudVpcResource(res IVpcResource) bool

func IsProviderAccountEnabled

func IsProviderAccountEnabled(providerId string) bool

func ListExpiredPostpaidResources

func ListExpiredPostpaidResources(
	q *sqlchemy.SQuery, limit int) *sqlchemy.SQuery

func LoadbalancerListenerRuleCheckUniqueness

func LoadbalancerListenerRuleCheckUniqueness(ctx context.Context, lbls *SLoadbalancerListener, domain, path string) error

func NetworkUsableZoneIds

func NetworkUsableZoneIds(usableNet, usableVpc bool, query *api.ZoneListInput) ([]string, error)

func ParseBillingCycleInput

func ParseBillingCycleInput(billingBase *SBillingResourceBase, input apis.PostpaidExpireInput) (*billing.SBillingCycle, error)

func PerformActionSyncSkus

func PerformActionSyncSkus(ctx context.Context, userCred mcclient.TokenCredential, resourceKey string, input apis.SkuSyncInput) (jsonutils.JSONObject, error)

func RangeObjectsFilter

func RangeObjectsFilter(q *sqlchemy.SQuery, rangeObjs []db.IStandaloneModel, regionField sqlchemy.IQueryField, zoneField sqlchemy.IQueryField, managerField sqlchemy.IQueryField, hostField sqlchemy.IQueryField, storageField sqlchemy.IQueryField) *sqlchemy.SQuery

func RegisterGuestDriver

func RegisterGuestDriver(driver IGuestDriver)

func RegisterHostDriver

func RegisterHostDriver(driver IHostDriver)

func RegisterRegionDriver

func RegisterRegionDriver(driver IRegionDriver)

func RegisterStorageDriver

func RegisterStorageDriver(driver IStorageDriver)

func RunBatchCreateTask

func RunBatchCreateTask(
	ctx context.Context,
	items []db.IModel,
	userCred mcclient.TokenCredential,
	data jsonutils.JSONObject,
	pendingUsage SQuota,
	pendingRegionUsage SRegionQuota,
	taskName string,
	parentTaskId string,
) error

func RunSyncCloudAccountTask

func RunSyncCloudAccountTask(ctx context.Context, probeFunc func())

func RunSyncCloudproviderRegionTask

func RunSyncCloudproviderRegionTask(ctx context.Context, key string, syncFunc func())

func StartResourceSyncStatusTask

func StartResourceSyncStatusTask(ctx context.Context, userCred mcclient.TokenCredential, obj IStatusStandaloneBase, taskName string, parentTaskId string) error

func SyncAwsLoadbalancerBackendgroups

func SyncAwsLoadbalancerBackendgroups(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localRegion *SCloudregion, remoteRegion cloudprovider.ICloudRegion, syncRange *SSyncRange)

aws elb sync

func SyncCloudDomain

func SyncCloudDomain(userCred mcclient.TokenCredential, model db.IDomainLevelModel, syncOwnerId mcclient.IIdentityProvider)

func SyncCloudProject

func SyncCloudProject(userCred mcclient.TokenCredential, model db.IVirtualModel, syncOwnerId mcclient.IIdentityProvider, extModel cloudprovider.IVirtualResource, managerId string)

func SyncCloudaccountResources

func SyncCloudaccountResources(ctx context.Context, userCred mcclient.TokenCredential, account *SCloudaccount, syncRange *SSyncRange) error

func SyncCloudproviderResources

func SyncCloudproviderResources(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, syncRange *SSyncRange) error

func SyncDBInstanceSkus

func SyncDBInstanceSkus(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func SyncElasticCacheSkus

func SyncElasticCacheSkus(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

全量同步elasticcache sku列表.

func SyncElasticCacheSkusByRegion

func SyncElasticCacheSkusByRegion(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion) error

同步Region elasticcache sku列表.

func SyncHuaweiLoadbalancerBackendgroups

func SyncHuaweiLoadbalancerBackendgroups(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localLoadbalancer *SLoadbalancer, remoteLoadbalancer cloudprovider.ICloudLoadbalancer, syncRange *SSyncRange)

huawei elb sync

func SyncLoadbalancerBackendgroups

func SyncLoadbalancerBackendgroups(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localLoadbalancer *SLoadbalancer, remoteLoadbalancer cloudprovider.ICloudLoadbalancer, syncRange *SSyncRange)

func SyncNasSkus

func SyncNasSkus(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func SyncNatSkus

func SyncNatSkus(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func SyncOpenstackLoadbalancerBackendgroups

func SyncOpenstackLoadbalancerBackendgroups(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localLoadbalancer *SLoadbalancer, remoteLoadbalancer cloudprovider.ICloudLoadbalancer, syncRange *SSyncRange)

openstack elb sync

func SyncPublicCloudImages

func SyncPublicCloudImages(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func SyncQcloudLoadbalancerBackendgroups

func SyncQcloudLoadbalancerBackendgroups(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localLoadbalancer *SLoadbalancer, remoteLoadbalancer cloudprovider.ICloudLoadbalancer, syncRange *SSyncRange)

qcloud elb sync

func SyncRegionDBInstanceSkus

func SyncRegionDBInstanceSkus(ctx context.Context, userCred mcclient.TokenCredential, regionId string, isStart bool)

func SyncRegionNasSkus

func SyncRegionNasSkus(ctx context.Context, userCred mcclient.TokenCredential, regionId string, isStart bool) error

func SyncRegionNatSkus

func SyncRegionNatSkus(ctx context.Context, userCred mcclient.TokenCredential, regionId string, isStart bool) error

func SyncServerSkus

func SyncServerSkus(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

全量同步sku列表.

func SyncServerSkusByRegion

func SyncServerSkusByRegion(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, extSkuMeta *SSkuResourcesMeta) compare.SyncResult

同步指定region sku列表

func SyncWafGroups

func SyncWafGroups(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func ToDiskConfig

func ToDiskConfig(d *api.SImportDisk) *api.DiskConfig

func ToNetConfig

func ToNetConfig(n *api.SImportNic, net *SNetwork) *api.NetworkConfig

func TotalInstanceSnapshotCount

func TotalInstanceSnapshotCount(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, rangeObjs []db.IStandaloneModel, providers []string, brands []string, cloudEnv string, policyResult rbacutils.SPolicyResult) (int, error)

func TotalSnapshotCount

func TotalSnapshotCount(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, rangeObjs []db.IStandaloneModel, providers []string, brands []string, cloudEnv string, policyResult rbacutils.SPolicyResult) (int, error)

func ValidateAssociateEip

func ValidateAssociateEip(obj IEipAssociateInstance) error

func ValidateCpuData

func ValidateCpuData(vcpuCount int, driver IGuestDriver) (int, error)

func ValidateListenerRuleConditions

func ValidateListenerRuleConditions(condition string) error

func ValidateMemCpuData

func ValidateMemCpuData(vmemSize, vcpuCount int, hypervisor string) (int, int, error)

func ValidateMemData

func ValidateMemData(vmemSize int, driver IGuestDriver) (int, error)

func ValidateScheduleCreateData

func ValidateScheduleCreateData(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerCreateInput, hypervisor string) (*api.ServerCreateInput, error)

Types

type Attach2NetworkArgs

type Attach2NetworkArgs struct {
	Network *SNetwork

	IpAddr              string
	AllocDir            api.IPAllocationDirection
	TryReserved         bool
	RequireDesignatedIP bool
	UseDesignatedIP     bool

	BwLimit   int
	NicDriver string
	NumQueues int
	NicConfs  []SNicConfig

	Virtual bool

	PendingUsage quotas.IQuota
}

Summary of network address allocation strategy

IpAddr when specified must be part of the network

Use IpAddr without checking if it's already allocated when UseDesignatedIP is true. See b31bc7fa ("feature: 1. baremetal server reuse host ip...")

Try IpAddr from reserved pool when allowed by TryReserved. Otherwise fallback to usual allocation method (AllocDir). Error when RequireDesignatedIP is true and the allocated address does not match IpAddr

type DNSUpdateKeySecret

type DNSUpdateKeySecret struct {
	Key    string
	Secret string
}

type DiskInfo

type DiskInfo struct {
	ImageId    string
	Fs         string
	MountPoint string
	Format     string
	Size       int64
	Storage    string
	Backend    string
	MediumType string
	Driver     string
	Cache      string
	DiskType   string
}

type DnsIp

type DnsIp struct {
	Addr string
	Ttl  int
}

type EipUsage

type EipUsage struct {
	PublicIPCount     int
	PublicIpBandwidth int
	EIPCount          int
	EipBandwidth      int
	EIPUsedCount      int
}

func (EipUsage) Total

func (u EipUsage) Total() int

type GuestSshableTryData

type GuestSshableTryData struct {
	DryRun bool

	User       string
	Host       string
	Port       int
	PrivateKey string
	PublicKey  string

	MethodTried []compute_api.GuestSshableMethodData
}

func (*GuestSshableTryData) AddMethodTried

func (tryData *GuestSshableTryData) AddMethodTried(tryMethodData compute_api.GuestSshableMethodData)

type GuestnicsCount

type GuestnicsCount struct {
	InternalNicCount        int
	InternalVirtualNicCount int
	ExternalNicCount        int
	ExternalVirtualNicCount int
	InternalBandwidth       int
	ExternalBandwidth       int
}

type HostStat

type HostStat struct {
	MemSize                 int
	MemReserved             int
	MemCmtbound             float32
	CpuCount                int
	CpuReserved             int
	CpuCmtbound             float32
	StorageSize             int
	IsolatedReservedMemory  int64
	IsolatedReservedCpu     int64
	IsolatedReservedStorage int64
}

type HostsCountStat

type HostsCountStat struct {
	StorageSize             int64
	Count                   int64
	Memory                  int64
	MemoryTotal             int64
	MemoryVirtual           float64
	MemoryReserved          int64
	CPU                     int64
	CPUTotal                int64
	CPUVirtual              float64
	IsolatedReservedMemory  int64
	IsolatedReservedCpu     int64
	IsolatedReservedStorage int64
}

type IBillingModel

type IBillingModel interface {
	db.IModel
	GetExpiredAt() time.Time
}

type IBillingModelManager

type IBillingModelManager interface {
	db.IModelManager
	GetExpiredModels(advanceDay int) ([]IBillingModel, error)
}

type IDBInstanceDriver

type IDBInstanceDriver interface {
	ValidateCreateDBInstanceData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, input api.DBInstanceCreateInput, skus []SDBInstanceSku, network *SNetwork) (api.DBInstanceCreateInput, error)
	ValidateCreateDBInstanceAccountData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, instance *SDBInstance, input api.DBInstanceAccountCreateInput) (api.DBInstanceAccountCreateInput, error)
	ValidateCreateDBInstanceDatabaseData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, instance *SDBInstance, input api.DBInstanceDatabaseCreateInput) (api.DBInstanceDatabaseCreateInput, error)
	ValidateCreateDBInstanceBackupData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, instance *SDBInstance, input api.DBInstanceBackupCreateInput) (api.DBInstanceBackupCreateInput, error)
	ValidateDBInstanceAccountPrivilege(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, account string, privilege string) error
	ValidateResetDBInstancePassword(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, account string) error

	RequestCreateDBInstance(ctx context.Context, userCred mcclient.TokenCredential, dbinstance *SDBInstance, task taskman.ITask) error
	RequestCreateDBInstanceFromBackup(ctx context.Context, userCred mcclient.TokenCredential, dbinstance *SDBInstance, task taskman.ITask) error
	RequestCreateDBInstanceBackup(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, backup *SDBInstanceBackup, task taskman.ITask) error
	RequestChangeDBInstanceConfig(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, input *api.SDBInstanceChangeConfigInput, task taskman.ITask) error

	IsSupportedDBInstance() bool
	IsSupportedDBInstanceAutoRenew() bool
	IsSupportDBInstancePublicConnection() bool
	IsSupportKeepDBInstanceManualBackup() bool

	InitDBInstanceUser(ctx context.Context, dbinstance *SDBInstance, task taskman.ITask, desc *cloudprovider.SManagedDBInstanceCreateConfig) error
	GetRdsSupportSecgroupCount() int

	ValidateDBInstanceRecovery(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, backup *SDBInstanceBackup, input api.SDBInstanceRecoveryConfigInput) error

	RequestRemoteUpdateDBInstance(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, replaceTags bool, task taskman.ITask) error
	RequestSyncRdsSecurityGroups(ctx context.Context, userCred mcclient.TokenCredential, rds *SDBInstance, task taskman.ITask) error

	INatGatewayDriver

	IElasticIpDriver
	INasDriver

	IWafDriver
}

type IDynamicResource

type IDynamicResource interface {
	db.IModel
	GetDynamicConditionInput() *jsonutils.JSONDict
}

func FetchDynamicResourceObject

func FetchDynamicResourceObject(man IDynamicResourceManager, userCred mcclient.TokenCredential, idOrName string) (IDynamicResource, error)

type IDynamicResourceManager

type IDynamicResourceManager interface {
	db.IModelManager
}

type IEipAssociateInstance

type IEipAssociateInstance interface {
	db.IStatusStandaloneModel
	GetVpc() (*SVpc, error)
}

type IElasticIpDriver

type IElasticIpDriver interface {
	RequestAssociatEip(ctx context.Context, userCred mcclient.TokenCredential, eip *SElasticip, input api.ElasticipAssociateInput, obj db.IStatusStandaloneModel, task taskman.ITask) error
}

type IElasticcacheAccount

type IElasticcacheAccount interface {
	RequestElasticcacheAccountResetPassword(ctx context.Context, userCred mcclient.TokenCredential, ea *SElasticcacheAccount, task taskman.ITask) error
}

type IElasticcacheAcl

type IElasticcacheAcl interface {
	RequestElasticcacheAclUpdate(ctx context.Context, userCred mcclient.TokenCredential, ea *SElasticcacheAcl, task taskman.ITask) error
}

type IElasticcacheBackup

type IElasticcacheBackup interface {
	RequestElasticcacheBackupRestoreInstance(ctx context.Context, userCred mcclient.TokenCredential, ea *SElasticcacheBackup, task taskman.ITask) error
}

type IElasticcacheDriver

type IElasticcacheDriver interface {
	IsSupportedElasticcache() bool
	// capability
	IsSupportedElasticcacheSecgroup() bool
	IsSupportedElasticcacheAutoRenew() bool
	GetMaxElasticcacheSecurityGroupCount() int

	AllowCreateElasticcacheBackup(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, elasticcache *SElasticcache) error
	AllowUpdateElasticcacheAuthMode(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, elasticcache *SElasticcache) error
	ValidateCreateElasticcacheData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, input api.ElasticcacheCreateInput) (*jsonutils.JSONDict, error)
	ValidateCreateElasticcacheAccountData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	ValidateCreateElasticcacheAclData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	ValidateCreateElasticcacheBackupData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	RequestCreateElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask, data *jsonutils.JSONDict) error
	RequestCreateElasticcacheAccount(ctx context.Context, userCred mcclient.TokenCredential, elasticcacheAccount *SElasticcacheAccount, task taskman.ITask) error
	RequestCreateElasticcacheAcl(ctx context.Context, userCred mcclient.TokenCredential, elasticcacheAcl *SElasticcacheAcl, task taskman.ITask) error
	RequestCreateElasticcacheBackup(ctx context.Context, userCred mcclient.TokenCredential, elasticcacheBackup *SElasticcacheBackup, task taskman.ITask) error
	RequestRenewElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, bc billing.SBillingCycle) (time.Time, error)
	RequestElasticcacheSetAutoRenew(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, autoRenew bool, task taskman.ITask) error
	RequestRestartElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestSyncElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestSyncSecgroupsForElasticcache(ctx context.Context, userCred mcclient.TokenCredential, ec *SElasticcache, task taskman.ITask) error
	RequestDeleteElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestDeleteElasticcacheAccount(ctx context.Context, userCred mcclient.TokenCredential, ea *SElasticcacheAccount, task taskman.ITask) error
	RequestDeleteElasticcacheAcl(ctx context.Context, userCred mcclient.TokenCredential, ea *SElasticcacheAcl, task taskman.ITask) error
	RequestDeleteElasticcacheBackup(ctx context.Context, userCred mcclient.TokenCredential, eb *SElasticcacheBackup, task taskman.ITask) error
	RequestSetElasticcacheMaintainTime(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheChangeSpec(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestUpdateElasticcacheAuthMode(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestUpdateElasticcacheSecgroups(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheSetMaintainTime(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheAllocatePublicConnection(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheReleasePublicConnection(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheFlushInstance(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheUpdateInstanceParameters(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error
	RequestElasticcacheUpdateBackupPolicy(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error

	RequestSyncElasticcacheStatus(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, task taskman.ITask) error

	RequestRemoteUpdateElasticcache(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, replaceTags bool, task taskman.ITask) error
}

type IGuestDriver

type IGuestDriver interface {
	IGuestScheduleDriver

	GetHypervisor() string
	GetProvider() string
	GetComputeQuotaKeys(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, brand string) SComputeResourceKeys

	GetMaxVCpuCount() int
	GetMaxVMemSizeGB() int
	GetMaxSecurityGroupCount() int

	GetDefaultSysDiskBackend() string
	GetMinimalSysDiskSizeGb() int

	IsSupportedBillingCycle(bc billing.SBillingCycle) bool
	IsSupportPostpaidExpire() bool

	RequestRenewInstance(ctx context.Context, guest *SGuest, bc billing.SBillingCycle) (time.Time, error)

	GetJsonDescAtHost(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, host *SHost, params *jsonutils.JSONDict) (jsonutils.JSONObject, error)

	ValidateImage(ctx context.Context, image *cloudprovider.SImage) error
	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, data *api.ServerCreateInput) (*api.ServerCreateInput, error)

	ValidateCreateDataOnHost(ctx context.Context, userCred mcclient.TokenCredential, bmName string, host *SHost, input *api.ServerCreateInput) (*api.ServerCreateInput, error)

	PrepareDiskRaidConfig(userCred mcclient.TokenCredential, host *SHost, params []*api.BaremetalDiskConfig, disks []*api.DiskConfig) ([]*api.DiskConfig, error)

	GetNamedNetworkConfiguration(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, host *SHost, netConfig *api.NetworkConfig) (*SNetwork, []SNicConfig, api.IPAllocationDirection, bool, error)

	Attach2RandomNetwork(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, host *SHost, netConfig *api.NetworkConfig, pendingUsage quotas.IQuota) ([]SGuestnetwork, error)
	GetRandomNetworkTypes() []string

	GetStorageTypes() []string
	ChooseHostStorage(host *SHost, guest *SGuest, diskConfig *api.DiskConfig, storageIds []string) (*SStorage, error)

	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

	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
	RemoteDeployGuestForCreate(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, host *SHost, desc cloudprovider.SManagedVMCreateConfig) (jsonutils.JSONObject, error)
	RemoteDeployGuestSyncHost(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, host *SHost, iVM cloudprovider.ICloudVM) (cloudprovider.ICloudHost, error)
	RemoteActionAfterGuestCreated(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, host *SHost, iVM cloudprovider.ICloudVM, desc *cloudprovider.SManagedVMCreateConfig)
	RemoteDeployGuestForDeploy(ctx context.Context, guest *SGuest, ihost cloudprovider.ICloudHost, task taskman.ITask, desc cloudprovider.SManagedVMCreateConfig) (jsonutils.JSONObject, error)
	RemoteDeployGuestForRebuildRoot(ctx context.Context, guest *SGuest, ihost cloudprovider.ICloudHost, task taskman.ITask, desc cloudprovider.SManagedVMCreateConfig) (jsonutils.JSONObject, error)
	GetGuestInitialStateAfterCreate() string
	GetGuestInitialStateAfterRebuild() string
	GetDefaultAccount(desc cloudprovider.SManagedVMCreateConfig) string
	GetInstanceCapability() cloudprovider.SInstanceCapability

	OnGuestDeployTaskDataReceived(ctx context.Context, guest *SGuest, task taskman.ITask, data jsonutils.JSONObject) 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
	RequestSyncSecgroupsOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error

	RequestSyncstatusOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential, task taskman.ITask) error

	RequestStartOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential, task taskman.ITask) error

	RequestStopOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask, syncStatus bool) 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

	StartGuestSaveGuestImage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error
	RequestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, task taskman.ITask) error

	RequestStopGuestForDelete(ctx context.Context, guest *SGuest, host *SHost, 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, format string, storageId string, task taskman.ITask) error

	GetGuestVncInfo(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, host *SHost, input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)

	RequestAttachDisk(ctx context.Context, guest *SGuest, disk *SDisk, task taskman.ITask) error
	RequestDetachDisk(ctx context.Context, guest *SGuest, disk *SDisk, task taskman.ITask) error
	GetDetachDiskStatus() ([]string, error)
	GetAttachDiskStatus() ([]string, error)
	GetRebuildRootStatus() ([]string, error)
	GetChangeConfigStatus(guest *SGuest) ([]string, error)
	GetDeployStatus() ([]string, error)
	ValidateResizeDisk(guest *SGuest, disk *SDisk, storage *SStorage) error
	CanKeepDetachDisk() bool
	IsNeedRestartForResetLoginInfo() bool
	IsRebuildRootSupportChangeImage() bool
	IsRebuildRootSupportChangeUEFI() bool

	ValidateRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, input *api.ServerRebuildRootInput) (*api.ServerRebuildRootInput, error)
	ValidateDetachNetwork(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

	IsSupportdDcryptPasswordFromSecretKey() 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
	RequestSuspendOnHost(ctx context.Context, guest *SGuest, task taskman.ITask) error

	StartResumeTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error
	RequestResumeOnHost(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, instanceType string, vcpuCount, vmemSize int64) error

	NeedRequestGuestHotAddIso(ctx context.Context, guest *SGuest) bool
	RequestGuestHotAddIso(ctx context.Context, guest *SGuest, path string, boot bool, task taskman.ITask) error
	RequestGuestHotRemoveIso(ctx context.Context, guest *SGuest, task taskman.ITask) error
	RequestRebuildRootDisk(ctx context.Context, guest *SGuest, task taskman.ITask) 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
	RequestSyncToBackup(ctx context.Context, guest *SGuest, task taskman.ITask) error

	IsSupportEip() bool
	IsSupportPublicIp() bool
	ValidateCreateEip(ctx context.Context, userCred mcclient.TokenCredential, input api.ServerCreateEipInput) error

	NeedStopForChangeSpec(ctx context.Context, guest *SGuest, cpuChanged, memChanged bool) bool

	OnGuestChangeCpuMemFailed(ctx context.Context, guest *SGuest, data *jsonutils.JSONDict, task taskman.ITask) error
	IsSupportGuestClone() bool

	ValidateChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, cpuChanged bool, memChanged bool, newDisks []*api.DiskConfig) error
	ValidateDetachDisk(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, disk *SDisk) error

	IsNeedInjectPasswordByCloudInit() bool
	GetUserDataType() string
	GetWindowsUserDataType() string
	IsWindowsUserDataTypeNeedEncode() bool
	CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

	IsSupportCdrom(guest *SGuest) (bool, error)
	IsSupportPublicipToEip() bool
	RequestConvertPublicipToEip(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, task taskman.ITask) error

	IsSupportSetAutoRenew() bool
	RequestSetAutoRenewInstance(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, input api.GuestAutoRenewInput, task taskman.ITask) error
	IsSupportMigrate() bool
	IsSupportLiveMigrate() bool
	CheckMigrate(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, input api.GuestMigrateInput) error
	CheckLiveMigrate(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, input api.GuestLiveMigrateInput) error
	RequestMigrate(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, task taskman.ITask) error
	RequestLiveMigrate(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, task taskman.ITask) error

	ValidateUpdateData(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, input api.ServerUpdateInput) (api.ServerUpdateInput, error)
	RequestRemoteUpdate(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, replaceTags bool) error

	RequestOpenForward(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, req *guestdriver_types.OpenForwardRequest) (*guestdriver_types.OpenForwardResponse, error)
	RequestListForward(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, req *guestdriver_types.ListForwardRequest) (*guestdriver_types.ListForwardResponse, error)
	RequestCloseForward(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, req *guestdriver_types.CloseForwardRequest) (*guestdriver_types.CloseForwardResponse, error)

	ValidateChangeDiskStorage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, input *api.ServerChangeDiskStorageInput) error
	StartChangeDiskStorageTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, params *api.ServerChangeDiskStorageInternalInput, parentTaskId string) error
	RequestChangeDiskStorage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, input *api.ServerChangeDiskStorageInternalInput, task taskman.ITask) error
	RequestSwitchToTargetStorageDisk(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, input *api.ServerChangeDiskStorageInternalInput, task taskman.ITask) error

	RequestSyncIsolatedDevice(ctx context.Context, guest *SGuest, task taskman.ITask) error

	RequestCPUSet(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, guest *SGuest, input *api.ServerCPUSetInput) (*api.ServerCPUSetResp, error)
	RequestCPUSetRemove(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, guest *SGuest, input *api.ServerCPUSetRemoveInput) error

	QgaRequestGuestPing(ctx context.Context, task taskman.ITask, host *SHost, guest *SGuest) error
	QgaRequestSetUserPassword(ctx context.Context, task taskman.ITask, host *SHost, guest *SGuest, input *api.ServerQgaSetPasswordInput) error
	RequestQgaCommand(ctx context.Context, userCred mcclient.TokenCredential, body jsonutils.JSONObject, host *SHost, guest *SGuest) (jsonutils.JSONObject, error)

	FetchMonitorUrl(ctx context.Context, guest *SGuest) string
}

func GetDriver

func GetDriver(hypervisor string) IGuestDriver

type IGuestScheduleDriver

type IGuestScheduleDriver interface {
	DoScheduleSKUFilter() bool
	DoScheduleCPUFilter() bool
	DoScheduleMemoryFilter() bool
	DoScheduleStorageFilter() bool
	DoScheduleCloudproviderTagFilter() bool
}

type IHostDriver

type IHostDriver interface {
	GetHostType() string
	GetHypervisor() string

	CheckAndSetCacheImage(ctx context.Context, host *SHost, storagecache *SStoragecache, task taskman.ITask) error
	RequestUncacheImage(ctx context.Context, host *SHost, storageCache *SStoragecache, task taskman.ITask) error

	ValidateUpdateDisk(ctx context.Context, userCred mcclient.TokenCredential, input api.DiskUpdateInput) (api.DiskUpdateInput, error)
	ValidateResetDisk(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, snapshot *SSnapshot, guests []SGuest, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	ValidateDiskSize(storage *SStorage, sizeGb int) 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, userCred mcclient.TokenCredential, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask, input api.DiskAllocateInput) error
	RequestRebuildDiskOnStorage(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask, input api.DiskAllocateInput) error

	RequestDeallocateDiskOnHost(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask) error
	RequestDeallocateBackupDiskOnHost(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask) error

	RequestResizeDiskOnHost(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, size int64, task taskman.ITask) error

	RequestDeleteSnapshotsWithStorage(ctx context.Context, host *SHost, snapshot *SSnapshot, task taskman.ITask) error
	RequestResetDisk(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error
	RequestCleanUpDiskSnapshots(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error
	PrepareConvert(host *SHost, image, raid string, data jsonutils.JSONObject) (*api.ServerCreateInput, error)
	PrepareUnconvert(host *SHost) error
	FinishUnconvert(ctx context.Context, userCred mcclient.TokenCredential, host *SHost) error
	FinishConvert(userCred mcclient.TokenCredential, host *SHost, guest *SGuest, hostType string) error
	ConvertFailed(host *SHost) error
	GetRaidScheme(host *SHost, raid string) (string, error)

	IsReachStoragecacheCapacityLimit(host *SHost, cachedImages []SCachedimage) bool
	GetStoragecacheQuota(host *SHost) int

	ValidateAttachStorage(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, storage *SStorage, input api.HostStorageCreateInput) (api.HostStorageCreateInput, error)
	RequestAttachStorage(ctx context.Context, hoststorage *SHoststorage, host *SHost, storage *SStorage, task taskman.ITask) error
	RequestDetachStorage(ctx context.Context, host *SHost, storage *SStorage, task taskman.ITask) error
	RequestSyncOnHost(ctx context.Context, host *SHost, task taskman.ITask) error
	RequestProbeIsolatedDevices(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, input jsonutils.JSONObject) (*jsonutils.JSONArray, error)
}

func GetHostDriver

func GetHostDriver(hostType string) IHostDriver

type ILoadbalancerSubResourceManager

type ILoadbalancerSubResourceManager interface {
	db.IModelManager
	// contains filtered or unexported methods
}

type IMacGenerator

type IMacGenerator interface {
	FilterByMac(mac string) *sqlchemy.SQuery
}

type IMetadataSetter

type IMetadataSetter interface {
	SetCloudMetadataAll(ctx context.Context, meta map[string]interface{}, userCred mcclient.TokenCredential) error
	SetSysCloudMetadataAll(ctx context.Context, meta map[string]interface{}, userCred mcclient.TokenCredential) error
	Keyword() string
	GetName() string
	GetCloudproviderId() string
}

type IModelWithSchedtag

type IModelWithSchedtag interface {
	db.IModel
	GetSchedtagJointManager() ISchedtagJointManager
	ClearSchedDescCache() error
}

type INasDriver

type INasDriver interface {
	RequestSyncAccessGroup(ctx context.Context, userCred mcclient.TokenCredential, fs *SFileSystem, mt *SMountTarget, ag *SAccessGroup, task taskman.ITask) error
	IsSupportedNas() bool
}

type INatGatewayDriver

type INatGatewayDriver interface {
	IsSupportedNatGateway() bool
	IsSupportedNatAutoRenew() bool
	RequestAssociateEipForNAT(ctx context.Context, userCred mcclient.TokenCredential, nat *SNatGateway, eip *SElasticip, task taskman.ITask) error
	ValidateCreateNatGateway(ctx context.Context, userCred mcclient.TokenCredential, input api.NatgatewayCreateInput) (api.NatgatewayCreateInput, error)
	OnNatEntryDeleteComplete(ctx context.Context, userCred mcclient.TokenCredential, eip *SElasticip) error
}

NAT

type IPurgeableManager

type IPurgeableManager interface {
	Keyword() string
	// contains filtered or unexported methods
}

type IRegionDriver

type IRegionDriver interface {
	GetProvider() string

	IElasticcacheDriver
	IElasticcacheAccount
	IElasticcacheAcl
	IElasticcacheBackup
	IDBInstanceDriver

	ValidateCreateLoadbalancerData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	ValidateDeleteLoadbalancerCondition(ctx context.Context, lb *SLoadbalancer) error
	RequestCreateLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, task taskman.ITask) error
	RequestDeleteLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, task taskman.ITask) error
	RequestStartLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, task taskman.ITask) error
	RequestStopLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, task taskman.ITask) error
	RequestSyncstatusLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, task taskman.ITask) error
	RequestRemoteUpdateLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, replaceTags bool, task taskman.ITask) error

	ValidateCreateLoadbalancerAclData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerAcl(ctx context.Context, userCred mcclient.TokenCredential, lbacl *SCachedLoadbalancerAcl, task taskman.ITask) error
	RequestDeleteLoadbalancerAcl(ctx context.Context, userCred mcclient.TokenCredential, lbacl *SCachedLoadbalancerAcl, task taskman.ITask) error
	RequestSyncLoadbalancerAcl(ctx context.Context, userCred mcclient.TokenCredential, lbacl *SCachedLoadbalancerAcl, task taskman.ITask) error

	IsCertificateBelongToRegion() bool
	ValidateCreateLoadbalancerCertificateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	ValidateUpdateLoadbalancerCertificateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerCertificate(ctx context.Context, userCred mcclient.TokenCredential, lbcert *SCachedLoadbalancerCertificate, task taskman.ITask) error
	RequestDeleteLoadbalancerCertificate(ctx context.Context, userCred mcclient.TokenCredential, lbcert *SCachedLoadbalancerCertificate, task taskman.ITask) error

	ValidateCreateLoadbalancerBackendGroupData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, lb *SLoadbalancer, backends []cloudprovider.SLoadbalancerBackend) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerBackendGroup(ctx context.Context, userCred mcclient.TokenCredential, lbbg *SLoadbalancerBackendGroup, backends []cloudprovider.SLoadbalancerBackend, task taskman.ITask) error
	RequestDeleteLoadbalancerBackendGroup(ctx context.Context, userCred mcclient.TokenCredential, lbbg *SLoadbalancerBackendGroup, task taskman.ITask) error
	ValidateDeleteLoadbalancerBackendGroupCondition(ctx context.Context, lbbb *SLoadbalancerBackendGroup) error
	RequestSyncLoadbalancerBackendGroup(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestPullRegionLoadbalancerBackendGroup(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localRegion *SCloudregion, remoteRegion cloudprovider.ICloudRegion, syncRange *SSyncRange) error
	RequestPullLoadbalancerBackendGroup(ctx context.Context, userCred mcclient.TokenCredential, syncResults SSyncResultSet, provider *SCloudprovider, localLoadbalancer *SLoadbalancer, remoteLoadbalancer cloudprovider.ICloudLoadbalancer, syncRange *SSyncRange) error
	GetBackendStatusForAdd() []string

	ValidateCreateLoadbalancerBackendData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, backendType string, lb *SLoadbalancer, backendGroup *SLoadbalancerBackendGroup, backend db.IModel) (*jsonutils.JSONDict, error)
	ValidateUpdateLoadbalancerBackendData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, lbbg *SLoadbalancerBackendGroup) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, task taskman.ITask) error
	RequestDeleteLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, task taskman.ITask) error
	RequestSyncLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, task taskman.ITask) error

	ValidateCreateLoadbalancerListenerData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict, lb *SLoadbalancer, backendGroup db.IModel) (*jsonutils.JSONDict, error)
	ValidateUpdateLoadbalancerListenerData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, lblist *SLoadbalancerListener, backendGroup db.IModel) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestDeleteLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestStartLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestStopLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestSyncstatusLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error
	RequestSyncLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lblis *SLoadbalancerListener, task taskman.ITask) error

	IsSupportLoadbalancerListenerRuleRedirect() bool
	ValidateCreateLoadbalancerListenerRuleData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict, backendGroup db.IModel) (*jsonutils.JSONDict, error)
	ValidateUpdateLoadbalancerListenerRuleData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, backendGroup db.IModel) (*jsonutils.JSONDict, error)
	RequestCreateLoadbalancerListenerRule(ctx context.Context, userCred mcclient.TokenCredential, lbr *SLoadbalancerListenerRule, task taskman.ITask) error
	RequestDeleteLoadbalancerListenerRule(ctx context.Context, userCred mcclient.TokenCredential, lbr *SLoadbalancerListenerRule, task taskman.ITask) error

	ValidateCreateVpcData(ctx context.Context, userCred mcclient.TokenCredential, input api.VpcCreateInput) (api.VpcCreateInput, error)
	IsVpcCreateNeedInputCidr() bool
	GetEipDefaultChargeType() string
	ValidateEipChargeType(chargeType string) error
	ValidateCreateEipData(ctx context.Context, userCred mcclient.TokenCredential, input *api.SElasticipCreateInput) error
	RequestCreateVpc(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, vpc *SVpc, task taskman.ITask) error
	RequestDeleteVpc(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, vpc *SVpc, task taskman.ITask) error

	// Region Driver Snapshot Policy Apis
	//ValidateCreateSnapshotPolicyData(context.Context, mcclient.TokenCredential, *compute.SSnapshotPolicyCreateInput, mcclient.IIdentityProvider, *jsonutils.JSONDict) error
	RequestUpdateSnapshotPolicy(ctx context.Context, userCred mcclient.TokenCredential, sp *SSnapshotPolicy, input cloudprovider.SnapshotPolicyInput, task taskman.ITask) error
	RequestApplySnapshotPolicy(ctx context.Context, userCred mcclient.TokenCredential, task taskman.ITask, disk *SDisk, sp *SSnapshotPolicy, data jsonutils.JSONObject) error
	RequestCancelSnapshotPolicy(ctx context.Context, userCred mcclient.TokenCredential, task taskman.ITask, disk *SDisk, sp *SSnapshotPolicy, data jsonutils.JSONObject) error
	RequestPreSnapshotPolicyApply(ctx context.Context, userCred mcclient.TokenCredential, task taskman.ITask, disk *SDisk, sp *SSnapshotPolicy, data jsonutils.JSONObject) error

	// Region Driver Snapshot Policy joint Disk Apis
	ValidateCreateSnapshopolicyDiskData(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, snapshotPolicy *SSnapshotPolicy) error

	// Region Driver Snapshot Apis
	ValidateSnapshotDelete(ctx context.Context, snapshot *SSnapshot) error
	ValidateCreateSnapshotData(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, storage *SStorage, input *api.SnapshotCreateInput) error
	RequestCreateSnapshot(ctx context.Context, snapshot *SSnapshot, task taskman.ITask) error
	RequestDeleteSnapshot(ctx context.Context, snapshot *SSnapshot, task taskman.ITask) error
	SnapshotIsOutOfChain(disk *SDisk) bool
	GetDiskResetParams(snapshot *SSnapshot) *jsonutils.JSONDict
	OnDiskReset(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, snapshot *SSnapshot, data jsonutils.JSONObject) error
	OnSnapshotDelete(ctx context.Context, snapshot *SSnapshot, task taskman.ITask, data jsonutils.JSONObject) error

	RequestSyncDiskBackupStatus(ctx context.Context, userCred mcclient.TokenCredential, backup *SDiskBackup, task taskman.ITask) error
	RequestCreateBackup(ctx context.Context, backup *SDiskBackup, snapshotId string, task taskman.ITask) error
	RequestDeleteBackup(ctx context.Context, backup *SDiskBackup, task taskman.ITask) error
	RequestCreateInstanceBackup(ctx context.Context, guest *SGuest, ib *SInstanceBackup, task taskman.ITask, params *jsonutils.JSONDict) error
	RequestDeleteInstanceBackup(ctx context.Context, ib *SInstanceBackup, task taskman.ITask) error
	RequestSyncInstanceBackupStatus(ctx context.Context, userCred mcclient.TokenCredential, ib *SInstanceBackup, task taskman.ITask) error
	RequestSyncBackupStorageStatus(ctx context.Context, userCred mcclient.TokenCredential, bs *SBackupStorage, task taskman.ITask) error

	RequestCreateInstanceSnapshot(ctx context.Context, guest *SGuest, isp *SInstanceSnapshot, task taskman.ITask, params *jsonutils.JSONDict) error
	RequestDeleteInstanceSnapshot(ctx context.Context, isp *SInstanceSnapshot, task taskman.ITask) error
	RequestResetToInstanceSnapshot(ctx context.Context, guest *SGuest, isp *SInstanceSnapshot, task taskman.ITask, params *jsonutils.JSONDict) error
	RequestPackInstanceBackup(ctx context.Context, ib *SInstanceBackup, task taskman.ITask, packageName string) error
	RequestUnpackInstanceBackup(ctx context.Context, ib *SInstanceBackup, task taskman.ITask, packageName string, metadataOnly bool) error

	RequestCacheSecurityGroup(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, vpc *SVpc, secgroup *SSecurityGroup, classic bool, removeProjectId string, task taskman.ITask) error
	RequestSyncSecurityGroup(ctx context.Context, userCred mcclient.TokenCredential, vpcId string, vpc *SVpc, secgroup *SSecurityGroup, removeProjectId, service string, skipSyncRule bool) (string, error)
	GetDefaultSecurityGroupInRule() cloudprovider.SecurityRule
	GenerateSecurityGroupName(name string) string
	IsAllowSecurityGroupNameRepeat() bool
	GetDefaultSecurityGroupOutRule() cloudprovider.SecurityRule
	GetSecurityGroupRuleMaxPriority() int
	GetSecurityGroupRuleMinPriority() int
	IsOnlySupportAllowRules() bool
	IsPeerSecgroupWithSameProject() bool
	IsSupportPeerSecgroup() bool
	IsSupportClassicSecurityGroup() bool
	IsSecurityGroupBelongVpc() bool
	IsVpcBelongGlobalVpc() bool
	IsSecurityGroupBelongGlobalVpc() bool //安全组子账号范围内可用
	GetDefaultSecurityGroupVpcId() string
	GetSecurityGroupVpcId(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, host *SHost, vpc *SVpc, classic bool) (string, error)
	GetSecurityGroupPublicScope(service string) rbacutils.TRbacScope

	IsSupportedBillingCycle(bc billing.SBillingCycle, resource string) bool
	GetSecgroupVpcid(vpcId string) string

	RequestSyncDiskStatus(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, task taskman.ITask) error
	RequestSyncSnapshotStatus(ctx context.Context, userCred mcclient.TokenCredential, snapshot *SSnapshot, task taskman.ITask) error
	RequestSyncNatGatewayStatus(ctx context.Context, userCred mcclient.TokenCredential, natgateway *SNatGateway, task taskman.ITask) error
	RequestSyncBucketStatus(ctx context.Context, userCred mcclient.TokenCredential, bucket *SBucket, task taskman.ITask) error
	RequestSyncDBInstanceBackupStatus(ctx context.Context, userCred mcclient.TokenCredential, backup *SDBInstanceBackup, task taskman.ITask) error

	RequestCreateNetwork(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork) error

	ValidateCreateCdnData(ctx context.Context, userCred mcclient.TokenCredential, input api.CDNDomainCreateInput) (api.CDNDomainCreateInput, error)
}

func GetRegionDriver

func GetRegionDriver(provider string) IRegionDriver

type IScalingAction

type IScalingAction interface {
	Exec(int) int
	CheckCoolTime() bool
}

type IScalingTrigger

type IScalingTrigger interface {
	IScalingTriggerDesc

	// ValidateCreateData check and verify the input when creating SScalingPolicy
	ValidateCreateData(input api.ScalingPolicyCreateInput) (api.ScalingPolicyCreateInput, error)

	// Register
	Register(ctx context.Context, userCred mcclient.TokenCredential) error
	UnRegister(ctx context.Context, userCred mcclient.TokenCredential) error
	TriggerId() string
	IsTrigger() bool
}

type IScalingTriggerDesc

type IScalingTriggerDesc interface {
	TriggerDescription() string
}

type ISchedtagJointManager

type ISchedtagJointManager interface {
	db.IJointModelManager
	GetResourceIdKey(db.IJointModelManager) string
}

type ISchedtagJointModel

type ISchedtagJointModel interface {
	db.IJointModel
	GetSchedtagId() string
	GetResourceId() string
	GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}
}

func GetResourceJointSchedtags

func GetResourceJointSchedtags(obj IModelWithSchedtag) ([]ISchedtagJointModel, error)

func InsertJointResourceSchedtag

func InsertJointResourceSchedtag(ctx context.Context, jointMan ISchedtagJointManager, resourceId, schedtagId string) (ISchedtagJointModel, error)

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
	GetSpecShouldCheckStatus(query *jsonutils.JSONDict) (bool, error)
	GetSpecIdent(spec *jsonutils.JSONDict) []string
}

type IStatusBase

type IStatusBase interface {
	SetStatus(userCred mcclient.TokenCredential, status string, reason string) error
	GetStatus() string
}

type IStatusStandaloneBase

type IStatusStandaloneBase interface {
	db.IStandaloneModel
	IStatusBase
}

type IStorageDriver

type IStorageDriver interface {
	GetStorageType() string

	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, input *api.StorageCreateInput) error
	ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, input api.StorageUpdateInput) (api.StorageUpdateInput, error)

	DoStorageUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, task taskman.ITask) error

	PostCreate(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, data jsonutils.JSONObject)

	ValidateSnapshotDelete(ctx context.Context, snapshot *SSnapshot) error
	ValidateCreateSnapshotData(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, input *api.SnapshotCreateInput) error
	RequestCreateSnapshot(ctx context.Context, snapshot *SSnapshot, task taskman.ITask) error
	RequestDeleteSnapshot(ctx context.Context, snapshot *SSnapshot, task taskman.ITask) error
	SnapshotIsOutOfChain(disk *SDisk) bool
	OnDiskReset(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk, snapshot *SSnapshot, data jsonutils.JSONObject) error
}

func GetStorageDriver

func GetStorageDriver(storageType string) IStorageDriver

type IVirtualResourceMetadataSetter

type IVirtualResourceMetadataSetter interface {
	IMetadataSetter
	SetSystemInfo(isSystem bool) error
}

type IVpcResource

type IVpcResource interface {
	GetVpc() (*SVpc, error)
	GetRegion() (*SCloudregion, error)
}

type IWafDriver

type IWafDriver interface {
	ValidateCreateWafInstanceData(ctx context.Context, userCred mcclient.TokenCredential, input api.WafInstanceCreateInput) (api.WafInstanceCreateInput, error)
	ValidateCreateWafRuleData(ctx context.Context, userCred mcclient.TokenCredential, waf *SWafInstance, input api.WafRuleCreateInput) (api.WafRuleCreateInput, error)
}

type IsolatedDeviceCountStat

type IsolatedDeviceCountStat struct {
	Devices int
	Gpus    int
}

type NetworkPortStat

type NetworkPortStat struct {
	Count    int
	CountExt int
}

type NewEipForVMOnHostArgs

type NewEipForVMOnHostArgs struct {
	Bandwidth     int
	BgpType       string
	ChargeType    string
	AutoDellocate bool

	Group        *SGroup
	Guest        *SGuest
	Host         *SHost
	Natgateway   *SNatGateway
	PendingUsage quotas.IQuota
}

type SAccessGroup

type SAccessGroup struct {
	db.SStatusInfrasResourceBase

	IsDirty bool `nullable:"false" default:"false"`
}

func (*SAccessGroup) CustomizeDelete

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

func (*SAccessGroup) Delete

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

func (*SAccessGroup) DoSync

func (self *SAccessGroup) DoSync(ctx context.Context, userCred mcclient.TokenCredential)

func (*SAccessGroup) GetAccessGroupCaches

func (self *SAccessGroup) GetAccessGroupCaches() ([]SAccessGroupCache, error)

func (*SAccessGroup) GetAccessGroupRuleInfo

func (self *SAccessGroup) GetAccessGroupRuleInfo() (cloudprovider.AccessGroupRuleInfo, error)

func (*SAccessGroup) GetAccessGroupRules

func (self *SAccessGroup) GetAccessGroupRules() ([]SAccessGroupRule, error)

func (*SAccessGroup) GetChangeOwnerCandidateDomainIds

func (self *SAccessGroup) GetChangeOwnerCandidateDomainIds() []string

func (*SAccessGroup) GetEmptyAccessGroupRuleInfo

func (self *SAccessGroup) GetEmptyAccessGroupRuleInfo() cloudprovider.AccessGroupRuleInfo

func (*SAccessGroup) GetMountTargets

func (self *SAccessGroup) GetMountTargets() ([]SMountTarget, error)

func (*SAccessGroup) PerformSyncstatus

同步权限组状态

func (*SAccessGroup) RealDelete

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

func (*SAccessGroup) StartDeleteTask

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

func (*SAccessGroup) StartSyncRulesTask

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

func (*SAccessGroup) StartSyncstatus

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

func (*SAccessGroup) SyncRules

func (*SAccessGroup) ValidateDeleteCondition

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

type SAccessGroupCache

type SAccessGroupCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	SAccessGroupResourceBase

	// 已关联的挂载点数量
	MountTargetCount int `nullable:"false" list:"user" json:"mount_target_count"`

	FileSystemType string `width:"16" charset:"ascii" nullable:"false" index:"true" list:"user"`
	NetworkType    string `width:"8" charset:"ascii" nullable:"false" index:"true" list:"user" default:"vpc"`
}

func (*SAccessGroupCache) CreateIAccessGroup

func (self *SAccessGroupCache) CreateIAccessGroup(ctx context.Context) error

func (*SAccessGroupCache) CustomizeDelete

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

func (*SAccessGroupCache) Delete

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

func (*SAccessGroupCache) GetICloudAccessGroup

func (self *SAccessGroupCache) GetICloudAccessGroup(ctx context.Context) (cloudprovider.ICloudAccessGroup, error)

func (*SAccessGroupCache) GetIRegion

func (*SAccessGroupCache) GetOwnerId

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

func (*SAccessGroupCache) PerformSyncstatus

同步权限组缓存状态

func (*SAccessGroupCache) RealDelete

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

func (*SAccessGroupCache) StartDeleteTask

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

func (*SAccessGroupCache) SyncRules

func (self *SAccessGroupCache) SyncRules(ctx context.Context) error

func (*SAccessGroupCache) SyncStatus

func (self *SAccessGroupCache) SyncStatus(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SAccessGroupCache) ValidateDeleteCondition

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

type SAccessGroupCacheManager

var AccessGroupCacheManager *SAccessGroupCacheManager

func (*SAccessGroupCacheManager) FetchCustomizeColumns

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

func (*SAccessGroupCacheManager) FilterByOwner

func (*SAccessGroupCacheManager) ListItemExportKeys

func (*SAccessGroupCacheManager) ListItemFilter

func (*SAccessGroupCacheManager) OrderByExtraFields

func (*SAccessGroupCacheManager) QueryDistinctExtraField

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

func (*SAccessGroupCacheManager) Register

func (*SAccessGroupCacheManager) ResourceScope

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

type SAccessGroupCacheRegisterInput

type SAccessGroupCacheRegisterInput struct {
	Name           string
	Desc           string
	ManagerId      string
	CloudregionId  string
	FileSystemType string
	NetworkType    string
	AccessGroupId  string
}

type SAccessGroupManager

type SAccessGroupManager struct {
	db.SStatusInfrasResourceBaseManager
}
var AccessGroupManager *SAccessGroupManager

func (*SAccessGroupManager) DelaySync

func (manager *SAccessGroupManager) DelaySync(ctx context.Context, userCred mcclient.TokenCredential, idStr string) error

func (SAccessGroupManager) FetchCustomizeColumns

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

func (*SAccessGroupManager) InitializeData

func (manager *SAccessGroupManager) InitializeData() error

func (*SAccessGroupManager) ListItemExportKeys

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

func (*SAccessGroupManager) ListItemFilter

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

func (*SAccessGroupManager) OrderByExtraFields

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

func (*SAccessGroupManager) QueryDistinctExtraField

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

func (*SAccessGroupManager) ValidateCreateData

type SAccessGroupResourceBase

type SAccessGroupResourceBase struct {
	// 权限组Id
	AccessGroupId string `width:"36" charset:"ascii" nullable:"false" create:"required" index:"true" list:"user"`
}

func (*SAccessGroupResourceBase) GetAccessGroup

func (self *SAccessGroupResourceBase) GetAccessGroup() (*SAccessGroup, error)

type SAccessGroupResourceBaseManager

type SAccessGroupResourceBaseManager struct{}

func (*SAccessGroupResourceBaseManager) FetchCustomizeColumns

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

func (*SAccessGroupResourceBaseManager) GetExportKeys

func (manager *SAccessGroupResourceBaseManager) GetExportKeys() []string

func (*SAccessGroupResourceBaseManager) GetOrderByFields

func (manager *SAccessGroupResourceBaseManager) GetOrderByFields(query api.AccessGroupFilterListInput) []string

func (*SAccessGroupResourceBaseManager) GetOrderBySubQuery

func (*SAccessGroupResourceBaseManager) ListItemExportKeys

func (*SAccessGroupResourceBaseManager) ListItemFilter

func (*SAccessGroupResourceBaseManager) OrderByExtraFields

func (*SAccessGroupResourceBaseManager) QueryDistinctExtraField

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

type SAccessGroupRule

type SAccessGroupRule struct {
	db.SResourceBase
	SAccessGroupResourceBase

	Id             string `width:"128" charset:"ascii" primary:"true" list:"user"`
	Priority       int    `default:"1" list:"user" update:"user" list:"user"`
	Source         string `width:"16" charset:"ascii" list:"user" update:"user" create:"required"`
	RWAccessType   string `width:"16" charset:"ascii" list:"user" update:"user" create:"required"`
	UserAccessType string `width:"16" charset:"ascii" list:"user" update:"user" create:"required"`
	Description    string `width:"256" charset:"utf8" list:"user" update:"user" create:"optional"`
}

func (*SAccessGroupRule) BeforeInsert

func (self *SAccessGroupRule) BeforeInsert()

func (*SAccessGroupRule) Delete

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

func (*SAccessGroupRule) GetId

func (self *SAccessGroupRule) GetId() string

func (*SAccessGroupRule) GetOwnerId

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

func (*SAccessGroupRule) PostCreate

func (*SAccessGroupRule) PreDelete

func (self *SAccessGroupRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SAccessGroupRule) ValidateDeleteCondition

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

func (*SAccessGroupRule) ValidateUpdateData

type SAccessGroupRuleManager

type SAccessGroupRuleManager struct {
	db.SResourceBaseManager
	SAccessGroupResourceBaseManager
}
var AccessGroupRuleManager *SAccessGroupRuleManager

func (*SAccessGroupRuleManager) CreateByInsertOrUpdate

func (manager *SAccessGroupRuleManager) CreateByInsertOrUpdate() bool

func (*SAccessGroupRuleManager) FetchCustomizeColumns

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

func (*SAccessGroupRuleManager) FetchOwnerId

func (*SAccessGroupRuleManager) FetchUniqValues

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

func (*SAccessGroupRuleManager) FilterById

func (manager *SAccessGroupRuleManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery

func (*SAccessGroupRuleManager) FilterByOwner

func (*SAccessGroupRuleManager) FilterByUniqValues

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

func (*SAccessGroupRuleManager) InitializeData

func (manager *SAccessGroupRuleManager) InitializeData() error

func (*SAccessGroupRuleManager) ListItemExportKeys

func (*SAccessGroupRuleManager) ListItemFilter

权限组规则列表

func (*SAccessGroupRuleManager) OrderByExtraFields

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

func (*SAccessGroupRuleManager) QueryDistinctExtraField

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

func (*SAccessGroupRuleManager) ResourceScope

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

func (*SAccessGroupRuleManager) ValidateCreateData

创建权限组规则

type SApp

type SApp struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	db.SEnabledResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	Type      string `width:"16" charset:"ascii" nullable:"false" get:"user" list:"user"`
	TechStack string `width:"64" charset:"ascii" nullable:"false" get:"user" list:"user"`
	Kind      string `width:"64" charset:"ascii" nullable:"false" get:"user" list:"user"`
}

func (*SApp) GetAppEnvironments

func (a *SApp) GetAppEnvironments() ([]SAppEnvironment, error)

func (*SApp) GetIApp

func (a *SApp) GetIApp(ctx context.Context) (cloudprovider.ICloudApp, error)

func (*SApp) GetIRegion

func (a *SApp) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SApp) OnMetadataUpdated

func (self *SApp) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SApp) PerformRemoteUpdate

func (self *SApp) PerformRemoteUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.MongoDBRemoteUpdateInput) (jsonutils.JSONObject, error)

func (*SApp) PerformSyncstatus

func (a *SApp) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SApp) StartRemoteUpdateTask

func (self *SApp) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SApp) SyncAppEnvironments

func (a *SApp) SyncAppEnvironments(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudAppEnvironment) compare.SyncResult

func (*SApp) SyncWithCloudApp

func (a *SApp) SyncWithCloudApp(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, ext cloudprovider.ICloudApp) error

type SAppEnvironment

type SAppEnvironment struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	AppId          string `width:"36" charset:"ascii" index:"true"`
	InstanceType   string `width:"16" charset:"ascii" index:"true" get:"user" list:"user"`
	InstanceNumber int    `get:"user" list:"user"`
}

func (*SAppEnvironment) SyncWithCloudAppEnvironment

func (ae *SAppEnvironment) SyncWithCloudAppEnvironment(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudAppEnvironment) error

type SAppEnvironmentManager

type SAppEnvironmentManager struct {
	db.SVirtualResourceBaseManager
	db.SExternalizedResourceBaseManager
}
var AppEnvironmentManager *SAppEnvironmentManager

func (*SAppEnvironmentManager) FetchCustomizeColumns

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

func (*SAppEnvironmentManager) ListItemExportKeys

func (*SAppEnvironmentManager) ListItemFilter

func (*SAppEnvironmentManager) OrderByExtraFields

func (*SAppEnvironmentManager) QueryDistinctExtraField

func (aem *SAppEnvironmentManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SAppManager

var AppManager *SAppManager

func (*SAppManager) AllowListItems

func (am *SAppManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SAppManager) FetchCustomizeColumns

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

func (*SAppManager) GetApps

func (am *SAppManager) GetApps(providerId string) ([]SApp, error)

func (*SAppManager) GetExtraDetails

func (am *SAppManager) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.AppDetails, error)

func (*SAppManager) ListItemExportKeys

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

func (*SAppManager) ListItemFilter

func (am *SAppManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.AppListInput) (*sqlchemy.SQuery, error)

func (*SAppManager) OrderByExtraFields

func (am *SAppManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.AppListInput) (*sqlchemy.SQuery, error)

func (*SAppManager) QueryDistinctExtraField

func (am *SAppManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SAwsCachedLb

type SAwsCachedLb struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	BackendServerId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 后端服务器 实例ID
	BackendId            string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 本地loadbalancebackend id
	CachedBackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SAwsCachedLb) GetCachedBackendGroup

func (lbb *SAwsCachedLb) GetCachedBackendGroup() (*SAwsCachedLbbg, error)

func (*SAwsCachedLb) SyncWithCloudLoadbalancerBackend

func (lbb *SAwsCachedLb) SyncWithCloudLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) error

type SAwsCachedLbManager

type SAwsCachedLbManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var AwsCachedLbManager *SAwsCachedLbManager

func (*SAwsCachedLbManager) CreateAwsCachedLb

func (man *SAwsCachedLbManager) CreateAwsCachedLb(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, cachedLbbg *SAwsCachedLbbg, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) (*SAwsCachedLb, error)

func (*SAwsCachedLbManager) GetBackendsByLocalBackendId

func (man *SAwsCachedLbManager) GetBackendsByLocalBackendId(backendId string) ([]SAwsCachedLb, error)

func (*SAwsCachedLbManager) GetResourceCount

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

func (*SAwsCachedLbManager) SyncLoadbalancerBackends

func (man *SAwsCachedLbManager) SyncLoadbalancerBackends(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, loadbalancerBackendgroup *SAwsCachedLbbg, lbbs []cloudprovider.ICloudLoadbalancerBackend, syncRange *SSyncRange) compare.SyncResult

type SAwsCachedLbbg

type SAwsCachedLbbg struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	LoadbalancerId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendGroupId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	TargetType          string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` // 后端服务器类型
	ProtocolType        string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` // 监听协议类型
	Port                int    `nullable:"false" list:"user" create:"required"`                            // 监听端口
	HealthCheckProtocol string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` // 健康检查协议类型
	HealthCheckInterval int    `nullable:"false" list:"user" create:"required"`                            // 健康检查时间间隔
}

func (*SAwsCachedLbbg) GetCachedBackends

func (lbbg *SAwsCachedLbbg) GetCachedBackends() ([]SAwsCachedLb, error)

func (*SAwsCachedLbbg) GetICloudLoadbalancerBackendGroup

func (lbbg *SAwsCachedLbbg) GetICloudLoadbalancerBackendGroup(ctx context.Context) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SAwsCachedLbbg) GetLoadbalancer

func (lbbg *SAwsCachedLbbg) GetLoadbalancer() *SLoadbalancer

func (*SAwsCachedLbbg) GetLocalBackendGroup

func (lbbg *SAwsCachedLbbg) GetLocalBackendGroup(ctx context.Context, userCred mcclient.TokenCredential) (*SLoadbalancerBackendGroup, error)

func (*SAwsCachedLbbg) SyncWithCloudLoadbalancerBackendgroup

func (lbbg *SAwsCachedLbbg) SyncWithCloudLoadbalancerBackendgroup(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, extLoadbalancerBackendgroup cloudprovider.ICloudLoadbalancerBackendGroup, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

type SAwsCachedLbbgManager

type SAwsCachedLbbgManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var AwsCachedLbbgManager *SAwsCachedLbbgManager

func (*SAwsCachedLbbgManager) GetCachedBackendGroups

func (man *SAwsCachedLbbgManager) GetCachedBackendGroups(backendGroupId string) ([]SAwsCachedLbbg, error)

func (*SAwsCachedLbbgManager) GetUsableCachedBackendGroup

func (man *SAwsCachedLbbgManager) GetUsableCachedBackendGroup(loadbalancerId, backendGroupId, protocolType, healthCheckProtocol string, healthCheckInterval int) (*SAwsCachedLbbg, error)

func (*SAwsCachedLbbgManager) GetUsableCachedBackendGroups

func (man *SAwsCachedLbbgManager) GetUsableCachedBackendGroups(loadbalancerId, backendGroupId, protocolType, healthCheckProtocol string, healthCheckInterval int) ([]SAwsCachedLbbg, error)

func (*SAwsCachedLbbgManager) InitializeData

func (man *SAwsCachedLbbgManager) InitializeData() error

type SBackupDiskConfig

type SBackupDiskConfig struct {
	api.DiskConfig
	Name string
}

func (*SBackupDiskConfig) IsZero

func (dc *SBackupDiskConfig) IsZero() bool

func (*SBackupDiskConfig) String

func (dc *SBackupDiskConfig) String() string

type SBackupStorage

type SBackupStorage struct {
	db.SEnabledStatusInfrasResourceBase

	AccessInfo  *SBackupStorageAccessInfo
	StorageType string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"domain_required"`
	CapacityMb  int    `nullable:"false" list:"user" update:"domain" create:"domain_required"`
}

func (*SBackupStorage) BackupCount

func (bs *SBackupStorage) BackupCount() (int, error)

func (*SBackupStorage) CustomizeCreate

func (*SBackupStorage) GetRegionDriver

func (self *SBackupStorage) GetRegionDriver() IRegionDriver

func (*SBackupStorage) PerformSyncstatus

func (*SBackupStorage) PostCreate

func (*SBackupStorage) ValidateDeleteCondition

func (bs *SBackupStorage) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SBackupStorageAccessInfo

type SBackupStorageAccessInfo struct {
	NfsHost      string `json:"nfs_host"`
	NfsSharedDir string `json:"nfs_shared_dir"`
}

func (*SBackupStorageAccessInfo) IsZero

func (ba *SBackupStorageAccessInfo) IsZero() bool

func (*SBackupStorageAccessInfo) String

func (ba *SBackupStorageAccessInfo) String() string

type SBackupStorageManager

type SBackupStorageManager struct {
	db.SEnabledStatusInfrasResourceBaseManager
}
var BackupStorageManager *SBackupStorageManager

func (*SBackupStorageManager) FetchCustomizeColumns

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

func (*SBackupStorageManager) ListItemFilter

type SBaremetalagent

type SBaremetalagent struct {
	db.SStandaloneResourceBase
	SZoneResourceBase `width:"128" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`

	Status     string `width:"36" charset:"ascii" nullable:"false" default:"disable" list:"user" create:"optional"`
	AccessIp   string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`
	ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_required"`

	AgentType string `width:"32" charset:"ascii" nullable:"true" default:"baremetal" list:"admin" update:"admin" create:"admin_optional"`

	Version string `width:"64" charset:"ascii" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(64, charset='ascii'))

	StoragecacheId    string `width:"36" charset:"ascii" nullable:"true" list:"admin" get:"admin" update:"admin" create:"admin_optional"`
	DisableImageCache bool   `default:"false" list:"admin" create:"admin_optional" update:"admin"`
}

func (*SBaremetalagent) CustomizeDelete

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

func (*SBaremetalagent) GetZone

func (self *SBaremetalagent) GetZone() *SZone

func (*SBaremetalagent) PerformDisable

func (*SBaremetalagent) PerformDisableImageCache

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

func (*SBaremetalagent) PerformEnable

func (*SBaremetalagent) PerformEnableImageCache

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

func (*SBaremetalagent) PerformOffline

func (*SBaremetalagent) PerformOnline

func (*SBaremetalagent) ValidateDeleteCondition

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

func (*SBaremetalagent) ValidateUpdateData

type SBaremetalagentManager

type SBaremetalagentManager struct {
	db.SStandaloneResourceBaseManager
	SZoneResourceBaseManager
}
var BaremetalagentManager *SBaremetalagentManager

func (*SBaremetalagentManager) FetchCustomizeColumns

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

func (*SBaremetalagentManager) GetAgent

func (manager *SBaremetalagentManager) GetAgent(agentType api.TAgentType, zoneId string) *SBaremetalagent

func (*SBaremetalagentManager) ListItemExportKeys

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

func (*SBaremetalagentManager) ListItemFilter

管理代理服务列表

func (*SBaremetalagentManager) OrderByExtraFields

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

func (*SBaremetalagentManager) QueryDistinctExtraField

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

func (*SBaremetalagentManager) ValidateCreateData

type SBillingBaseInfo

type SBillingBaseInfo struct {
	ChargeType   string    `json:",omitempty"`
	ExpiredAt    time.Time `json:",omitempty"`
	BillingCycle string    `json:",omitempty"`
}

type SBillingResourceBase

type SBillingResourceBase struct {
	// 计费类型, 按量、包年包月
	// example: postpaid
	BillingType string `width:"36" charset:"ascii" nullable:"true" default:"postpaid" list:"user" create:"optional" json:"billing_type"`
	// 过期时间
	ExpiredAt time.Time `nullable:"true" list:"user" create:"optional" json:"expired_at"`
	// 计费周期
	BillingCycle string `width:"10" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"billing_cycle"`
	// 是否自动续费
	AutoRenew bool `default:"false" list:"user" create:"optional" json:"auto_renew"`
}

func (*SBillingResourceBase) GetChargeType

func (self *SBillingResourceBase) GetChargeType() string

func (*SBillingResourceBase) IsNotDeletablePrePaid

func (self *SBillingResourceBase) IsNotDeletablePrePaid() bool

func (*SBillingResourceBase) IsValidPostPaid

func (self *SBillingResourceBase) IsValidPostPaid() bool

func (*SBillingResourceBase) IsValidPrePaid

func (self *SBillingResourceBase) IsValidPrePaid() bool

type SBillingResourceBaseManager

type SBillingResourceBaseManager struct{}

func (*SBillingResourceBaseManager) FetchCustomizeColumns

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

func (*SBillingResourceBaseManager) ListItemFilter

func (*SBillingResourceBaseManager) OrderByExtraFields

type SBillingResourceCheck

type SBillingResourceCheck struct {
	db.SResourceBase
	ResourceId   string `width:"128" charset:"ascii" primary:"true"`
	ResourceType string `width:"36" charset:"ascii" primary:"true"`
	AdvanceDays  int    `primary:"true"`
	LastCheck    time.Time
	NotifyNumber int
}

type SBillingResourceCheckManager

type SBillingResourceCheckManager struct {
	db.SResourceBaseManager
}
var BillingResourceCheckManager *SBillingResourceCheckManager

func (*SBillingResourceCheckManager) Create

func (bm *SBillingResourceCheckManager) Create(ctx context.Context, resourceId, resourceType string, advanceDays int) error

func (*SBillingResourceCheckManager) Fetch

func (bm *SBillingResourceCheckManager) Fetch(resourceIds []string, advanceDays int, length int) (map[string]*SBillingResourceCheck, error)

type SBucket

type SBucket struct {
	db.SSharableVirtualResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
	SManagedResourceBase

	StorageClass string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	Location     string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	Acl          string `width:"36" charset:"ascii" nullable:"false" list:"user"`

	SizeBytes int64 `nullable:"false" default:"0" list:"user"`
	ObjectCnt int   `nullable:"false" default:"0" list:"user"`

	SizeBytesLimit int64 `nullable:"false" default:"0" list:"user"`
	ObjectCntLimit int   `nullable:"false" default:"0" list:"user"`

	AccessUrls jsonutils.JSONObject `nullable:"true" list:"user"`
}

func (*SBucket) AllowGetDetailsAccessInfo

func (bucket *SBucket) AllowGetDetailsAccessInfo(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsAcl

func (bucket *SBucket) AllowGetDetailsAcl(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsCdnDomain

func (bucket *SBucket) AllowGetDetailsCdnDomain(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsCors

func (bucket *SBucket) AllowGetDetailsCors(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsObjects

func (bucket *SBucket) AllowGetDetailsObjects(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input api.BucketGetObjectsInput,
) bool

func (*SBucket) AllowGetDetailsPolicy

func (bucket *SBucket) AllowGetDetailsPolicy(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsReferer

func (bucket *SBucket) AllowGetDetailsReferer(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowGetDetailsWebsite

func (bucket *SBucket) AllowGetDetailsWebsite(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformAcl

func (bucket *SBucket) AllowPerformAcl(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketAclInput,
) bool

func (*SBucket) AllowPerformDelete

func (bucket *SBucket) AllowPerformDelete(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformDeleteCors

func (bucket *SBucket) AllowPerformDeleteCors(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketCORSRuleDeleteInput,
) bool

func (*SBucket) AllowPerformDeletePolicy

func (bucket *SBucket) AllowPerformDeletePolicy(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPolicyDeleteInput,
) bool

func (*SBucket) AllowPerformDeleteWebsite

func (bucket *SBucket) AllowPerformDeleteWebsite(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketWebsiteConf,
) bool

func (*SBucket) AllowPerformLimit

func (bucket *SBucket) AllowPerformLimit(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformMakedir

func (bucket *SBucket) AllowPerformMakedir(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformMetadata

func (bucket *SBucket) AllowPerformMetadata(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketMetadataInput,
) bool

func (*SBucket) AllowPerformSetCors

func (bucket *SBucket) AllowPerformSetCors(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketCORSRules,
) bool

func (*SBucket) AllowPerformSetPolicy

func (bucket *SBucket) AllowPerformSetPolicy(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPolicyStatementInput,
) bool

func (*SBucket) AllowPerformSetReferer

func (bucket *SBucket) AllowPerformSetReferer(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketRefererConf,
) bool

func (*SBucket) AllowPerformSetWebsite

func (bucket *SBucket) AllowPerformSetWebsite(
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketWebsiteConf,
) bool

func (*SBucket) AllowPerformSync

func (bucket *SBucket) AllowPerformSync(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformSyncstatus

func (bucket *SBucket) AllowPerformSyncstatus(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) AllowPerformTempUrl

func (bucket *SBucket) AllowPerformTempUrl(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPerformTempUrlInput,
) bool

func (*SBucket) AllowPerformUpload

func (bucket *SBucket) AllowPerformUpload(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) bool

func (*SBucket) CustomizeDelete

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

func (*SBucket) Delete

func (bucket *SBucket) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SBucket) GetDetailsAccessInfo

func (bucket *SBucket) GetDetailsAccessInfo(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SBucket) GetDetailsAcl

func (bucket *SBucket) GetDetailsAcl(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input api.BucketGetAclInput,
) (api.BucketGetAclOutput, error)

获取对象或bucket的ACL

获取对象或bucket的ACL

func (*SBucket) GetDetailsCdnDomain

func (bucket *SBucket) GetDetailsCdnDomain(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input jsonutils.JSONObject,
) (api.CdnDomains, error)

func (*SBucket) GetDetailsCors

func (bucket *SBucket) GetDetailsCors(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input jsonutils.JSONObject,
) (api.BucketCORSRules, error)

func (*SBucket) GetDetailsObjects

func (bucket *SBucket) GetDetailsObjects(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input api.BucketGetObjectsInput,
) (api.BucketGetObjectsOutput, error)

获取bucket的对象列表

获取bucket的对象列表

func (*SBucket) GetDetailsPolicy

func (bucket *SBucket) GetDetailsPolicy(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input jsonutils.JSONObject,
) (api.BucketPolicy, error)

func (*SBucket) GetDetailsReferer

func (bucket *SBucket) GetDetailsReferer(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input jsonutils.JSONObject,
) (api.BucketRefererConf, error)

func (*SBucket) GetDetailsWebsite

func (bucket *SBucket) GetDetailsWebsite(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input jsonutils.JSONObject,
) (api.BucketWebsiteConf, error)

func (*SBucket) GetIBucket

func (bucket *SBucket) GetIBucket(ctx context.Context) (cloudprovider.ICloudBucket, error)

func (*SBucket) GetIRegion

func (bucket *SBucket) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SBucket) GetQuotaKeys

func (bucket *SBucket) GetQuotaKeys() (quotas.IQuotaKeys, error)

func (*SBucket) GetShortDesc

func (bucket *SBucket) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SBucket) GetUsages

func (bucket *SBucket) GetUsages() []db.IUsage

func (*SBucket) OnMetadataUpdated

func (bucket *SBucket) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SBucket) PerformAcl

func (bucket *SBucket) PerformAcl(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketAclInput,
) (jsonutils.JSONObject, error)

设置对象和bucket的ACL

设置对象和bucket的ACL

func (*SBucket) PerformDelete

func (bucket *SBucket) PerformDelete(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPerformDeleteInput,
) (jsonutils.JSONObject, error)

删除对象

删除对象

func (*SBucket) PerformDeleteCors

func (bucket *SBucket) PerformDeleteCors(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketCORSRuleDeleteInput,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformDeletePolicy

func (bucket *SBucket) PerformDeletePolicy(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPolicyDeleteInput,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformDeleteWebsite

func (bucket *SBucket) PerformDeleteWebsite(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformLimit

func (bucket *SBucket) PerformLimit(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformMakedir

func (bucket *SBucket) PerformMakedir(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPerformMakedirInput,
) (jsonutils.JSONObject, error)

新建对象目录

新建对象目录

func (*SBucket) PerformMetadata

func (bucket *SBucket) PerformMetadata(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketMetadataInput,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSetCors

func (bucket *SBucket) PerformSetCors(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketCORSRules,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSetPolicy

func (bucket *SBucket) PerformSetPolicy(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketPolicyStatementInput,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSetReferer

func (bucket *SBucket) PerformSetReferer(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketRefererConf,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSetWebsite

func (bucket *SBucket) PerformSetWebsite(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketWebsiteConf,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSync

func (bucket *SBucket) PerformSync(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SBucket) PerformSyncstatus

func (bucket *SBucket) PerformSyncstatus(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketSyncstatusInput,
) (jsonutils.JSONObject, error)

同步存储桶状态

同步存储桶状态

func (*SBucket) PerformTempUrl

获取访问对象的临时URL

获取访问对象的临时URL

func (*SBucket) PerformUpload

func (bucket *SBucket) PerformUpload(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

上传对象

上传对象

func (*SBucket) PostCreate

func (bucket *SBucket) PostCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
)

func (*SBucket) RealDelete

func (bucket *SBucket) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SBucket) RemoteCreate

func (bucket *SBucket) RemoteCreate(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SBucket) RemoteDelete

func (bucket *SBucket) RemoteDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SBucket) StartBucketDeleteTask

func (bucket *SBucket) StartBucketDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SBucket) ValidateDeleteCondition

func (bucket *SBucket) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SBucket) ValidatePurgeCondition

func (bucket *SBucket) ValidatePurgeCondition(ctx context.Context) error

func (*SBucket) ValidateUpdateData

func (bucket *SBucket) ValidateUpdateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.BucketUpdateInput,
) (api.BucketUpdateInput, error)

type SBucketManager

var BucketManager *SBucketManager

func (*SBucketManager) FetchCustomizeColumns

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

func (*SBucketManager) ListItemExportKeys

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

func (*SBucketManager) ListItemFilter

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

对象存储的存储桶列表

func (*SBucketManager) OrderByExtraFields

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

func (*SBucketManager) QueryDistinctExtraField

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

func (*SBucketManager) SetHandlerProcessTimeout

func (manager *SBucketManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration

func (*SBucketManager) TotalCount

func (manager *SBucketManager) TotalCount(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, rangeObjs []db.IStandaloneModel, providers []string, brands []string, cloudEnv string, policyResult rbacutils.SPolicyResult) SBucketUsages

func (*SBucketManager) ValidateCreateData

func (manager *SBucketManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	input api.BucketCreateInput,
) (api.BucketCreateInput, error)

type SBucketUsages

type SBucketUsages struct {
	Buckets      int
	Objects      int
	Bytes        int64
	BytesLimit   int64
	DiskUsedRate float64
}

type SCDNDomain

type SCDNDomain struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SDeletePreventableResourceBase
	SManagedResourceBase

	Cname string `list:"user" width:"256"`

	// 源站信息
	Origins *cloudprovider.SCdnOrigins `list:"user" create:"domain_required"`
	// 服务类别
	ServiceType string `list:"user" width:"32" create:"domain_required"`
	// 加速区域
	Area string `list:"user" width:"32" update:"domain" create:"domain_required"`
}

func (*SCDNDomain) CustomizeDelete

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

func (*SCDNDomain) Delete

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

func (*SCDNDomain) GetICloudCDNDomain

func (self *SCDNDomain) GetICloudCDNDomain(ctx context.Context) (cloudprovider.ICloudCDNDomain, error)

func (*SCDNDomain) OnMetadataUpdated

func (self *SCDNDomain) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SCDNDomain) PerformRemoteUpdate

func (self *SCDNDomain) PerformRemoteUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.MongoDBRemoteUpdateInput) (jsonutils.JSONObject, error)

func (*SCDNDomain) PerformSyncstatus

同步域名状态

func (*SCDNDomain) PostCreate

func (*SCDNDomain) RealDelete

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

func (*SCDNDomain) StartCdnCreateTask

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

func (*SCDNDomain) StartDeleteTask

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

func (*SCDNDomain) StartRemoteUpdateTask

func (self *SCDNDomain) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SCDNDomain) StartSyncstatus

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

func (*SCDNDomain) SyncWithCloudCDNDomain

func (self *SCDNDomain) SyncWithCloudCDNDomain(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudCDNDomain) error

func (*SCDNDomain) ValidateDeleteCondition

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

判断资源是否可以删除

type SCDNDomainManager

var CDNDomainManager *SCDNDomainManager

func (*SCDNDomainManager) FetchCustomizeColumns

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

func (*SCDNDomainManager) GetContextManagers

func (manager *SCDNDomainManager) GetContextManagers() [][]db.IModelManager

func (*SCDNDomainManager) ListItemExportKeys

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

func (*SCDNDomainManager) ListItemFilter

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

列出CDN域名

func (*SCDNDomainManager) OrderByExtraFields

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

func (*SCDNDomainManager) QueryDistinctExtraField

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

func (*SCDNDomainManager) ValidateCreateData

type SCachedLoadbalancerAcl

type SCachedLoadbalancerAcl struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SLoadbalancerAclResourceBase

	ListenerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // huawei only
}

func (*SCachedLoadbalancerAcl) CustomizeDelete

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

func (*SCachedLoadbalancerAcl) Delete

func (lbacl *SCachedLoadbalancerAcl) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCachedLoadbalancerAcl) GetIRegion

func (*SCachedLoadbalancerAcl) GetListener

func (lbacl *SCachedLoadbalancerAcl) GetListener() (*SLoadbalancerListener, error)

func (*SCachedLoadbalancerAcl) GetRegion

func (lbacl *SCachedLoadbalancerAcl) GetRegion() *SCloudregion

func (*SCachedLoadbalancerAcl) PerformPurge

func (*SCachedLoadbalancerAcl) PostCreate

func (*SCachedLoadbalancerAcl) PostUpdate

func (*SCachedLoadbalancerAcl) StartLoadBalancerAclCreateTask

func (lbacl *SCachedLoadbalancerAcl) StartLoadBalancerAclCreateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCachedLoadbalancerAcl) StartLoadBalancerAclDeleteTask

func (lbacl *SCachedLoadbalancerAcl) StartLoadBalancerAclDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SCachedLoadbalancerAcl) StartLoadBalancerAclSyncTask

func (lbacl *SCachedLoadbalancerAcl) StartLoadBalancerAclSyncTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCachedLoadbalancerAcl) SyncWithCloudLoadbalancerAcl

func (acl *SCachedLoadbalancerAcl) SyncWithCloudLoadbalancerAcl(ctx context.Context, userCred mcclient.TokenCredential, extAcl cloudprovider.ICloudLoadbalancerAcl, projectId mcclient.IIdentityProvider) error

func (*SCachedLoadbalancerAcl) ValidateDeleteCondition

func (lbacl *SCachedLoadbalancerAcl) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SCachedLoadbalancerAcl) ValidateUpdateData

func (lbacl *SCachedLoadbalancerAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SCachedLoadbalancerAclManager

+onecloud:swagger-gen-ignore

var CachedLoadbalancerAclManager *SCachedLoadbalancerAclManager

func (*SCachedLoadbalancerAclManager) FetchCustomizeColumns

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

func (*SCachedLoadbalancerAclManager) GetOrCreateCachedAcl

func (*SCachedLoadbalancerAclManager) GetResourceCount

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

func (*SCachedLoadbalancerAclManager) InitializeData

func (manager *SCachedLoadbalancerAclManager) InitializeData() error

func (*SCachedLoadbalancerAclManager) ListItemExportKeys

func (*SCachedLoadbalancerAclManager) ListItemFilter

func (*SCachedLoadbalancerAclManager) OrderByExtraFields

func (*SCachedLoadbalancerAclManager) QueryDistinctExtraField

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

func (*SCachedLoadbalancerAclManager) SyncLoadbalancerAcls

func (*SCachedLoadbalancerAclManager) ValidateCreateData

type SCachedLoadbalancerCertificate

type SCachedLoadbalancerCertificate struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase     // 云账号ID
	SCloudregionResourceBase // Region ID

	SLoadbalancerCertificateResourceBase `width:"128" charset:"ascii" nullable:"false" create:"required"  index:"true" list:"user"`
}

func (*SCachedLoadbalancerCertificate) CustomizeDelete

func (*SCachedLoadbalancerCertificate) Delete

func (*SCachedLoadbalancerCertificate) GetIRegion

func (*SCachedLoadbalancerCertificate) GetRegion

func (lbcert *SCachedLoadbalancerCertificate) GetRegion() *SCloudregion

func (*SCachedLoadbalancerCertificate) PostCreate

func (*SCachedLoadbalancerCertificate) StartLoadBalancerCertificateDeleteTask

func (lbcert *SCachedLoadbalancerCertificate) StartLoadBalancerCertificateDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SCachedLoadbalancerCertificate) StartLoadbalancerCertificateCreateTask

func (lbcert *SCachedLoadbalancerCertificate) StartLoadbalancerCertificateCreateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCachedLoadbalancerCertificate) SyncWithCloudLoadbalancerCertificate

func (lbcert *SCachedLoadbalancerCertificate) SyncWithCloudLoadbalancerCertificate(ctx context.Context, userCred mcclient.TokenCredential, extCertificate cloudprovider.ICloudLoadbalancerCertificate, projectId mcclient.IIdentityProvider) error

func (*SCachedLoadbalancerCertificate) ValidateDeleteCondition

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

func (*SCachedLoadbalancerCertificate) ValidatePurgeCondition

func (self *SCachedLoadbalancerCertificate) ValidatePurgeCondition(ctx context.Context) error

type SCachedLoadbalancerCertificateManager

+onecloud:swagger-gen-ignore

var CachedLoadbalancerCertificateManager *SCachedLoadbalancerCertificateManager

func (*SCachedLoadbalancerCertificateManager) FetchCustomizeColumns

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

func (*SCachedLoadbalancerCertificateManager) GetOrCreateCachedCertificate

func (*SCachedLoadbalancerCertificateManager) GetResourceCount

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

func (*SCachedLoadbalancerCertificateManager) InitializeData

func (man *SCachedLoadbalancerCertificateManager) InitializeData() error

func (*SCachedLoadbalancerCertificateManager) ListItemExportKeys

func (*SCachedLoadbalancerCertificateManager) ListItemFilter

func (*SCachedLoadbalancerCertificateManager) OrderByExtraFields

func (*SCachedLoadbalancerCertificateManager) QueryDistinctExtraField

func (man *SCachedLoadbalancerCertificateManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SCachedLoadbalancerCertificateManager) SyncLoadbalancerCertificates

func (man *SCachedLoadbalancerCertificateManager) SyncLoadbalancerCertificates(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, certificates []cloudprovider.ICloudLoadbalancerCertificate, syncRange *SSyncRange) compare.SyncResult

func (*SCachedLoadbalancerCertificateManager) ValidateCreateData

type SCachedimage

type SCachedimage struct {
	db.SSharableVirtualResourceBase
	db.SExternalizedResourceBase

	// 镜像大小单位: Byte
	// example: 53687091200
	Size int64 `nullable:"false" list:"user" update:"admin" create:"admin_required"`

	// 镜像详情信息
	// example: {"deleted":false,"disk_format":"qcow2","id":"img-a6uucnfl","is_public":true,"min_disk":51200,"min_ram":0,"name":"FreeBSD 11.1 64bit","properties":{"os_arch":"x86_64","os_distribution":"FreeBSD","os_type":"FreeBSD","os_version":"11"},"protected":true,"size":53687091200,"status":"active"}
	Info jsonutils.JSONObject `nullable:"true" list:"user" update:"admin" create:"admin_required"`

	// 上此同步时间
	// example: 2020-01-17T05:28:54.000000Z
	LastSync time.Time `list:"admin"`

	// 最近一次缓存引用时间
	// 2020-01-17T05:20:54.000000Z
	LastRef time.Time `list:"admin"`

	// 引用次数
	// example: 0
	RefCount int `default:"0" list:"user"`

	// 是否支持UEFI
	// example: false
	UEFI tristate.TriState `default:"false" list:"user"`

	// 镜像类型, system: 公有云镜像, customized: 自定义镜像
	// example: system
	ImageType string `width:"16" default:"customized" list:"user" index:"true"`
}

func (*SCachedimage) ChooseSourceStoragecacheInRange

func (self *SCachedimage) ChooseSourceStoragecacheInRange(hostType string, excludes []string, rangeObjs []interface{}) (*SStoragecachedimage, error)

func (*SCachedimage) GetAllClassMetadata

func (image *SCachedimage) GetAllClassMetadata() (map[string]string, error)

func (*SCachedimage) GetChecksum

func (self *SCachedimage) GetChecksum() string

func (*SCachedimage) GetCloudprovider

func (image *SCachedimage) GetCloudprovider() (*SCloudprovider, error)

func (*SCachedimage) GetFormat

func (self *SCachedimage) GetFormat() string

func (SCachedimage) GetGlobalId

func (self SCachedimage) GetGlobalId() string

func (*SCachedimage) GetHypervisor

func (self *SCachedimage) GetHypervisor() string

func (*SCachedimage) GetImage

func (self *SCachedimage) GetImage() (*cloudprovider.SImage, error)

func (*SCachedimage) GetName

func (self *SCachedimage) GetName() string

func (*SCachedimage) GetOSDistribution

func (self *SCachedimage) GetOSDistribution() string

func (*SCachedimage) GetOSType

func (self *SCachedimage) GetOSType() string

func (*SCachedimage) GetOSVersion

func (self *SCachedimage) GetOSVersion() string

func (*SCachedimage) GetOwner

func (self *SCachedimage) GetOwner() string

func (*SCachedimage) GetRegions

func (image *SCachedimage) GetRegions() ([]SCloudregion, error)

func (*SCachedimage) GetStatus

func (self *SCachedimage) GetStatus() string

func (*SCachedimage) GetStorages

func (image *SCachedimage) GetStorages() ([]SStorage, error)

func (*SCachedimage) GetUsableZoneIds

func (image *SCachedimage) GetUsableZoneIds() ([]string, error)

func (*SCachedimage) PerformRefresh

func (*SCachedimage) PerformUncacheImage

清除镜像缓存

func (*SCachedimage) ValidateDeleteCondition

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

type SCachedimageManager

var CachedimageManager *SCachedimageManager

func (*SCachedimageManager) AutoCleanImageCaches

func (manager *SCachedimageManager) AutoCleanImageCaches(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

清理已经删除的镜像缓存

func (*SCachedimageManager) FetchCustomizeColumns

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

func (*SCachedimageManager) GetCachedimageById

func (manager *SCachedimageManager) GetCachedimageById(ctx context.Context, userCred mcclient.TokenCredential, imageId string, refresh bool) (*SCachedimage, error)

func (*SCachedimageManager) GetImageById

func (manager *SCachedimageManager) GetImageById(ctx context.Context, userCred mcclient.TokenCredential, imageId string, refresh bool) (*cloudprovider.SImage, error)

func (*SCachedimageManager) GetImageInfo

func (manager *SCachedimageManager) GetImageInfo(ctx context.Context, userCred mcclient.TokenCredential, imageId string, refresh bool) (*cloudprovider.SImage, error)

func (*SCachedimageManager) GetResourceCount

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

func (*SCachedimageManager) ImageAddRefCount

func (manager *SCachedimageManager) ImageAddRefCount(imageId string)

func (*SCachedimageManager) InitializeData

func (manager *SCachedimageManager) InitializeData() error

func (*SCachedimageManager) ListItemExportKeys

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

func (*SCachedimageManager) ListItemFilter

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

缓存镜像列表

func (*SCachedimageManager) OrderByExtraFields

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

func (*SCachedimageManager) PerformCacheImage

func (*SCachedimageManager) QueryDistinctExtraField

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

type SCapabilities

type SCapabilities struct {
	Hypervisors []string `json:",allowempty"`

	Brands                           []string `json:",allowempty"`
	DisabledBrands                   []string `json:",allowempty"`
	ComputeEngineBrands              []string `json:",allowempty"`
	DisabledComputeEngineBrands      []string `json:",allowempty"`
	RdsEngineBrands                  []string `json:",allowempty"`
	DisabledRdsEngineBrands          []string `json:",allowempty"`
	RedisEngineBrands                []string `json:",allowempty"`
	DisabledRedisEngineBrands        []string `json:",allowempty"`
	LoadbalancerEngineBrands         []string `json:",allowempty"`
	DisabledLoadbalancerEngineBrands []string `json:",allowempty"`
	CloudIdBrands                    []string `json:",allowempty"`
	DisabledCloudIdBrands            []string `json:",allowempty"`
	// 支持SAML 2.0
	SamlAuthBrands              []string `json:",allowempty"`
	DisabledSamlAuthBrands      []string `json:",allowempty"`
	NatBrands                   []string `json:",allowempty"`
	DisabledNatBrands           []string `json:",allowempty"`
	NasBrands                   []string `json:",allowempty"`
	DisabledNasBrands           []string `json:",allowempty"`
	WafBrands                   []string `json:",allowempty"`
	DisabledWafBrands           []string `json:",allowempty"`
	CdnBrands                   []string `json:",allowempty"`
	DisabledCdnBrands           []string `json:",allowempty"`
	PublicIpBrands              []string `json:",allowempty"`
	DisabledPublicIpBrands      []string `json:",allowempty"`
	NetworkManageBrands         []string `json:",allowempty"`
	DisabledNetworkManageBrands []string `json:",allowempty"`
	ObjectStorageBrands         []string `json:",allowempty"`
	DisabledObjectStorageBrands []string `json:",allowempty"`

	ContainerBrands         []string `json:",allowempty"`
	DisabledContainerBrands []string `json:",allowempty"`

	ReadOnlyBrands                           []string `json:",allowempty"`
	ReadOnlyDisabledBrands                   []string `json:",allowempty"`
	ReadOnlyComputeEngineBrands              []string `json:",allowempty"`
	ReadOnlyDisabledComputeEngineBrands      []string `json:",allowempty"`
	ReadOnlyRdsEngineBrands                  []string `json:",allowempty"`
	ReadOnlyDisabledRdsEngineBrands          []string `json:",allowempty"`
	ReadOnlyRedisEngineBrands                []string `json:",allowempty"`
	ReadOnlyDisabledRedisEngineBrands        []string `json:",allowempty"`
	ReadOnlyLoadbalancerEngineBrands         []string `json:",allowempty"`
	ReadOnlyDisabledLoadbalancerEngineBrands []string `json:",allowempty"`
	ReadOnlyCloudIdBrands                    []string `json:",allowempty"`
	ReadOnlyDisabledCloudIdBrands            []string `json:",allowempty"`
	// 支持SAML 2.0
	ReadOnlySamlAuthBrands              []string `json:",allowempty"`
	ReadOnlyDisabledSamlAuthBrands      []string `json:",allowempty"`
	ReadOnlyNatBrands                   []string `json:",allowempty"`
	ReadOnlyDisabledNatBrands           []string `json:",allowempty"`
	ReadOnlyNasBrands                   []string `json:",allowempty"`
	ReadOnlyDisabledNasBrands           []string `json:",allowempty"`
	ReadOnlyWafBrands                   []string `json:",allowempty"`
	ReadOnlyDisabledWafBrands           []string `json:",allowempty"`
	ReadOnlyCdnBrands                   []string `json:",allowempty"`
	ReadOnlyDisabledCdnBrands           []string `json:",allowempty"`
	ReadOnlyPublicIpBrands              []string `json:",allowempty"`
	ReadOnlyDisabledPublicIpBrands      []string `json:",allowempty"`
	ReadOnlyNetworkManageBrands         []string `json:",allowempty"`
	ReadOnlyDisabledNetworkManageBrands []string `json:",allowempty"`
	ReadOnlyObjectStorageBrands         []string `json:",allowempty"`
	ReadOnlyDisabledObjectStorageBrands []string `json:",allowempty"`

	ReadOnlyContainerBrands         []string `json:",allowempty"`
	ReadOnlyDisabledContainerBrands []string `json:",allowempty"`

	ResourceTypes      []string `json:",allowempty"`
	StorageTypes       []string `json:",allowempty"` // going to remove on 2.14
	DataStorageTypes   []string `json:",allowempty"` // going to remove on 2.14
	GPUModels          []string `json:",allowempty"`
	HostCpuArchs       []string `json:",allowempty"` // x86_64 aarch64
	MinNicCount        int
	MaxNicCount        int
	MinDataDiskCount   int
	MaxDataDiskCount   int
	SchedPolicySupport bool
	Usable             bool

	// Deprecated
	PublicNetworkCount int

	AutoAllocNetworkCount int
	DBInstance            map[string]map[string]map[string][]string //map[engine][engineVersion][category][]{storage_type}
	Specs                 jsonutils.JSONObject
	AvailableHostCount    int

	StorageTypes2     map[string][]string                      `json:",allowempty"`
	StorageTypes3     map[string]map[string]*SimpleStorageInfo `json:",allowempty"`
	DataStorageTypes2 map[string][]string                      `json:",allowempty"`
	DataStorageTypes3 map[string]map[string]*SimpleStorageInfo `json:",allowempty"`

	InstanceCapabilities []cloudprovider.SInstanceCapability
}

func GetCapabilities

func GetCapabilities(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, region *SCloudregion, zone *SZone) (SCapabilities, error)

func GetDiskCapabilities

func GetDiskCapabilities(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, region *SCloudregion, zone *SZone) (SCapabilities, error)

type SCloudBillingInfo

type SCloudBillingInfo struct {
	SCloudProviderInfo

	SBillingBaseInfo

	PriceKey           string `json:",omitempty"`
	InternetChargeType string `json:",omitempty"`
}

type SCloudProviderInfo

type SCloudProviderInfo struct {
	Provider         string `json:",omitempty"`
	Brand            string `json:",omitempty"`
	Account          string `json:",omitempty"`
	AccountId        string `json:",omitempty"`
	Manager          string `json:",omitempty"`
	ManagerId        string `json:",omitempty"`
	ManagerProject   string `json:",omitempty"`
	ManagerProjectId string `json:",omitempty"`
	ManagerDomain    string `json:",omitempty"`
	ManagerDomainId  string `json:",omitempty"`
	Region           string `json:",omitempty"`
	RegionId         string `json:",omitempty"`
	CloudregionId    string `json:",omitempty"`
	RegionExternalId string `json:",omitempty"`
	RegionExtId      string `json:",omitempty"`
	Zone             string `json:",omitempty"`
	ZoneId           string `json:",omitempty"`
	ZoneExtId        string `json:",omitempty"`
	CloudEnv         string `json:",omitempty"`
}

func MakeCloudProviderInfo

func MakeCloudProviderInfo(region *SCloudregion, zone *SZone, provider *SCloudprovider) SCloudProviderInfo

type SCloudaccount

type SCloudaccount struct {
	db.SEnabledStatusInfrasResourceBase

	SSyncableBaseResource

	// 项目Id
	ProjectId string `name:"tenant_id" width:"128" charset:"ascii" list:"user" create:"domain_optional"`

	// 云环境连接地址
	AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	// 云账号
	Account string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`

	// 云账号密码
	Secret string `length:"0" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`

	// 云环境唯一标识
	AccountId string `width:"128" charset:"utf8" nullable:"true" list:"domain" create:"domain_optional"`

	// 是否是公有云账号
	// example: true
	IsPublicCloud tristate.TriState `get:"user" create:"optional" list:"user" default:"true"`

	// 是否是本地IDC账号
	// example: false
	IsOnPremise bool `nullable:"false" get:"user" create:"optional" list:"user" default:"false"`

	// 云平台类型
	// example: google
	Provider string `width:"64" charset:"ascii" list:"domain" create:"domain_required"`

	// 账户余额
	// example: 124.2
	Balance float64 `list:"domain" width:"20" precision:"6"`

	// 上次账号探测时间
	ProbeAt time.Time `list:"domain"`

	// 账号健康状态
	// example: normal
	HealthStatus string `width:"16" charset:"ascii" default:"normal" nullable:"false" list:"domain"`

	// 账号探测异常错误次数
	ErrorCount int `list:"domain"`

	// 是否根据云上项目自动在本地创建对应项目
	// example: false
	AutoCreateProject bool `list:"domain" create:"domain_optional"`

	// 云API版本
	Version string `width:"32" charset:"ascii" nullable:"true" list:"domain"`

	// 云系统信息
	Sysinfo jsonutils.JSONObject `get:"domain"`

	// 品牌信息, 一般和provider相同
	// example: DStack
	Brand string `width:"64" charset:"utf8" nullable:"true" list:"domain" create:"optional"`

	// 额外信息
	Options *jsonutils.JSONDict `get:"domain" create:"domain_optional" update:"domain"`

	// for backward compatiblity, keep is_public field, but not usable
	// IsPublic bool `default:"false" nullable:"false"`
	// add share_mode field to indicate the share range of this account
	ShareMode string `width:"32" charset:"ascii" nullable:"true" list:"domain"`

	// 默认值proxyapi.ProxySettingId_DIRECT
	ProxySettingId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"optional" update:"domain" default:"DIRECT"`

	// 公有云子账号登录地址
	IamLoginUrl string `width:"512" charset:"ascii" nullable:"false" list:"domain" update:"domain"`

	SAMLAuth tristate.TriState `get:"user" update:"domain" create:"optional" list:"user" default:"false"`

	SProjectMappingResourceBase

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

	// 设置允许同步的账号及订阅
	SubAccounts *cloudprovider.SubAccounts `nullable:"true" get:"user" create:"optional"`

	// 缺失的权限,云账号操作资源时自动更新
	LakeOfPermissions *api.SAccountPermissions `length:"medium" get:"user" list:"user"`
	// contains filtered or unexported fields
}

func (*SCloudaccount) CanSync

func (self *SCloudaccount) CanSync() bool

func (*SCloudaccount) CustomizeCreate

func (self *SCloudaccount) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SCloudaccount) CustomizeDelete

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

func (*SCloudaccount) Delete

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

func (*SCloudaccount) GetBalance

func (self *SCloudaccount) GetBalance() (float64, error)

func (*SCloudaccount) GetCloudEnv

func (self *SCloudaccount) GetCloudEnv() string

func (*SCloudaccount) GetCloudproviders

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

func (*SCloudaccount) GetDetailsBalance

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

func (*SCloudaccount) GetDetailsEnrollmentAccounts

func (self *SCloudaccount) GetDetailsEnrollmentAccounts(ctx context.Context, userCred mcclient.TokenCredential, query api.EnrollmentAccountQuery) ([]cloudprovider.SEnrollmentAccount, error)

获取Azure Enrollment Accounts

func (*SCloudaccount) GetDetailsSaml

func (*SCloudaccount) GetDiskCount

func (self *SCloudaccount) GetDiskCount() (int, error)

func (*SCloudaccount) GetDnsZoneCaches

func (self *SCloudaccount) GetDnsZoneCaches() ([]SDnsZoneCache, error)

func (*SCloudaccount) GetEipCount

func (self *SCloudaccount) GetEipCount() (int, error)

func (*SCloudaccount) GetEnabledCloudproviders

func (self *SCloudaccount) GetEnabledCloudproviders() []SCloudprovider

func (*SCloudaccount) GetEnvironment

func (self *SCloudaccount) GetEnvironment() string

func (*SCloudaccount) GetExternalProjects

func (self *SCloudaccount) GetExternalProjects() ([]SExternalProject, error)

func (*SCloudaccount) GetExternalProjectsByProjectIdOrName

func (self *SCloudaccount) GetExternalProjectsByProjectIdOrName(projectId, name string) ([]SExternalProject, error)

func (*SCloudaccount) GetGuestCount

func (self *SCloudaccount) GetGuestCount() (int, error)

func (*SCloudaccount) GetHost2Wire

func (cd *SCloudaccount) GetHost2Wire(ctx context.Context, userCred mcclient.TokenCredential) (map[string][]SVs2Wire, error)

func (*SCloudaccount) GetHostCount

func (self *SCloudaccount) GetHostCount() (int, error)

func (*SCloudaccount) GetProvider

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

func (*SCloudaccount) GetProviderCount

func (self *SCloudaccount) GetProviderCount() (int, error)

func (*SCloudaccount) GetProviderFactory

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

func (*SCloudaccount) GetRoutetableCount

func (self *SCloudaccount) GetRoutetableCount() (int, error)

func (*SCloudaccount) GetStorageCount

func (self *SCloudaccount) GetStorageCount() (int, error)

func (*SCloudaccount) GetStoragecacheCount

func (self *SCloudaccount) GetStoragecacheCount() (int, error)

func (*SCloudaccount) GetSubAccounts

func (self *SCloudaccount) GetSubAccounts(ctx context.Context) ([]cloudprovider.SSubAccount, error)

func (*SCloudaccount) GetUsages

func (account *SCloudaccount) GetUsages() []db.IUsage

func (*SCloudaccount) GetVCenterAccessInfo

func (self *SCloudaccount) GetVCenterAccessInfo(privateId string) (vcenter.SVCenterAccessInfo, error)

func (*SCloudaccount) GetVpcCount

func (self *SCloudaccount) GetVpcCount() (int, error)

func (*SCloudaccount) IsAvailable

func (self *SCloudaccount) IsAvailable() bool

func (*SCloudaccount) MarkEndSyncWithLock

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

func (*SCloudaccount) MarkSyncing

func (self *SCloudaccount) MarkSyncing(userCred mcclient.TokenCredential, probe bool) error

func (*SCloudaccount) PerformChangeOwner

+onecloud:swagger-gen-ignore

func (*SCloudaccount) PerformChangeProject

func (*SCloudaccount) PerformCreateSubscription

func (self *SCloudaccount) PerformCreateSubscription(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SubscriptonCreateInput) (jsonutils.JSONObject, error)

创建Azure订阅

func (*SCloudaccount) PerformDisable

func (*SCloudaccount) PerformEnable

func (*SCloudaccount) PerformPrivate

func (*SCloudaccount) PerformProjectMapping

绑定同步策略

func (*SCloudaccount) PerformPublic

func (*SCloudaccount) PerformShareMode

Deprecated

func (*SCloudaccount) PerformSync

func (*SCloudaccount) PerformSyncSkus

func (*SCloudaccount) PerformSyncVMwareNetwork

func (*SCloudaccount) PerformTestConnectivity

测试账号连通性(更新秘钥信息时)

func (*SCloudaccount) PerformUpdateCredential

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

func (*SCloudaccount) PostCreate

func (*SCloudaccount) PostUpdate

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

func (*SCloudaccount) RealDelete

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

func (*SCloudaccount) SetHost2Wire

func (cd *SCloudaccount) SetHost2Wire(ctx context.Context, userCred mcclient.TokenCredential, hw map[string][]SVs2Wire) error

func (*SCloudaccount) StartCloudaccountDeleteTask

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

func (*SCloudaccount) StartSyncCloudProviderInfoTask

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

func (*SCloudaccount) StartSyncVMwareNetworkTask

func (ca *SCloudaccount) StartSyncVMwareNetworkTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, networkZone string) error

func (*SCloudaccount) SubmitSyncAccountTask

func (account *SCloudaccount) SubmitSyncAccountTask(ctx context.Context, userCred mcclient.TokenCredential, waitChan chan error)

func (*SCloudaccount) SyncCallSyncAccountTask

func (account *SCloudaccount) SyncCallSyncAccountTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCloudaccount) SyncDnsZones

func (*SCloudaccount) SyncProject

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

若本地项目映射了多个云上项目,则在云上随机找一个项目 若本地项目没有映射云上任何项目,则在云上新建一个同名项目 若本地项目a映射云上项目b,但b项目不可用,则看云上是否有a项目,有则直接使用,若没有则在云上创建a-1, a-2类似项目

func (*SCloudaccount) UpdatePermission

func (self *SCloudaccount) UpdatePermission(ctx context.Context) func(string, string)

func (*SCloudaccount) ValidateDeleteCondition

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

func (*SCloudaccount) ValidateUpdateData

type SCloudaccountManager

var CloudaccountManager *SCloudaccountManager

func (*SCloudaccountManager) AutoSyncCloudaccountStatusTask

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

func (*SCloudaccountManager) FetchCloudaccountById

func (manager *SCloudaccountManager) FetchCloudaccountById(accountId string) *SCloudaccount

func (*SCloudaccountManager) FetchCloudaccountByIdOrName

func (manager *SCloudaccountManager) FetchCloudaccountByIdOrName(accountId string) *SCloudaccount

func (*SCloudaccountManager) FetchCustomizeColumns

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

func (*SCloudaccountManager) FetchEsxiZoneIds

func (manager *SCloudaccountManager) FetchEsxiZoneIds() ([]string, error)

func (*SCloudaccountManager) FilterByOwner

func (*SCloudaccountManager) InitializeData

func (manager *SCloudaccountManager) InitializeData() error

func (*SCloudaccountManager) ListItemFilter

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

云账号列表

func (*SCloudaccountManager) OrderByExtraFields

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

func (*SCloudaccountManager) PerformPrepareNets

Performpreparenets searches for suitable network facilities for physical and virtual machines under the cloud account or provides configuration recommendations for network facilities before importing a cloud account.

func (*SCloudaccountManager) QueryDistinctExtraField

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

func (*SCloudaccountManager) ValidateCreateData

type SCloudimageManager

var CloudimageManager *SCloudimageManager

type SCloudprovider

type SCloudprovider struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SProjectizedResourceBase

	SSyncableBaseResource

	// 云端服务健康状态。例如欠费、项目冻结都属于不健康状态。
	//
	// | HealthStatus  | 说明                 |
	// |---------------|----------------------|
	// | normal        | 远端处于健康状态     |
	// | insufficient  | 不足按需资源余额     |
	// | suspended     | 远端处于冻结状态     |
	// | arrears       | 远端处于欠费状态     |
	// | unknown       | 未知状态,查询失败   |
	// | no permission | 没有权限获取账单信息 |
	//
	HealthStatus string `width:"16" charset:"ascii" default:"normal" nullable:"false" list:"domain"`

	AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// 云账号的用户信息,例如用户名,access key等
	Account string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
	// 云账号的密码信息,例如密码,access key secret等。该字段在数据库加密存储。Google需要存储秘钥证书,需要此字段比较长
	Secret string `length:"0" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`

	// 归属云账号ID
	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`

	// 云账号的平台信息
	Provider string `width:"64" charset:"ascii" list:"domain" create:"domain_required"`

	SProjectMappingResourceBase
}

func (*SCloudprovider) CleanSchedCache

func (self *SCloudprovider) CleanSchedCache()

func (*SCloudprovider) ClearSchedDescCache

func (self *SCloudprovider) ClearSchedDescCache() error

func (*SCloudprovider) CustomizeDelete

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

func (*SCloudprovider) Delete

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

func (*SCloudprovider) GetCDNDomains

func (self *SCloudprovider) GetCDNDomains() ([]SCDNDomain, error)

func (*SCloudprovider) GetChangeOwnerCandidateDomainIds

func (provider *SCloudprovider) GetChangeOwnerCandidateDomainIds() []string

func (*SCloudprovider) GetCloudaccount

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

func (*SCloudprovider) GetCloudproviderRegions

func (provider *SCloudprovider) GetCloudproviderRegions() []SCloudproviderregion

func (*SCloudprovider) GetDetailsCannedAcls

func (*SCloudprovider) GetDetailsChangeOwnerCandidateDomains

func (provider *SCloudprovider) GetDetailsChangeOwnerCandidateDomains(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (apis.ChangeOwnerCandidateDomainsOutput, error)

func (*SCloudprovider) GetDetailsClirc

func (provider *SCloudprovider) GetDetailsClirc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudprovider) GetDetailsStorageClasses

func (*SCloudprovider) GetDomainAccessGroups

func (self *SCloudprovider) GetDomainAccessGroups() ([]SAccessGroup, error)

func (*SCloudprovider) GetDynamicConditionInput

func (self *SCloudprovider) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SCloudprovider) GetExternalProjectsByProjectIdOrName

func (self *SCloudprovider) GetExternalProjectsByProjectIdOrName(projectId, name string) ([]SExternalProject, error)

func (*SCloudprovider) GetGlobalVpcs

func (self *SCloudprovider) GetGlobalVpcs() ([]SGlobalVpc, error)

func (*SCloudprovider) GetGuestCount

func (self *SCloudprovider) GetGuestCount() (int, error)

func (*SCloudprovider) GetHostCount

func (self *SCloudprovider) GetHostCount() (int, error)

func (*SCloudprovider) GetInterVpcNetworks

func (self *SCloudprovider) GetInterVpcNetworks() ([]SInterVpcNetwork, error)

func (*SCloudprovider) GetProjectMapping

func (self *SCloudprovider) GetProjectMapping() (*SProjectMapping, error)

func (*SCloudprovider) GetProvider

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

func (*SCloudprovider) GetProviderFactory

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

func (*SCloudprovider) GetRegionByExternalIdPrefix

func (self *SCloudprovider) GetRegionByExternalIdPrefix(prefix string) ([]SCloudregion, error)

func (*SCloudprovider) GetRegionDriver

func (self *SCloudprovider) GetRegionDriver() (IRegionDriver, error)

func (*SCloudprovider) GetSchedtagJointManager

func (self *SCloudprovider) GetSchedtagJointManager() ISchedtagJointManager

func (*SCloudprovider) GetSchedtags

func (self *SCloudprovider) GetSchedtags() []SSchedtag

func (*SCloudprovider) IsAvailable

func (self *SCloudprovider) IsAvailable() bool

func (*SCloudprovider) IsSharable

func (provider *SCloudprovider) IsSharable(reqUsrId mcclient.IIdentityProvider) bool

func (*SCloudprovider) PerformChangeProject

func (*SCloudprovider) PerformDisable

func (*SCloudprovider) PerformEnable

func (*SCloudprovider) PerformProjectMapping

绑定同步策略

func (*SCloudprovider) PerformSetSchedtag

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

func (*SCloudprovider) PerformSetSyncing

func (self *SCloudprovider) PerformSetSyncing(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.CloudproviderSync) (jsonutils.JSONObject, error)

func (*SCloudprovider) PerformSync

func (*SCloudprovider) RealDelete

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

func (*SCloudprovider) StartCloudproviderDeleteTask

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

func (*SCloudprovider) StartSyncCloudProviderInfoTask

func (self *SCloudprovider) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, syncRange *SSyncRange, parentTaskId string) error

func (*SCloudprovider) SyncAzureProject

func (self *SCloudprovider) SyncAzureProject(ctx context.Context, userCred mcclient.TokenCredential, id string) (string, error)

func (*SCloudprovider) SyncCDNDomains

func (*SCloudprovider) SyncCallSyncCloudproviderRegions

func (provider *SCloudprovider) SyncCallSyncCloudproviderRegions(ctx context.Context, userCred mcclient.TokenCredential, syncRange SSyncRange)

func (*SCloudprovider) SyncGlobalVpcs

func (*SCloudprovider) SyncProject

func (self *SCloudprovider) SyncProject(ctx context.Context, userCred mcclient.TokenCredential, id string) (string, error)

func (*SCloudprovider) ValidateDeleteCondition

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

func (*SCloudprovider) ValidateUpdateData

type SCloudproviderCapability

type SCloudproviderCapability struct {
	db.SResourceBase

	CloudproviderId string `width:"36" charset:"ascii" nullable:"false" primary:"true"`
	CloudregionId   string `width:"36" charset:"ascii" nullable:"false" default:"" primary:"true"`
	Capability      string `width:"36" charset:"ascii" nullable:"false" primary:"true"`
}

func (*SCloudproviderCapability) GetId

func (self *SCloudproviderCapability) GetId() string

func (*SCloudproviderCapability) GetName

func (self *SCloudproviderCapability) GetName() string

type SCloudproviderCapabilityManager

type SCloudproviderCapabilityManager struct {
	db.SResourceBaseManager
}

+onecloud:swagger-gen-ignore

var CloudproviderCapabilityManager *SCloudproviderCapabilityManager

type SCloudproviderManager

var CloudproviderManager *SCloudproviderManager

func (*SCloudproviderManager) FetchCloudproviderById

func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider

func (*SCloudproviderManager) FetchCloudproviderByIdOrName

func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider

func (*SCloudproviderManager) FetchCustomizeColumns

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

func (*SCloudproviderManager) FilterByOwner

func (*SCloudproviderManager) GetOnPremiseProviderIdsQuery

func (manager *SCloudproviderManager) GetOnPremiseProviderIdsQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetOnPremiseProviderProvidersQuery

func (manager *SCloudproviderManager) GetOnPremiseProviderProvidersQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetPrivateOrOnPremiseProviderIdsQuery

func (manager *SCloudproviderManager) GetPrivateOrOnPremiseProviderIdsQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetPrivateProviderIdsQuery

func (manager *SCloudproviderManager) GetPrivateProviderIdsQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetPrivateProviderProvidersQuery

func (manager *SCloudproviderManager) GetPrivateProviderProvidersQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetProviderFieldQuery

func (manager *SCloudproviderManager) GetProviderFieldQuery(field string, isPublic tristate.TriState, isOnPremise tristate.TriState, providers []string, brands []string) *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetProviderIdsQuery

func (manager *SCloudproviderManager) GetProviderIdsQuery(isPublic tristate.TriState, isOnPremise tristate.TriState, providers []string, brands []string) *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetProviderProvidersQuery

func (manager *SCloudproviderManager) GetProviderProvidersQuery(isPublic tristate.TriState, isOnPremise tristate.TriState) *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetPublicProviderIdsQuery

func (manager *SCloudproviderManager) GetPublicProviderIdsQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) GetPublicProviderProvidersQuery

func (manager *SCloudproviderManager) GetPublicProviderProvidersQuery() *sqlchemy.SSubQuery

func (*SCloudproviderManager) InitializeData

func (manager *SCloudproviderManager) InitializeData() error

func (*SCloudproviderManager) IsProviderAccountEnabled

func (manager *SCloudproviderManager) IsProviderAccountEnabled(providerId string) bool

func (*SCloudproviderManager) ListItemExportKeys

func (*SCloudproviderManager) ListItemFilter

云订阅列表

func (*SCloudproviderManager) OrderByExtraFields

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

func (*SCloudproviderManager) QueryDistinctExtraField

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

func (*SCloudproviderManager) ResourceScope

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

func (*SCloudproviderManager) ValidateCreateData

+onecloud:swagger-gen-ignore

type SCloudproviderQuota

type SCloudproviderQuota struct {
	db.SStandaloneResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase

	// 配额范围
	// cloudregion: 区域级别
	// cloudprovider: 云订阅级别
	QuotaRange string `width:"32" charset:"ascii" list:"user"`

	// 已使用的配额
	// -1代表未从云平台拿到已使用配额信息
	UsedCount int `nullable:"false" default:"0" list:"user"`

	// 最大配额限制
	MaxCount int `nullable:"false" default:"0" list:"user"`

	// 配额类型
	QuotaType string `width:"32" charset:"ascii" list:"user"`
}

func (*SCloudproviderQuota) SyncWithCloudQuota

func (self *SCloudproviderQuota) SyncWithCloudQuota(ctx context.Context, userCred mcclient.TokenCredential, iQuota cloudprovider.ICloudQuota) error

type SCloudproviderQuotaManager

+onecloud:swagger-gen-ignore

var CloudproviderQuotaManager *SCloudproviderQuotaManager

func (*SCloudproviderQuotaManager) FetchCustomizeColumns

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

func (*SCloudproviderQuotaManager) GetContextManagers

func (manager *SCloudproviderQuotaManager) GetContextManagers() [][]db.IModelManager

func (*SCloudproviderQuotaManager) GetQuotas

func (manager *SCloudproviderQuotaManager) GetQuotas(provider *SCloudprovider, region *SCloudregion, quotaRange string) ([]SCloudproviderQuota, error)

func (*SCloudproviderQuotaManager) ListItemExportKeys

func (*SCloudproviderQuotaManager) ListItemFilter

func (*SCloudproviderQuotaManager) OrderByExtraFields

func (*SCloudproviderQuotaManager) QueryDistinctExtraField

func (man *SCloudproviderQuotaManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SCloudproviderQuotaManager) SyncQuotas

func (manager *SCloudproviderQuotaManager) SyncQuotas(ctx context.Context, userCred mcclient.TokenCredential, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider, region *SCloudregion, quotaRange string, iQuotas []cloudprovider.ICloudQuota) compare.SyncResult

type SCloudproviderResourceBase

type SCloudproviderResourceBase struct {
	CloudproviderId string `width:"36" charset:"ascii" nullable:"true" list:"user" index:"true" create:"optional"`
}

type SCloudproviderResourceBaseManager

type SCloudproviderResourceBaseManager struct{}

type SCloudproviderregion

type SCloudproviderregion struct {
	db.SJointResourceBase

	SSyncableBaseResource

	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"domain"`

	// 云订阅ID
	CloudproviderId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`

	Enabled bool `nullable:"false" list:"domain" update:"domain"`

	// SyncIntervalSeconds int `list:"domain"`
	SyncResults jsonutils.JSONObject `list:"domain"`

	LastDeepSyncAt time.Time `list:"domain"`
	LastAutoSyncAt time.Time `list:"domain"`
}

func (*SCloudproviderregion) Delete

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

func (*SCloudproviderregion) Detach

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

func (*SCloudproviderregion) DoSync

func (self *SCloudproviderregion) DoSync(ctx context.Context, userCred mcclient.TokenCredential, syncRange SSyncRange) error

func (*SCloudproviderregion) GetAccount

func (self *SCloudproviderregion) GetAccount() (*SCloudaccount, error)

func (*SCloudproviderregion) GetProvider

func (self *SCloudproviderregion) GetProvider() (*SCloudprovider, error)

func (*SCloudproviderregion) PostUpdate

func (*SCloudproviderregion) ValidateCreateData

func (*SCloudproviderregion) ValidateDeleteCondition

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

type SCloudproviderregionManager

var CloudproviderRegionManager *SCloudproviderregionManager

func (*SCloudproviderregionManager) FetchByIds

func (manager *SCloudproviderregionManager) FetchByIds(providerId string, regionId string) *SCloudproviderregion

func (*SCloudproviderregionManager) FetchByIdsOrCreate

func (manager *SCloudproviderregionManager) FetchByIdsOrCreate(providerId string, regionId string) *SCloudproviderregion

func (*SCloudproviderregionManager) FetchCustomizeColumns

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

func (*SCloudproviderregionManager) GetMasterFieldName

func (manager *SCloudproviderregionManager) GetMasterFieldName() string

func (*SCloudproviderregionManager) GetSlaveFieldName

func (manager *SCloudproviderregionManager) GetSlaveFieldName() string

func (*SCloudproviderregionManager) ListItemExportKeys

func (*SCloudproviderregionManager) ListItemFilter

func (*SCloudproviderregionManager) OrderByExtraFields

func (*SCloudproviderregionManager) QueryDistinctExtraField

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

func (*SCloudproviderregionManager) QueryRelatedRegionIds

func (manager *SCloudproviderregionManager) QueryRelatedRegionIds(cloudAccounts []string, providerIds ...string) *sqlchemy.SSubQuery

过滤出指定cloudAccountId || providerIds || cloudAccountId+providerIds关联的region id

type SCloudproviderschedtag

type SCloudproviderschedtag struct {
	SSchedtagJointsBase
	SCloudproviderResourceBase
}

func (*SCloudproviderschedtag) Delete

func (*SCloudproviderschedtag) Detach

func (*SCloudproviderschedtag) GetDetails

func (obj *SCloudproviderschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SCloudproviderschedtag) GetResourceId

func (obj *SCloudproviderschedtag) GetResourceId() string

type SCloudproviderschedtagManager

type SCloudproviderschedtagManager struct {
	*SSchedtagJointsManager
	SCloudproviderResourceBaseManager
}
var (
	CloudproviderschedtagManager *SCloudproviderschedtagManager
)

func (*SCloudproviderschedtagManager) GetMasterFieldName

func (m *SCloudproviderschedtagManager) GetMasterFieldName() string

func (*SCloudproviderschedtagManager) ListItemFilter

type SCloudregion

type SCloudregion struct {
	db.SEnabledStatusStandaloneResourceBase
	SI18nResourceBase
	SManagedResourceBase
	db.SExternalizedResourceBase

	cloudprovider.SGeographicInfo

	// 云环境
	// example: ChinaCloud
	Environment string `width:"32" charset:"ascii" list:"user"`
	// 云平台
	// example: Huawei
	Provider string `width:"64" charset:"ascii" list:"user" nullable:"false" default:"OneCloud"`
}

func (*SCloudregion) AllowGetDetailsCapability

func (self *SCloudregion) AllowGetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCloudregion) AllowGetDetailsDiskCapability

func (self *SCloudregion) AllowGetDetailsDiskCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCloudregion) ClearSchedDescCache

func (self *SCloudregion) ClearSchedDescCache() error

func (*SCloudregion) CustomizeCreate

func (self *SCloudregion) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SCloudregion) GetAccessGroupCaches

func (self *SCloudregion) GetAccessGroupCaches() ([]SAccessGroupCache, error)

func (*SCloudregion) GetApps

func (self *SCloudregion) GetApps(managerId string) ([]SApp, error)

func (*SCloudregion) GetCloudEnv

func (self *SCloudregion) GetCloudEnv() string

func (*SCloudregion) GetCloudimages

func (self *SCloudregion) GetCloudimages() ([]SCloudimage, error)

func (*SCloudregion) GetCloudprovider

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

func (*SCloudregion) GetCloudproviderVpcs

func (self *SCloudregion) GetCloudproviderVpcs(managerId string) ([]SVpc, error)

func (*SCloudregion) GetDBInstanceBackups

func (self *SCloudregion) GetDBInstanceBackups(provider *SCloudprovider, instance *SDBInstance) ([]SDBInstanceBackup, error)

func (*SCloudregion) GetDBInstanceSkus

func (self *SCloudregion) GetDBInstanceSkus() ([]SDBInstanceSku, error)

func (*SCloudregion) GetDBInstances

func (self *SCloudregion) GetDBInstances(provider *SCloudprovider) ([]SDBInstance, error)

func (*SCloudregion) GetDetailsCapability

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

func (*SCloudregion) GetDetailsDiskCapability

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

func (*SCloudregion) GetDriver

func (self *SCloudregion) GetDriver() IRegionDriver

func (*SCloudregion) GetDynamicConditionInput

func (self *SCloudregion) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SCloudregion) GetElasticIps

func (self *SCloudregion) GetElasticIps(managerId, eipMode string) ([]SElasticip, error)

func (*SCloudregion) GetElasticSearchs

func (self *SCloudregion) GetElasticSearchs(managerId string) ([]SElasticSearch, error)

func (*SCloudregion) GetElasticcaches

func (self *SCloudregion) GetElasticcaches(provider *SCloudprovider) ([]SElasticcache, error)

func (*SCloudregion) GetFileSystems

func (self *SCloudregion) GetFileSystems() ([]SFileSystem, error)

func (*SCloudregion) GetGuestCount

func (self *SCloudregion) GetGuestCount() (int, error)

func (*SCloudregion) GetGuestIncrementCount

func (self *SCloudregion) GetGuestIncrementCount() (int, error)

func (*SCloudregion) GetI18N

func (self *SCloudregion) GetI18N(ctx context.Context) *jsonutils.JSONDict

func (*SCloudregion) GetIPSets

func (self *SCloudregion) GetIPSets(managerId string) ([]SWafIPSetCache, error)

func (*SCloudregion) GetKafkas

func (self *SCloudregion) GetKafkas(managerId string) ([]SKafka, error)

func (*SCloudregion) GetKubeClusters

func (self *SCloudregion) GetKubeClusters(managerId string) ([]SKubeCluster, error)

func (*SCloudregion) GetModelartsPoolSkus

func (self *SCloudregion) GetModelartsPoolSkus() ([]SModelartsPoolSku, error)

func (*SCloudregion) GetMongoDBs

func (self *SCloudregion) GetMongoDBs(managerId string) ([]SMongoDB, error)

func (*SCloudregion) GetNasSkus

func (self *SCloudregion) GetNasSkus() ([]SNasSku, error)

func (*SCloudregion) GetNatSkus

func (self *SCloudregion) GetNatSkus() ([]SNatSku, error)

func (*SCloudregion) GetNetworkCount

func (self *SCloudregion) GetNetworkCount() (int, error)

func (*SCloudregion) GetNetworkInterfaces

func (self *SCloudregion) GetNetworkInterfaces() ([]SNetworkInterface, error)

func (*SCloudregion) GetPools

func (self *SCloudregion) GetPools(managerId string) ([]SModelartsPool, error)

func (*SCloudregion) GetRegexSets

func (self *SCloudregion) GetRegexSets(managerId string) ([]SWafRegexSetCache, error)

func (*SCloudregion) GetRegionCloudenvInfo

func (self *SCloudregion) GetRegionCloudenvInfo() api.CloudenvResourceInfo

func (*SCloudregion) GetRegionInfo

func (self *SCloudregion) GetRegionInfo(ctx context.Context) api.CloudregionResourceInfo

func (*SCloudregion) GetRuleGroups

func (self *SCloudregion) GetRuleGroups(managerId string) ([]SWafRuleGroupCache, error)

func (*SCloudregion) GetSchedtagJointManager

func (self *SCloudregion) GetSchedtagJointManager() ISchedtagJointManager

func (*SCloudregion) GetSchedtags

func (self *SCloudregion) GetSchedtags() []SSchedtag

func (*SCloudregion) GetServerSkus

func (self *SCloudregion) GetServerSkus() ([]SServerSku, error)

func (*SCloudregion) GetStoragecaches

func (self *SCloudregion) GetStoragecaches() ([]SStoragecache, error)

func (*SCloudregion) GetSystemImageCount

func (self *SCloudregion) GetSystemImageCount() (int, error)

func (*SCloudregion) GetTablestores

func (self *SCloudregion) GetTablestores() ([]STablestore, error)

func (*SCloudregion) GetVpcCount

func (self *SCloudregion) GetVpcCount() (int, error)

func (*SCloudregion) GetVpcQuery

func (self *SCloudregion) GetVpcQuery() *sqlchemy.SQuery

func (*SCloudregion) GetVpcs

func (self *SCloudregion) GetVpcs() ([]SVpc, error)

func (*SCloudregion) GetWafInstances

func (self *SCloudregion) GetWafInstances(managerId string) ([]SWafInstance, error)

func (*SCloudregion) GetZoneBySuffix

func (self *SCloudregion) GetZoneBySuffix(suffix string) (*SZone, error)

func (*SCloudregion) GetZoneCount

func (self *SCloudregion) GetZoneCount() (int, error)

func (*SCloudregion) GetZoneQuery

func (self *SCloudregion) GetZoneQuery() *sqlchemy.SQuery

func (*SCloudregion) GetZones

func (self *SCloudregion) GetZones() ([]SZone, error)

func (*SCloudregion) PerformDefaultVpc

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

func (*SCloudregion) PerformSetSchedtag

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

func (*SCloudregion) PerformSyncImages

func (self *SCloudregion) PerformSyncImages(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SyncImagesInput) (jsonutils.JSONObject, error)

func (*SCloudregion) StartSyncImagesTask

func (self *SCloudregion) StartSyncImagesTask(ctx context.Context, userCred mcclient.TokenCredential, parentId string) error

func (*SCloudregion) SyncAccessGroups

func (self *SCloudregion) SyncAccessGroups(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, iAccessGroups []cloudprovider.ICloudAccessGroup) compare.SyncResult

func (*SCloudregion) SyncApps

func (*SCloudregion) SyncCloudImages

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

func (*SCloudregion) SyncDBInstanceSkus

func (self *SCloudregion) SyncDBInstanceSkus(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudDBInstanceSku) compare.SyncResult

func (*SCloudregion) SyncElasticSearchs

func (self *SCloudregion) SyncElasticSearchs(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudElasticSearch) compare.SyncResult

func (*SCloudregion) SyncFileSystems

func (*SCloudregion) SyncKafkas

func (*SCloudregion) SyncModelartsPoolSkus

func (self *SCloudregion) SyncModelartsPoolSkus(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudModelartsPoolSku) compare.SyncResult

func (*SCloudregion) SyncModelartsPools

func (self *SCloudregion) SyncModelartsPools(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudModelartsPool) compare.SyncResult

func (*SCloudregion) SyncMongoDBs

func (*SCloudregion) SyncNasSkus

func (self *SCloudregion) SyncNasSkus(ctx context.Context, userCred mcclient.TokenCredential, meta *SSkuResourcesMeta) compare.SyncResult

func (*SCloudregion) SyncNatSkus

func (self *SCloudregion) SyncNatSkus(ctx context.Context, userCred mcclient.TokenCredential, meta *SSkuResourcesMeta) compare.SyncResult

func (*SCloudregion) SyncPrivateCloudNatSkus

func (self *SCloudregion) SyncPrivateCloudNatSkus(ctx context.Context, userCred mcclient.TokenCredential, iskus []cloudprovider.ICloudNatSku) compare.SyncResult

func (*SCloudregion) SyncTablestores

func (self *SCloudregion) SyncTablestores(ctx context.Context, userCred mcclient.TokenCredential, exts []cloudprovider.ICloudTablestore, provider *SCloudprovider) compare.SyncResult

func (*SCloudregion) SyncVpcs

func (self *SCloudregion) SyncVpcs(ctx context.Context, userCred mcclient.TokenCredential, iregion cloudprovider.ICloudRegion, provider *SCloudprovider) error

func (*SCloudregion) SyncWafIPSets

func (self *SCloudregion) SyncWafIPSets(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudWafIPSet) compare.SyncResult

func (*SCloudregion) SyncWafRegexSets

func (self *SCloudregion) SyncWafRegexSets(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudWafRegexSet) compare.SyncResult

func (*SCloudregion) SyncWafRuleGroups

func (self *SCloudregion) SyncWafRuleGroups(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, exts []cloudprovider.ICloudWafRuleGroup) compare.SyncResult

func (*SCloudregion) ValidateDeleteCondition

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

func (*SCloudregion) ValidateUpdateCondition

func (self *SCloudregion) ValidateUpdateCondition(ctx context.Context) error

type SCloudregionManager

var CloudregionManager *SCloudregionManager

func (*SCloudregionManager) FetchCustomizeColumns

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

func (*SCloudregionManager) FetchDefaultRegion

func (manager *SCloudregionManager) FetchDefaultRegion() *SCloudregion

func (*SCloudregionManager) FetchRegionById

func (manager *SCloudregionManager) FetchRegionById(id string) *SCloudregion

func (*SCloudregionManager) GetPropertySyncTasks

func (manager *SCloudregionManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SCloudregionManager) GetRegionByProvider

func (manager *SCloudregionManager) GetRegionByProvider(provider string) ([]SCloudregion, error)

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 api.CloudregionListInput,
) (*sqlchemy.SQuery, error)

云平台区域列表

func (*SCloudregionManager) OrderByExtraFields

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

func (*SCloudregionManager) PerformSyncSkus

func (*SCloudregionManager) QueryDistinctExtraField

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

func (*SCloudregionManager) SyncRegions

func (manager *SCloudregionManager) SyncRegions(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cloudProvider *SCloudprovider,
	externalIdPrefix string,
	regions []cloudprovider.ICloudRegion,
) (
	[]SCloudregion,
	[]cloudprovider.ICloudRegion,
	[]SCloudproviderregion,
	compare.SyncResult,
)

type SCloudregionResourceBase

type SCloudregionResourceBase struct {
	// 归属区域ID
	CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"user" default:"default" create:"optional" json:"cloudregion_id"`
}

func (*SCloudregionResourceBase) GetRegion

func (self *SCloudregionResourceBase) GetRegion() (*SCloudregion, error)

func (*SCloudregionResourceBase) GetZoneBySuffix

func (self *SCloudregionResourceBase) GetZoneBySuffix(suffix string) (*SZone, error)

type SCloudregionResourceBaseManager

type SCloudregionResourceBaseManager struct{}

func (*SCloudregionResourceBaseManager) FetchCustomizeColumns

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

func (*SCloudregionResourceBaseManager) GetExportKeys

func (manager *SCloudregionResourceBaseManager) GetExportKeys() []string

func (*SCloudregionResourceBaseManager) GetOrderByFields

func (manager *SCloudregionResourceBaseManager) GetOrderByFields(query api.RegionalFilterListInput) []string

func (*SCloudregionResourceBaseManager) GetOrderBySubQuery

func (*SCloudregionResourceBaseManager) ListItemExportKeys

func (*SCloudregionResourceBaseManager) ListItemFilter

func (*SCloudregionResourceBaseManager) OrderByExtraFields

func (*SCloudregionResourceBaseManager) QueryDistinctExtraField

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

type SCloudregionschedtag

type SCloudregionschedtag struct {
	SSchedtagJointsBase
	SCloudregionResourceBase
}

func (*SCloudregionschedtag) Delete

func (*SCloudregionschedtag) Detach

func (*SCloudregionschedtag) GetDetails

func (obj *SCloudregionschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SCloudregionschedtag) GetResourceId

func (obj *SCloudregionschedtag) GetResourceId() string

type SCloudregionschedtagManager

type SCloudregionschedtagManager struct {
	*SSchedtagJointsManager
	// contains filtered or unexported fields
}
var (
	CloudregionschedtagManager *SCloudregionschedtagManager
)

func (*SCloudregionschedtagManager) GetMasterFieldName

func (m *SCloudregionschedtagManager) GetMasterFieldName() string

func (*SCloudregionschedtagManager) ListItemFilter

type SComputeResourceKeys

type SComputeResourceKeys struct {
	quotas.SZonalCloudResourceKeys

	// 主机配额适用的主机类型,参考主机List的Hypervisor列表
	Hypervisor string `width:"16" charset:"ascii" nullable:"false" primary:"true" list:"user"`
}

func (SComputeResourceKeys) Compare

func (k1 SComputeResourceKeys) Compare(ik quotas.IQuotaKeys) int

func (SComputeResourceKeys) Fields

func (k SComputeResourceKeys) Fields() []string

func (SComputeResourceKeys) Values

func (k SComputeResourceKeys) Values() []string

type SDBInstance

type SDBInstance struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase

	SCloudregionResourceBase
	SDeletePreventableResourceBase

	// 主实例Id
	MasterInstanceId string `width:"128" charset:"ascii" list:"user" create:"optional"`
	// CPU数量
	// example: 1
	VcpuCount int `nullable:"false" default:"1" list:"user" create:"optional"`
	// 内存大小
	// example: 1024
	VmemSizeMb int `nullable:"false" list:"user" create:"required"`
	// 存储类型
	// example: local_ssd
	StorageType string `nullable:"false" list:"user" create:"required"`
	// 存储大小
	// example: 10240
	DiskSizeGB int `nullable:"false" list:"user" create:"required"`
	// 已使用的存储大小
	DiskSizeUsedMB int `nullable:"false" list:"user"`
	// 端口
	// example: 3306
	Port int `nullable:"false" list:"user" create:"optional"`
	// 实例类型
	// example: ha
	Category string `nullable:"false" list:"user" create:"optional"`

	// 最大连接数
	Iops int `nullable:"true" list:"user" create:"optional"`

	// 引擎
	// example: MySQL
	Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 引擎版本
	// example: 5.7
	EngineVersion string `width:"64" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 套餐名称
	// example: mysql.x4.large.2c
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`

	// 维护时间
	MaintainTime string `width:"64" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 虚拟私有网络Id
	// example: ed20d84e-3158-41b1-870c-1725e412e8b6
	VpcId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`

	// 外部连接地址
	ConnectionStr string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	// 内部连接地址
	InternalConnectionStr string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 可用区1
	Zone1 string `width:"36" charset:"ascii" nullable:"false" create:"optional" list:"user"`
	// 可用区2
	Zone2 string `width:"36" charset:"ascii" nullable:"false" create:"optional" list:"user"`
	// 可用区3
	Zone3 string `width:"36" charset:"ascii" nullable:"false" create:"optional" list:"user"`

	// 从备份创建新实例
	DBInstancebackupId string `width:"36" name:"dbinstancebackup_id" charset:"ascii" nullable:"false" create:"optional"`
}

func (*SDBInstance) AssignSecgroup

func (self *SDBInstance) AssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, id string) error

func (*SDBInstance) CancelExpireTime

func (self *SDBInstance) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDBInstance) CustomizeDelete

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

func (*SDBInstance) Delete

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

func (*SDBInstance) GetAvailableDBInstanceSkus

func (self *SDBInstance) GetAvailableDBInstanceSkus(skipZoneCheck bool) ([]SDBInstanceSku, error)

func (*SDBInstance) GetAvailableInstanceTypes

func (self *SDBInstance) GetAvailableInstanceTypes() ([]cloudprovider.SInstanceType, error)

func (*SDBInstance) GetDBDatabases

func (self *SDBInstance) GetDBDatabases() ([]SDBInstanceDatabase, error)

func (*SDBInstance) GetDBInstanceAccount

func (self *SDBInstance) GetDBInstanceAccount(name string) (*SDBInstanceAccount, error)

func (*SDBInstance) GetDBInstanceAccounts

func (self *SDBInstance) GetDBInstanceAccounts() ([]SDBInstanceAccount, error)

func (*SDBInstance) GetDBInstanceBackup

func (self *SDBInstance) GetDBInstanceBackup(name string) (*SDBInstanceBackup, error)

func (*SDBInstance) GetDBInstanceBackupByMode

func (self *SDBInstance) GetDBInstanceBackupByMode(mode string) ([]SDBInstanceBackup, error)

func (*SDBInstance) GetDBInstanceBackups

func (self *SDBInstance) GetDBInstanceBackups() ([]SDBInstanceBackup, error)

func (*SDBInstance) GetDBInstanceDatabase

func (self *SDBInstance) GetDBInstanceDatabase(name string) (*SDBInstanceDatabase, error)

func (*SDBInstance) GetDBInstanceDatabases

func (self *SDBInstance) GetDBInstanceDatabases() ([]SDBInstanceDatabase, error)

func (*SDBInstance) GetDBInstanceParameters

func (self *SDBInstance) GetDBInstanceParameters() ([]SDBInstanceParameter, error)

func (*SDBInstance) GetDBInstancePrivilege

func (self *SDBInstance) GetDBInstancePrivilege(account, database string) (*SDBInstancePrivilege, error)

func (*SDBInstance) GetDBInstanceSecgroups

func (self *SDBInstance) GetDBInstanceSecgroups() ([]SDBInstanceSecgroup, error)

func (*SDBInstance) GetDBInstanceSkuQuery

func (self *SDBInstance) GetDBInstanceSkuQuery(skipZoneCheck bool) *sqlchemy.SQuery

func (*SDBInstance) GetDBInstanceSkus

func (self *SDBInstance) GetDBInstanceSkus(skipZoneCheck bool) ([]SDBInstanceSku, error)

func (*SDBInstance) GetDBNetworks

func (self *SDBInstance) GetDBNetworks() ([]SDBInstanceNetwork, error)

func (*SDBInstance) GetDBParameters

func (self *SDBInstance) GetDBParameters() ([]SDBInstanceParameter, error)

func (*SDBInstance) GetExpiredAt

func (self *SDBInstance) GetExpiredAt() time.Time

func (*SDBInstance) GetIDBInstance

func (self *SDBInstance) GetIDBInstance(ctx context.Context) (cloudprovider.ICloudDBInstance, error)

func (*SDBInstance) GetIRegion

func (self *SDBInstance) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SDBInstance) GetMasterInstance

func (self *SDBInstance) GetMasterInstance() (*SDBInstance, error)

func (*SDBInstance) GetQuotaKeys

func (self *SDBInstance) GetQuotaKeys() quotas.IQuotaKeys

func (*SDBInstance) GetSecgroups

func (self *SDBInstance) GetSecgroups() ([]SSecurityGroup, error)

func (*SDBInstance) GetShortDesc

func (self *SDBInstance) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SDBInstance) GetSlaveDBInstances

func (self *SDBInstance) GetSlaveDBInstances() ([]SDBInstance, error)

func (*SDBInstance) GetUsages

func (dbinstance *SDBInstance) GetUsages() []db.IUsage

func (*SDBInstance) GetVpc

func (self *SDBInstance) GetVpc() (*SVpc, error)

func (*SDBInstance) OnMetadataUpdated

func (self *SDBInstance) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SDBInstance) PerformCancelExpire

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

func (*SDBInstance) PerformChangeConfig

func (*SDBInstance) PerformChangeOwner

func (*SDBInstance) PerformPostpaidExpire

func (self *SDBInstance) PerformPostpaidExpire(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PostpaidExpireInput) (jsonutils.JSONObject, error)

func (*SDBInstance) PerformPublicConnection

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

func (*SDBInstance) PerformPurge

func (*SDBInstance) PerformReboot

func (*SDBInstance) PerformRecovery

func (*SDBInstance) PerformRemoteUpdate

func (*SDBInstance) PerformRenew

func (*SDBInstance) PerformSetAutoRenew

设置自动续费 要求RDS状态为running 要求RDS计费类型为包年包月(预付费)

func (*SDBInstance) PerformSetSecgroup

func (*SDBInstance) PerformSync

同步RDS信息

func (*SDBInstance) PerformSyncStatus

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

同步RDS状态(弃用)

func (*SDBInstance) PerformSyncstatus

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

同步RDS实例状态

func (*SDBInstance) PostCreate

func (*SDBInstance) PostUpdate

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

func (*SDBInstance) Purge

func (instance *SDBInstance) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDBInstance) PurgeBackups

func (instance *SDBInstance) PurgeBackups(ctx context.Context, userCred mcclient.TokenCredential, mode string) error

func (*SDBInstance) RealDelete

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

func (*SDBInstance) RevokeSecgroup

func (self *SDBInstance) RevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, id string) error

func (*SDBInstance) SaveRenewInfo

func (self *SDBInstance) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bc *billing.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SDBInstance) SetAutoRenew

func (self *SDBInstance) SetAutoRenew(autoRenew bool) error

func (*SDBInstance) SetDisableDelete

func (cache *SDBInstance) SetDisableDelete(userCred mcclient.TokenCredential, val bool) error

func (*SDBInstance) SetZoneIds

func (self *SDBInstance) SetZoneIds(extInstance cloudprovider.ICloudDBInstance) error

func (*SDBInstance) SetZoneInfo

func (self *SDBInstance) SetZoneInfo(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDBInstance) StartDBInstanceChangeConfig

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

func (*SDBInstance) StartDBInstanceCreateTask

func (self *SDBInstance) StartDBInstanceCreateTask(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

func (*SDBInstance) StartDBInstanceDeleteTask

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

func (*SDBInstance) StartDBInstancePublicConnectionTask

func (self *SDBInstance) StartDBInstancePublicConnectionTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, open bool) error

func (*SDBInstance) StartDBInstanceRebootTask

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

func (*SDBInstance) StartDBInstanceRecoveryTask

func (self *SDBInstance) StartDBInstanceRecoveryTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SDBInstance) StartDBInstanceRenewTask

func (self *SDBInstance) StartDBInstanceRenewTask(ctx context.Context, userCred mcclient.TokenCredential, duration string, parentTaskId string) error

func (*SDBInstance) StartDBInstanceSyncTask

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

func (*SDBInstance) StartRemoteUpdateTask

func (self *SDBInstance) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SDBInstance) StartSetAutoRenewTask

func (self *SDBInstance) StartSetAutoRenewTask(ctx context.Context, userCred mcclient.TokenCredential, autoRenew bool, parentTaskId string) error

func (*SDBInstance) StartSyncSecgroupsTask

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

func (*SDBInstance) SyncAllWithCloudDBInstance

func (self *SDBInstance) SyncAllWithCloudDBInstance(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extInstance cloudprovider.ICloudDBInstance) error

func (*SDBInstance) SyncWithCloudDBInstance

func (self *SDBInstance) SyncWithCloudDBInstance(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, ext cloudprovider.ICloudDBInstance) error

func (*SDBInstance) ValidateDeleteCondition

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

type SDBInstanceAccount

type SDBInstanceAccount struct {
	db.SStatusStandaloneResourceBase

	Host string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"optional" default:"%"`

	SDBInstanceResourceBase `width:"36" charset:"ascii" name:"dbinstance_id" nullable:"false" list:"user" create:"required" index:"true"`

	// 数据库密码
	Secret string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"optional"`
}

func (*SDBInstanceAccount) CustomizeDelete

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

func (*SDBInstanceAccount) Delete

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

func (*SDBInstanceAccount) GetDBInstanceDatabaseByName

func (self *SDBInstanceAccount) GetDBInstanceDatabaseByName(dbName string) (*SDBInstanceDatabase, error)

func (*SDBInstanceAccount) GetDBInstancePrivileges

func (self *SDBInstanceAccount) GetDBInstancePrivileges() ([]SDBInstancePrivilege, error)

func (*SDBInstanceAccount) GetOwnerId

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

func (*SDBInstanceAccount) GetPassword

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

func (*SDBInstanceAccount) GetUniqValues

func (self *SDBInstanceAccount) GetUniqValues() jsonutils.JSONObject

func (*SDBInstanceAccount) PerformGrantPrivilege

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

func (*SDBInstanceAccount) PerformResetPassword

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

func (*SDBInstanceAccount) PerformRevokePrivilege

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

func (*SDBInstanceAccount) PerformSetPrivileges

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

func (*SDBInstanceAccount) PostCreate

func (*SDBInstanceAccount) Purge

func (account *SDBInstanceAccount) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDBInstanceAccount) RealDelete

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

func (*SDBInstanceAccount) SetPassword

func (self *SDBInstanceAccount) SetPassword(passwd string) error

func (*SDBInstanceAccount) StartDBInstanceAccountCreateTask

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

func (*SDBInstanceAccount) StartDBInstanceAccountDeleteTask

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

func (*SDBInstanceAccount) StartDBInstanceAccountResetPasswordTask

func (self *SDBInstanceAccount) StartDBInstanceAccountResetPasswordTask(ctx context.Context, userCred mcclient.TokenCredential, password string) error

func (*SDBInstanceAccount) StartGrantPrivilegeTask

func (self *SDBInstanceAccount) StartGrantPrivilegeTask(ctx context.Context, userCred mcclient.TokenCredential, database string, privilege string, parentTaskId string) error

func (*SDBInstanceAccount) StartRevokePrivilegeTask

func (self *SDBInstanceAccount) StartRevokePrivilegeTask(ctx context.Context, userCred mcclient.TokenCredential, database string, privilege string, parentTaskId string) error

func (*SDBInstanceAccount) StartSetPrivilegesTask

func (self *SDBInstanceAccount) StartSetPrivilegesTask(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

func (*SDBInstanceAccount) SyncWithCloudDBInstanceAccount

func (self *SDBInstanceAccount) SyncWithCloudDBInstanceAccount(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, extAccount cloudprovider.ICloudDBInstanceAccount) error

type SDBInstanceAccountManager

type SDBInstanceAccountManager struct {
	db.SStatusStandaloneResourceBaseManager
	SDBInstanceResourceBaseManager
}
var DBInstanceAccountManager *SDBInstanceAccountManager

func (*SDBInstanceAccountManager) FetchCustomizeColumns

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

func (*SDBInstanceAccountManager) FetchOwnerId

func (*SDBInstanceAccountManager) FetchUniqValues

func (*SDBInstanceAccountManager) FilterByOwner

func (*SDBInstanceAccountManager) FilterByUniqValues

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

func (*SDBInstanceAccountManager) GetContextManagers

func (manager *SDBInstanceAccountManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstanceAccountManager) InitializeData

func (manager *SDBInstanceAccountManager) InitializeData() error

func (*SDBInstanceAccountManager) ListItemExportKeys

func (*SDBInstanceAccountManager) ListItemFilter

RDS账号列表

func (*SDBInstanceAccountManager) OrderByExtraFields

func (*SDBInstanceAccountManager) QueryDistinctExtraField

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

func (*SDBInstanceAccountManager) ResourceScope

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

func (*SDBInstanceAccountManager) SyncDBInstanceAccounts

func (*SDBInstanceAccountManager) ValidateCreateData

type SDBInstanceBackup

type SDBInstanceBackup struct {
	db.SVirtualResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	db.SExternalizedResourceBase

	SDBInstanceResourceBase `width:"36" charset:"ascii" name:"dbinstance_id" nullable:"false" list:"user" create:"required" index:"true"`

	// RDS引擎
	// example: MySQL
	Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" json:"engine"`
	// RDS引擎版本
	// example: 5.7
	EngineVersion string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" json:"engine_version"`
	// 备份开始时间
	StartTime time.Time `list:"user" json:"start_time"`
	// 备份结束时间
	EndTime time.Time `list:"user" json:"end_time"`
	// 备份模式
	BackupMode string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"backup_mode"`
	// 备份数据库名称
	DBNames string `width:"512" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"db_names"`
	// 备份大小
	// example: 32
	BackupSizeMb int `nullable:"false" list:"user" json:"backup_size_mb"`

	// 备份方式 Logical|Physical
	BackupMethod string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"backup_method"`
}

func (*SDBInstanceBackup) CustomizeDelete

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

func (*SDBInstanceBackup) Delete

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

func (*SDBInstanceBackup) GetChangeOwnerCandidateDomainIds

func (self *SDBInstanceBackup) GetChangeOwnerCandidateDomainIds() []string

func (*SDBInstanceBackup) GetCloudprovider

func (self *SDBInstanceBackup) GetCloudprovider() *SCloudprovider

func (*SDBInstanceBackup) GetDBInstance

func (self *SDBInstanceBackup) GetDBInstance() (*SDBInstance, error)

func (*SDBInstanceBackup) GetIDBInstanceBackup

func (backup *SDBInstanceBackup) GetIDBInstanceBackup(ctx context.Context) (cloudprovider.ICloudDBInstanceBackup, error)

func (*SDBInstanceBackup) GetIRegion

func (backup *SDBInstanceBackup) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SDBInstanceBackup) PerformSyncstatus

同步RDS备份状态

func (*SDBInstanceBackup) PostCreate

func (*SDBInstanceBackup) RealDelete

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

func (*SDBInstanceBackup) StartDBInstanceBackupCreateTask

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

func (*SDBInstanceBackup) StartDBInstanceBackupDeleteTask

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

func (*SDBInstanceBackup) SyncWithCloudDBInstanceBackup

func (self *SDBInstanceBackup) SyncWithCloudDBInstanceBackup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	extBackup cloudprovider.ICloudDBInstanceBackup,
	provider *SCloudprovider,
) error

type SDBInstanceBackupManager

var DBInstanceBackupManager *SDBInstanceBackupManager

func (*SDBInstanceBackupManager) FetchCustomizeColumns

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

func (*SDBInstanceBackupManager) GetContextManagers

func (manager *SDBInstanceBackupManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstanceBackupManager) ListItemExportKeys

func (*SDBInstanceBackupManager) ListItemFilter

RDS备份列表

func (*SDBInstanceBackupManager) OrderByExtraFields

func (*SDBInstanceBackupManager) QueryDistinctExtraField

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

func (*SDBInstanceBackupManager) SyncDBInstanceBackups

func (manager *SDBInstanceBackupManager) SyncDBInstanceBackups(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, instance *SDBInstance, region *SCloudregion, cloudBackups []cloudprovider.ICloudDBInstanceBackup) compare.SyncResult

func (*SDBInstanceBackupManager) ValidateCreateData

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SDBInstanceResourceBase `width:"36" charset:"ascii" name:"dbinstance_id" nullable:"false" list:"user" create:"required" index:"true"`

	// 字符集
	// example: utf-8
	CharacterSet string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"character_set"`
}

func (*SDBInstanceDatabase) CustomizeDelete

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

func (*SDBInstanceDatabase) Delete

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

func (*SDBInstanceDatabase) GetDBInstance

func (self *SDBInstanceDatabase) GetDBInstance() (*SDBInstance, error)

func (*SDBInstanceDatabase) GetDBInstancePrivileges

func (self *SDBInstanceDatabase) GetDBInstancePrivileges() ([]SDBInstancePrivilege, error)

func (*SDBInstanceDatabase) GetOwnerId

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

func (*SDBInstanceDatabase) GetUniqValues

func (self *SDBInstanceDatabase) GetUniqValues() jsonutils.JSONObject

func (*SDBInstanceDatabase) PostCreate

func (*SDBInstanceDatabase) Purge

func (database *SDBInstanceDatabase) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDBInstanceDatabase) RealDelete

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

func (*SDBInstanceDatabase) StartDBInstanceDatabaseCreateTask

func (self *SDBInstanceDatabase) StartDBInstanceDatabaseCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SDBInstanceDatabase) StartDBInstanceDatabaseDeleteTask

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

func (*SDBInstanceDatabase) SyncWithCloudDBInstanceDatabase

func (self *SDBInstanceDatabase) SyncWithCloudDBInstanceDatabase(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, extDatabase cloudprovider.ICloudDBInstanceDatabase) error

type SDBInstanceDatabaseManager

var DBInstanceDatabaseManager *SDBInstanceDatabaseManager

func (*SDBInstanceDatabaseManager) FetchCustomizeColumns

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

func (*SDBInstanceDatabaseManager) FetchOwnerId

func (*SDBInstanceDatabaseManager) FetchUniqValues

func (*SDBInstanceDatabaseManager) FilterByOwner

func (*SDBInstanceDatabaseManager) FilterByUniqValues

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

func (*SDBInstanceDatabaseManager) GetContextManagers

func (manager *SDBInstanceDatabaseManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstanceDatabaseManager) InitializeData

func (manager *SDBInstanceDatabaseManager) InitializeData() error

func (*SDBInstanceDatabaseManager) ListItemExportKeys

func (*SDBInstanceDatabaseManager) ListItemFilter

RDS数据库列表

func (*SDBInstanceDatabaseManager) OrderByExtraFields

func (*SDBInstanceDatabaseManager) QueryDistinctExtraField

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

func (*SDBInstanceDatabaseManager) ResourceScope

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

func (*SDBInstanceDatabaseManager) SyncDBInstanceDatabases

func (manager *SDBInstanceDatabaseManager) SyncDBInstanceDatabases(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, cloudDatabases []cloudprovider.ICloudDBInstanceDatabase) compare.SyncResult

func (*SDBInstanceDatabaseManager) ValidateCreateData

type SDBInstanceJointsBase

type SDBInstanceJointsBase struct {
	db.SVirtualJointResourceBase

	SDBInstanceResourceBase `width:"36" charset:"ascii" name:"dbinstance_id" nullable:"false" list:"user" create:"required" index:"true"`
}

type SDBInstanceJointsManager

type SDBInstanceJointsManager struct {
	db.SVirtualJointResourceBaseManager
	SDBInstanceResourceBaseManager
}

func NewDBInstanceJointsManager

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

func (*SDBInstanceJointsManager) GetMasterFieldName

func (manager *SDBInstanceJointsManager) GetMasterFieldName() string

func (*SDBInstanceJointsManager) ListItemFilter

func (*SDBInstanceJointsManager) OrderByExtraFields

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

type SDBInstanceManager

var DBInstanceManager *SDBInstanceManager

func (*SDBInstanceManager) BatchCreateValidateCreateData

func (manager *SDBInstanceManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.DBInstanceCreateInput) (api.DBInstanceCreateInput, error)

func (*SDBInstanceManager) DeleteExpiredPostpaids

func (manager *SDBInstanceManager) DeleteExpiredPostpaids(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SDBInstanceManager) FetchCustomizeColumns

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

func (*SDBInstanceManager) GetContextManagers

func (manager *SDBInstanceManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstanceManager) GetExpiredModels

func (manager *SDBInstanceManager) GetExpiredModels(advanceDay int) ([]IBillingModel, error)

func (*SDBInstanceManager) ListItemExportKeys

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

func (*SDBInstanceManager) ListItemFilter

RDS实例列表

func (*SDBInstanceManager) OrderByExtraFields

func (man *SDBInstanceManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.DBInstanceListInput,
) (*sqlchemy.SQuery, error)

func (*SDBInstanceManager) QueryDistinctExtraField

func (man *SDBInstanceManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SDBInstanceManager) SyncDBInstanceMasterId

func (manager *SDBInstanceManager) SyncDBInstanceMasterId(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, cloudDBInstances []cloudprovider.ICloudDBInstance)

func (*SDBInstanceManager) SyncDBInstances

func (*SDBInstanceManager) TotalCount

func (man *SDBInstanceManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (SRdsCountStat, error)

func (*SDBInstanceManager) ValidateCreateData

type SDBInstanceNetwork

type SDBInstanceNetwork struct {
	SDBInstanceJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	IpAddr    string `width:"16" charset:"ascii" nullable:"false" list:"user"`
}

func (*SDBInstanceNetwork) Detach

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

func (*SDBInstanceNetwork) GetNetwork

func (self *SDBInstanceNetwork) GetNetwork() (*SNetwork, error)

type SDBInstanceNetworkManager

type SDBInstanceNetworkManager struct {
	SDBInstanceJointsManager
	SNetworkResourceBaseManager
}
var DBInstanceNetworkManager *SDBInstanceNetworkManager

func (*SDBInstanceNetworkManager) GetSlaveFieldName

func (manager *SDBInstanceNetworkManager) GetSlaveFieldName() string

func (*SDBInstanceNetworkManager) InitializeData

func (manager *SDBInstanceNetworkManager) InitializeData() error

func (*SDBInstanceNetworkManager) ListItemFilter

RDS网络列表

func (*SDBInstanceNetworkManager) OrderByExtraFields

func (*SDBInstanceNetworkManager) SyncDBInstanceNetwork

func (manager *SDBInstanceNetworkManager) SyncDBInstanceNetwork(ctx context.Context, userCred mcclient.TokenCredential, dbinstance *SDBInstance, exts []cloudprovider.SDBInstanceNetwork) compare.SyncResult

type SDBInstanceParameter

type SDBInstanceParameter struct {
	db.SStandaloneResourceBase
	db.SExternalizedResourceBase
	SDBInstanceResourceBase `width:"36" charset:"ascii" name:"dbinstance_id" nullable:"false" list:"user" create:"required" index:"true"`

	// 数据库参数名称
	Key string `width:"64" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required" json:"key"`

	// 数据库参数值
	Value string `width:"256" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required" json:"value"`
}

func (*SDBInstanceParameter) SyncWithCloudDBInstanceParameter

func (self *SDBInstanceParameter) SyncWithCloudDBInstanceParameter(ctx context.Context, userCred mcclient.TokenCredential, extParameter cloudprovider.ICloudDBInstanceParameter) error

type SDBInstanceParameterManager

var DBInstanceParameterManager *SDBInstanceParameterManager

func (*SDBInstanceParameterManager) FetchCustomizeColumns

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

func (*SDBInstanceParameterManager) GetContextManagers

func (manager *SDBInstanceParameterManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstanceParameterManager) ListItemExportKeys

func (*SDBInstanceParameterManager) ListItemFilter

列出数据参数

func (*SDBInstanceParameterManager) OrderByExtraFields

func (*SDBInstanceParameterManager) QueryDistinctExtraField

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

func (*SDBInstanceParameterManager) SyncDBInstanceParameters

func (manager *SDBInstanceParameterManager) SyncDBInstanceParameters(ctx context.Context, userCred mcclient.TokenCredential, instance *SDBInstance, cloudParameters []cloudprovider.ICloudDBInstanceParameter) compare.SyncResult

func (*SDBInstanceParameterManager) ValidateCreateData

type SDBInstancePrivilege

type SDBInstancePrivilege struct {
	db.SResourceBase
	db.SExternalizedResourceBase

	Id                   string `width:"128" charset:"ascii" primary:"true" list:"user"`
	Privilege            string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required"`
	DBInstanceaccountId  string `width:"36" charset:"ascii" name:"dbinstanceaccount_id" nullable:"false" list:"user" create:"required"`
	DBInstancedatabaseId string `width:"36" charset:"ascii" name:"dbinstancedatabase_id" nullable:"false" list:"user" create:"required"`
}

func (*SDBInstancePrivilege) BeforeInsert

func (self *SDBInstancePrivilege) BeforeInsert()

func (*SDBInstancePrivilege) GetDBInstanceAccount

func (self *SDBInstancePrivilege) GetDBInstanceAccount() (*SDBInstanceAccount, error)

func (*SDBInstancePrivilege) GetDBInstanceDatabase

func (self *SDBInstancePrivilege) GetDBInstanceDatabase() (*SDBInstanceDatabase, error)

func (*SDBInstancePrivilege) GetPrivilege

func (self *SDBInstancePrivilege) GetPrivilege() (api.DBInstancePrivilege, error)

type SDBInstancePrivilegeManager

type SDBInstancePrivilegeManager struct {
	db.SResourceBaseManager
	db.SExternalizedResourceBaseManager
}
var DBInstancePrivilegeManager *SDBInstancePrivilegeManager

func (*SDBInstancePrivilegeManager) CreateByInsertOrUpdate

func (manager *SDBInstancePrivilegeManager) CreateByInsertOrUpdate() bool

func (*SDBInstancePrivilegeManager) GetContextManagers

func (manager *SDBInstancePrivilegeManager) GetContextManagers() [][]db.IModelManager

func (*SDBInstancePrivilegeManager) ListItemFilter

func (*SDBInstancePrivilegeManager) SyncDBInstanceAccountPrivileges

func (manager *SDBInstancePrivilegeManager) SyncDBInstanceAccountPrivileges(ctx context.Context, userCred mcclient.TokenCredential, account *SDBInstanceAccount, cloudPrivileges []cloudprovider.ICloudDBInstanceAccountPrivilege) compare.SyncResult

func (*SDBInstancePrivilegeManager) ValidateCreateData

type SDBInstanceResourceBase

type SDBInstanceResourceBase struct {
	DBInstanceId string `` /* 128-byte string literal not displayed */
}

func (*SDBInstanceResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SDBInstanceResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SDBInstanceResourceBase) GetCloudprovider

func (self *SDBInstanceResourceBase) GetCloudprovider() *SCloudprovider

func (*SDBInstanceResourceBase) GetDBInstance

func (self *SDBInstanceResourceBase) GetDBInstance() (*SDBInstance, error)

func (*SDBInstanceResourceBase) GetVpc

func (self *SDBInstanceResourceBase) GetVpc() (*SVpc, error)

type SDBInstanceResourceBaseManager

type SDBInstanceResourceBaseManager struct {
	SVpcResourceBaseManager
}

func (*SDBInstanceResourceBaseManager) FetchCustomizeColumns

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

func (*SDBInstanceResourceBaseManager) GetExportKeys

func (manager *SDBInstanceResourceBaseManager) GetExportKeys() []string

func (*SDBInstanceResourceBaseManager) GetOrderByFields

func (manager *SDBInstanceResourceBaseManager) GetOrderByFields(query api.DBInstanceFilterListInput) []string

func (*SDBInstanceResourceBaseManager) GetOrderBySubQuery

func (*SDBInstanceResourceBaseManager) ListItemExportKeys

func (*SDBInstanceResourceBaseManager) ListItemFilter

func (*SDBInstanceResourceBaseManager) OrderByExtraFields

func (*SDBInstanceResourceBaseManager) QueryDistinctExtraField

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

type SDBInstanceSecgroup

type SDBInstanceSecgroup struct {
	SDBInstanceJointsBase

	SSecurityGroupResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SDBInstanceSecgroup) Detach

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

type SDBInstanceSecgroupManager

type SDBInstanceSecgroupManager struct {
	SDBInstanceJointsManager
	SSecurityGroupResourceBaseManager
}
var DBInstanceSecgroupManager *SDBInstanceSecgroupManager

func (*SDBInstanceSecgroupManager) FetchCustomizeColumns

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

func (*SDBInstanceSecgroupManager) GetSlaveFieldName

func (manager *SDBInstanceSecgroupManager) GetSlaveFieldName() string

func (*SDBInstanceSecgroupManager) ListItemExportKeys

func (*SDBInstanceSecgroupManager) ListItemFilter

func (*SDBInstanceSecgroupManager) OrderByExtraFields

func (*SDBInstanceSecgroupManager) QueryDistinctExtraField

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

func (*SDBInstanceSecgroupManager) SyncDBInstanceSecgroups

func (manager *SDBInstanceSecgroupManager) SyncDBInstanceSecgroups(ctx context.Context, userCred mcclient.TokenCredential, rds *SDBInstance, extIds []string) compare.SyncResult

type SDBInstanceSku

type SDBInstanceSku struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase
	Provider string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"admin_required" update:"admin"`

	StorageType   string `width:"32" index:"true" list:"user" create:"optional"`
	DiskSizeStep  int    `list:"user" default:"1" create:"optional"` //步长
	MaxDiskSizeGb int    `list:"user" create:"optional"`
	MinDiskSizeGb int    `list:"user" create:"optional"`

	IOPS           int `list:"user" create:"optional"`
	TPS            int `list:"user" create:"optional"`
	QPS            int `list:"user" create:"optional"`
	MaxConnections int `list:"user" create:"optional"`

	VcpuCount  int `nullable:"false" default:"1" list:"user" create:"optional"`
	VmemSizeMb int `nullable:"false" list:"user" create:"required"`

	Category      string `width:"32" index:"true" nullable:"false" list:"user" create:"optional"`
	Engine        string `width:"16" index:"true" charset:"ascii" nullable:"false" list:"user" create:"required"`
	EngineVersion string `width:"64" index:"true" charset:"ascii" nullable:"false" list:"user" create:"required"`

	Zone1   string            `width:"128" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	Zone2   string            `width:"128" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	Zone3   string            `width:"128" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	ZoneId  string            `width:"128" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	MultiAZ tristate.TriState `default:"false" list:"user" create:"optional"`
}

func (SDBInstanceSku) GetGlobalId

func (sku SDBInstanceSku) GetGlobalId() string

func (*SDBInstanceSku) GetZoneInfo

func (self *SDBInstanceSku) GetZoneInfo() (cloudprovider.SZoneInfo, error)

type SDBInstanceSkuManager

var DBInstanceSkuManager *SDBInstanceSkuManager

func (*SDBInstanceSkuManager) FetchCustomizeColumns

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

func (*SDBInstanceSkuManager) GetCategories

func (manager *SDBInstanceSkuManager) GetCategories(provider, cloudregionId, engine, version string) ([]string, error)

func (*SDBInstanceSkuManager) GetDBInstanceSkus

func (manager *SDBInstanceSkuManager) GetDBInstanceSkus(provider, cloudregionId, engine, version, category, storageType string) ([]SDBInstanceSku, error)

func (*SDBInstanceSkuManager) GetDBStringArray

func (manager *SDBInstanceSkuManager) GetDBStringArray(q *sqlchemy.SQuery) ([]string, error)

func (*SDBInstanceSkuManager) GetEngineVersions

func (manager *SDBInstanceSkuManager) GetEngineVersions(provider, cloudregionId, engine string) ([]string, error)

func (*SDBInstanceSkuManager) GetEngines

func (manager *SDBInstanceSkuManager) GetEngines(provider, cloudregionId string) ([]string, error)

func (*SDBInstanceSkuManager) GetInstanceTypes

func (manager *SDBInstanceSkuManager) GetInstanceTypes(provider, cloudregionId, engine, version, category, storageType string) ([]string, error)

func (*SDBInstanceSkuManager) GetPropertyInstanceSpecs

func (manager *SDBInstanceSkuManager) GetPropertyInstanceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDBInstanceSkuManager) GetPropertySyncTasks

func (manager *SDBInstanceSkuManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SDBInstanceSkuManager) GetStorageTypes

func (manager *SDBInstanceSkuManager) GetStorageTypes(provider, cloudregionId, engine, version, category string) ([]string, error)

func (*SDBInstanceSkuManager) ListItemExportKeys

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

func (*SDBInstanceSkuManager) ListItemFilter

RDS套餐类型列表

func (*SDBInstanceSkuManager) OrderByExtraFields

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

func (*SDBInstanceSkuManager) PerformSyncSkus

func (*SDBInstanceSkuManager) QueryDistinctExtraField

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

func (*SDBInstanceSkuManager) SyncDBInstanceSkus

func (manager *SDBInstanceSkuManager) SyncDBInstanceSkus(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, meta *SSkuResourcesMeta) compare.SyncResult

type SDeletePreventableResourceBase

type SDeletePreventableResourceBase struct {
	// 是否开启删除保护
	// example: true
	DisableDelete tristate.TriState `default:"true" list:"user" update:"user" create:"optional" json:"disable_delete"`
}

func (*SDeletePreventableResourceBase) DeletePreventionOff

func (lock *SDeletePreventableResourceBase) DeletePreventionOff(model db.IModel, userCred mcclient.TokenCredential) error

func (*SDeletePreventableResourceBase) DeletePreventionOn

func (lock *SDeletePreventableResourceBase) DeletePreventionOn(model db.IModel, userCred mcclient.TokenCredential) error

func (*SDeletePreventableResourceBase) MarkDeletePreventionOff

func (lock *SDeletePreventableResourceBase) MarkDeletePreventionOff()

func (*SDeletePreventableResourceBase) MarkDeletePreventionOn

func (lock *SDeletePreventableResourceBase) MarkDeletePreventionOn()

type SDeletePreventableResourceBaseManager

type SDeletePreventableResourceBaseManager struct{}

func (*SDeletePreventableResourceBaseManager) ListItemFilter

type SDisk

type SDisk struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SBillingResourceBase
	SStorageResourceBase `width:"128" charset:"ascii" nullable:"true" list:"admin" create:"optional"`
	db.SMultiArchResourceBase
	db.SAutoDeleteResourceBase

	db.SEncryptedResource

	// 磁盘存储类型
	// example: qcow2
	DiskFormat string `width:"32" charset:"ascii" nullable:"false" default:"qcow2" list:"user" json:"disk_format"`
	// 磁盘大小, 单位Mb
	// example: 10240
	DiskSize int `nullable:"false" list:"user" json:"disk_size"`
	// 磁盘路径
	AccessPath string `width:"256" charset:"ascii" nullable:"true" get:"user" json:"access_path"`

	// 备份磁盘实例的存储ID
	BackupStorageId string `width:"128" charset:"ascii" nullable:"true" list:"admin" json:"backup_storage_id"`

	// 镜像Id
	TemplateId string `width:"256" charset:"ascii" nullable:"true" list:"user" json:"template_id"`
	// 快照Id
	SnapshotId string `width:"256" charset:"ascii" nullable:"true" list:"user" json:"snapshot_id"`
	// 备份Id
	BackupId string `width:"256" charset:"ascii" nullable:"true" list:"user" json:"backup_id"`

	// 文件系统
	FsFormat string `width:"32" charset:"ascii" nullable:"true" list:"user" json:"fs_format"`

	// 磁盘类型
	// sys: 系统盘
	// data: 数据盘
	// swap: 交换盘
	// example: sys
	DiskType string `width:"32" charset:"ascii" nullable:"true" list:"user" update:"admin" json:"disk_type"`

	// # is persistent
	Nonpersistent bool `default:"false" list:"user" json:"nonpersistent"`

	// 是否标记为SSD磁盘
	IsSsd bool `nullable:"false" default:"false" list:"user" update:"user" create:"optional"`

	// 最大连接数
	Iops int `nullable:"true" list:"user" create:"optional"`

	// 磁盘吞吐量
	Throughput int `nullable:"true" list:"user" create:"optional"`
}

func ValidateDiskResourceInput

func ValidateDiskResourceInput(userCred mcclient.TokenCredential, input api.DiskResourceInput) (*SDisk, api.DiskResourceInput, error)

func (*SDisk) AllowDeleteItem

func (self *SDisk) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) CancelExpireTime

func (self *SDisk) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDisk) CleanOverdueSnapshots

func (self *SDisk) CleanOverdueSnapshots(ctx context.Context, userCred mcclient.TokenCredential, sp *SSnapshotPolicy, now time.Time) error

func (*SDisk) CleanUpDiskSnapshots

func (self *SDisk) CleanUpDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, snapshot *SSnapshot) error

make snapshot after reset out of chain

func (*SDisk) ClearHostSchedCache

func (self *SDisk) ClearHostSchedCache() error

func (*SDisk) CreateSnapshotAuto

func (self *SDisk) CreateSnapshotAuto(
	ctx context.Context, userCred mcclient.TokenCredential,
	snapshotName string, snapshotPolicy *SSnapshotPolicy,
) error

func (*SDisk) CustomizeCreate

func (self *SDisk) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, 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) Delete

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

func (*SDisk) DeleteSnapshots

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

func (*SDisk) DetachAllSnapshotpolicies

func (self *SDisk) DetachAllSnapshotpolicies(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDisk) GetAttachedGuests

func (self *SDisk) GetAttachedGuests() []SGuest

func (*SDisk) GetBackupStorage

func (self *SDisk) GetBackupStorage() *SStorage

func (*SDisk) GetCloudprovider

func (self *SDisk) GetCloudprovider() *SCloudprovider

func (*SDisk) GetCloudproviderId

func (self *SDisk) GetCloudproviderId() string

func (*SDisk) GetDetailsConvertSnapshot

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

func (*SDisk) GetDynamicConditionInput

func (self *SDisk) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SDisk) GetFetchUrl

func (self *SDisk) GetFetchUrl() (string, error)

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGuest

func (self *SDisk) GetGuest() *SGuest

func (*SDisk) GetGuestDiskCount

func (self *SDisk) GetGuestDiskCount() (int, error)

func (*SDisk) GetGuestdisks

func (self *SDisk) GetGuestdisks() []SGuestdisk

func (*SDisk) GetGuests

func (self *SDisk) GetGuests() []SGuest

func (*SDisk) GetGuestsCount

func (self *SDisk) GetGuestsCount() (int, error)

func (*SDisk) GetIDisk

func (self *SDisk) GetIDisk(ctx context.Context) (cloudprovider.ICloudDisk, error)

func (*SDisk) GetIRegion

func (self *SDisk) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SDisk) GetIStorage

func (self *SDisk) GetIStorage(ctx context.Context) (cloudprovider.ICloudStorage, error)

func (*SDisk) GetManualSnapshotCount

func (self *SDisk) GetManualSnapshotCount() (int, error)

func (*SDisk) GetMasterHost

func (self *SDisk) GetMasterHost() (*SHost, error)

func (*SDisk) GetMountPoint

func (self *SDisk) GetMountPoint() string

func (*SDisk) GetPathAtHost

func (self *SDisk) GetPathAtHost(host *SHost) string

func (*SDisk) GetQuotaKeys

func (disk *SDisk) GetQuotaKeys() (quotas.IQuotaKeys, error)

func (*SDisk) GetRegionDriver

func (self *SDisk) GetRegionDriver() (IRegionDriver, error)

func (*SDisk) GetRuningGuestCount

func (self *SDisk) GetRuningGuestCount() (int, error)

func (*SDisk) GetShortDesc

func (self *SDisk) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SDisk) GetSnapshotCount

func (self *SDisk) GetSnapshotCount() (int, error)

func (*SDisk) GetSnapshotFuseUrl

func (self *SDisk) GetSnapshotFuseUrl() (string, error)

func (*SDisk) GetSnapshotsNotInInstanceSnapshot

func (self *SDisk) GetSnapshotsNotInInstanceSnapshot() ([]SSnapshot, error)

func (*SDisk) GetStorage

func (self *SDisk) GetStorage() (*SStorage, error)

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) GetUsages

func (disk *SDisk) GetUsages() []db.IUsage

func (*SDisk) GetZone

func (self *SDisk) GetZone() (*SZone, error)

func (*SDisk) IsDetachable

func (self *SDisk) IsDetachable() bool

func (*SDisk) IsLocal

func (self *SDisk) IsLocal() bool

func (*SDisk) IsNeedWaitSnapshotsDeleted

func (self *SDisk) IsNeedWaitSnapshotsDeleted() (bool, error)

func (*SDisk) PerformBindSnapshotpolicy

func (disk *SDisk) PerformBindSnapshotpolicy(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformCancelDelete

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

func (*SDisk) PerformChangeOwner

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 (disk *SDisk) PerformResize(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DiskResizeInput) (jsonutils.JSONObject, error)

func (*SDisk) PerformSave

func (self *SDisk) PerformSave(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DiskSaveInput) (jsonutils.JSONObject, error)

func (*SDisk) PerformSyncstatus

func (self *SDisk) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DiskSyncstatusInput) (jsonutils.JSONObject, error)

同步磁盘状态

func (*SDisk) PerformUnbindSnapshotpolicy

func (disk *SDisk) PerformUnbindSnapshotpolicy(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, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SDisk) PrepareSaveImage

func (self *SDisk) PrepareSaveImage(ctx context.Context, userCred mcclient.TokenCredential, input api.ServerSaveImageInput) (string, error)

func (*SDisk) RealDelete

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

func (*SDisk) SaveRenewInfo

func (self *SDisk) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bc *billing.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SDisk) SetDiskReady

func (self *SDisk) SetDiskReady(ctx context.Context, userCred mcclient.TokenCredential, reason string)

func (*SDisk) SetStorage

func (disk *SDisk) SetStorage(storageId string, diskConfig *api.DiskConfig) error

func (*SDisk) SetStorageByHost

func (disk *SDisk) SetStorageByHost(hostId string, diskConfig *api.DiskConfig, storageIds []string) error

func (*SDisk) StartAllocate

func (self *SDisk) StartAllocate(ctx context.Context, host *SHost, storage *SStorage, taskId string, userCred mcclient.TokenCredential, rebuild bool, snapshot string, task taskman.ITask) error

func (*SDisk) StartCreateBackupTask

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

func (*SDisk) StartDiskCreateTask

func (self *SDisk) StartDiskCreateTask(ctx context.Context, userCred mcclient.TokenCredential, rebuild bool, snapshot string, parentTaskId string) error

func (*SDisk) StartDiskDeleteTask

func (self *SDisk) StartDiskDeleteTask(
	ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string,
	isPurge, overridePendingDelete, deleteSnapshots bool,
) error

func (*SDisk) StartDiskResizeTask

func (self *SDisk) StartDiskResizeTask(ctx context.Context, userCred mcclient.TokenCredential, sizeMb int64, parentTaskId string, pendingUsage quotas.IQuota) error

func (*SDisk) StartDiskSaveTask

func (self *SDisk) StartDiskSaveTask(ctx context.Context, userCred mcclient.TokenCredential, input api.DiskSaveInput, parentTaskId string) error

func (*SDisk) StartResetDisk

func (self *SDisk) StartResetDisk(
	ctx context.Context, userCred mcclient.TokenCredential,
	snapshotId string, autoStart bool, guest *SGuest, parentTaskId string,
) error

func (*SDisk) SwitchToBackup

func (self *SDisk) SwitchToBackup(userCred mcclient.TokenCredential) error

func (*SDisk) ToDiskConfig

func (self *SDisk) ToDiskConfig() *api.DiskConfig

func (*SDisk) ToDiskInfo

func (self *SDisk) ToDiskInfo() DiskInfo

DEPRECATE: will be remove in future, use ToDiskConfig

func (*SDisk) UpdataSnapshotsBackingDisk

func (self *SDisk) UpdataSnapshotsBackingDisk(backingDiskId string) error

func (*SDisk) ValidateDeleteCondition

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

func (*SDisk) ValidatePurgeCondition

func (self *SDisk) ValidatePurgeCondition(ctx context.Context) error

func (*SDisk) ValidateUpdateData

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

type SDiskBackup

type SDiskBackup struct {
	db.SVirtualResourceBase

	SManagedResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	db.SMultiArchResourceBase

	db.SEncryptedResource

	DiskId          string `width:"36" charset:"ascii" nullable:"true" create:"required" list:"user" index:"true"`
	BackupStorageId string `width:"36" charset:"ascii" nullable:"true" create:"required" list:"user" index:"true"`
	StorageId       string `width:"36" charset:"ascii" nullable:"true" list:"user"`

	// 备份大小
	SizeMb     int    `nullable:"false" list:"user" create:"optional"`
	DiskSizeMb int    `nullable:"false" list:"user" create:"optional"`
	DiskType   string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	// 操作系统类型
	OsType     string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	DiskConfig *SBackupDiskConfig
}

func (*SDiskBackup) CustomizeCreate

func (*SDiskBackup) CustomizeDelete

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

func (*SDiskBackup) Delete

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

func (*SDiskBackup) GetBackupStorage

func (db *SDiskBackup) GetBackupStorage() (*SBackupStorage, error)

func (*SDiskBackup) GetDisk

func (db *SDiskBackup) GetDisk() (*SDisk, error)

func (*SDiskBackup) GetRegionDriver

func (db *SDiskBackup) GetRegionDriver() (IRegionDriver, error)

func (*SDiskBackup) GetStorage

func (db *SDiskBackup) GetStorage() (*SStorage, error)

func (*SDiskBackup) PackMetadata

func (self *SDiskBackup) PackMetadata() *api.DiskBackupPackMetadata

func (*SDiskBackup) PerformRecovery

func (*SDiskBackup) PerformSyncstatus

func (*SDiskBackup) PostCreate

func (*SDiskBackup) RealDelete

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

func (*SDiskBackup) StartBackupCreateTask

func (db *SDiskBackup) StartBackupCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SDiskBackup) StartBackupDeleteTask

func (self *SDiskBackup) StartBackupDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, forceDelete bool) error

func (*SDiskBackup) StartRecoveryTask

func (self *SDiskBackup) StartRecoveryTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, diskName string) error

func (*SDiskBackup) ValidateDeleteCondition

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

type SDiskBackupManager

var DiskBackupManager *SDiskBackupManager

func (*SDiskBackupManager) CreateBackup

func (manager *SDiskBackupManager) CreateBackup(ctx context.Context, owner mcclient.IIdentityProvider, diskId, backupStorageId, name string) (*SDiskBackup, error)

func (*SDiskBackupManager) CreateFromPackMetadata

func (manager *SDiskBackupManager) CreateFromPackMetadata(ctx context.Context, owner mcclient.TokenCredential, backupStorageId, id, name string, metadata *api.DiskBackupPackMetadata) (*SDiskBackup, error)

func (*SDiskBackupManager) FetchCustomizeColumns

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

func (*SDiskBackupManager) ListItemExportKeys

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

func (*SDiskBackupManager) ListItemFilter

func (*SDiskBackupManager) OrderByExtraFields

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

func (*SDiskBackupManager) QueryDistinctExtraField

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

func (*SDiskBackupManager) ValidateCreateData

type SDiskManager

var DiskManager *SDiskManager

func (*SDiskManager) AutoDiskSnapshot

func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SDiskManager) AutoSyncExtDiskSnapshot

func (manager *SDiskManager) AutoSyncExtDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SDiskManager) CleanPendingDeleteDisks

func (manager *SDiskManager) CleanPendingDeleteDisks(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SDiskManager) FetchCustomizeColumns

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

func (*SDiskManager) FetchDiskById

func (manager *SDiskManager) FetchDiskById(diskId string) *SDisk

func (*SDiskManager) GetContextManagers

func (manager *SDiskManager) GetContextManagers() [][]db.IModelManager

func (*SDiskManager) ListItemExportKeys

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

func (*SDiskManager) ListItemFilter

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

磁盘列表

func (*SDiskManager) OnCreateComplete

func (manager *SDiskManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SDiskManager) OrderByExtraFields

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

func (*SDiskManager) QueryDistinctExtraField

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

func (*SDiskManager) SyncDisks

func (*SDiskManager) ValidateCreateData

func (manager *SDiskManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.DiskCreateInput) (api.DiskCreateInput, error)

type SDiskResourceBase

type SDiskResourceBase struct {
	DiskId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SDiskResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SDiskResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SDiskResourceBase) GetDisk

func (self *SDiskResourceBase) GetDisk() (*SDisk, error)

func (*SDiskResourceBase) GetRegion

func (self *SDiskResourceBase) GetRegion() (*SCloudregion, error)

func (*SDiskResourceBase) GetStorage

func (self *SDiskResourceBase) GetStorage() (*SStorage, error)

func (*SDiskResourceBase) GetZone

func (self *SDiskResourceBase) GetZone() (*SZone, error)

type SDiskResourceBaseManager

type SDiskResourceBaseManager struct {
	SStorageResourceBaseManager
}

func (*SDiskResourceBaseManager) FetchCustomizeColumns

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

func (*SDiskResourceBaseManager) GetExportKeys

func (manager *SDiskResourceBaseManager) GetExportKeys() []string

func (*SDiskResourceBaseManager) GetOrderByFields

func (manager *SDiskResourceBaseManager) GetOrderByFields(query api.DiskFilterListInput) []string

func (*SDiskResourceBaseManager) GetOrderBySubQuery

func (manager *SDiskResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.DiskFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SDiskResourceBaseManager) ListItemExportKeys

func (*SDiskResourceBaseManager) ListItemFilter

func (*SDiskResourceBaseManager) OrderByExtraFields

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

func (*SDiskResourceBaseManager) QueryDistinctExtraField

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

type SDnsRecord

type SDnsRecord struct {
	db.SAdminSharableVirtualResourceBase
	db.SEnabledResourceBase `nullable:"false" default:"true" create:"optional" list:"user"`

	// DNS记录的过期时间,单位为秒
	// example: 60
	Ttl int `nullable:"true" default:"1" create:"optional" list:"user" update:"user" json:"ttl"`
}

func (*SDnsRecord) AddInfo

func (rec *SDnsRecord) AddInfo(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

func (*SDnsRecord) GetCNAME

func (rec *SDnsRecord) GetCNAME() string

func (*SDnsRecord) GetInfo

func (rec *SDnsRecord) GetInfo() []string

func (*SDnsRecord) HasRecordType

func (rec *SDnsRecord) HasRecordType(typ string) bool

func (*SDnsRecord) IsCNAME

func (rec *SDnsRecord) IsCNAME() bool

func (*SDnsRecord) PerformAddRecords

func (rec *SDnsRecord) PerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDnsRecord) PerformDisable

func (*SDnsRecord) PerformEnable

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

var DnsRecordManager *SDnsRecordManager

func (*SDnsRecordManager) FetchCustomizeColumns

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

func (*SDnsRecordManager) GetRecordsLimit

func (man *SDnsRecordManager) GetRecordsLimit() int

GetRecordsLimit implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) GetRecordsSeparator

func (man *SDnsRecordManager) GetRecordsSeparator() string

GetRecordsSeparator implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) ListItemFilter

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

域名记录列表

func (*SDnsRecordManager) OrderByExtraFields

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

func (*SDnsRecordManager) ParseInputInfo

func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) ([]string, error)

ParseInputInfo implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) QueryDistinctExtraField

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

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

type SDnsRecordSet

type SDnsRecordSet struct {
	db.SEnabledStatusStandaloneResourceBase
	SDnsZoneResourceBase

	DnsType    string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
	DnsValue   string `width:"256" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
	TTL        int64  `nullable:"false" list:"user" update:"domain" create:"domain_required" json:"ttl"`
	MxPriority int64  `nullable:"false" list:"user" update:"domain" create:"domain_optional"`
}

func (*SDnsRecordSet) Delete

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

func (*SDnsRecordSet) GetDefaultDnsTrafficPolicy

func (self *SDnsRecordSet) GetDefaultDnsTrafficPolicy(provider string) (cloudprovider.TDnsPolicyType, cloudprovider.TDnsPolicyValue, *jsonutils.JSONDict, error)

func (*SDnsRecordSet) GetDnsTrafficPolicies

func (self *SDnsRecordSet) GetDnsTrafficPolicies() ([]SDnsTrafficPolicy, error)

func (*SDnsRecordSet) GetDnsTrafficPolicy

func (self *SDnsRecordSet) GetDnsTrafficPolicy(provider string) (*SDnsTrafficPolicy, error)

func (*SDnsRecordSet) GetDnsZone

func (self *SDnsRecordSet) GetDnsZone() (*SDnsZone, error)

func (*SDnsRecordSet) GetOwnerId

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

func (*SDnsRecordSet) GetUniqValues

func (self *SDnsRecordSet) GetUniqValues() jsonutils.JSONObject

func (*SDnsRecordSet) IsSharable

func (self *SDnsRecordSet) IsSharable(reqUsrId mcclient.IIdentityProvider) bool

func (*SDnsRecordSet) PerformDisable

禁用

func (*SDnsRecordSet) PerformEnable

启用

func (*SDnsRecordSet) PerformSetTrafficPolicies

设置流量策略

func (*SDnsRecordSet) PostCreate

func (*SDnsRecordSet) PostUpdate

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

func (*SDnsRecordSet) PreDelete

func (self *SDnsRecordSet) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SDnsRecordSet) RemovePolicy

func (self *SDnsRecordSet) RemovePolicy(ctx context.Context, userCred mcclient.TokenCredential, policyId string) error

func (*SDnsRecordSet) ValidateUpdateData

更新

type SDnsRecordSetManager

+onecloud:swagger-gen-model-singular=dns_recordset +onecloud:swagger-gen-model-plural=dns_recordsets

var DnsRecordSetManager *SDnsRecordSetManager

func (*SDnsRecordSetManager) EnableGenerateName

func (manager *SDnsRecordSetManager) EnableGenerateName() bool

func (*SDnsRecordSetManager) FetchCustomizeColumns

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

解析详情

func (*SDnsRecordSetManager) FetchOwnerId

func (*SDnsRecordSetManager) FetchUniqValues

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

func (*SDnsRecordSetManager) FilterByOwner

func (manager *SDnsRecordSetManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SDnsRecordSetManager) FilterByUniqValues

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

func (*SDnsRecordSetManager) ListItemFilter

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

DNS记录列表

func (*SDnsRecordSetManager) ResourceScope

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

func (*SDnsRecordSetManager) ValidateCreateData

创建

type SDnsRecordSetTrafficPolicy

type SDnsRecordSetTrafficPolicy struct {
	db.SJointResourceBase
	DnsRecordsetId string `width:"36" charset:"ascii" nullable:"false" list:"user" json:"dns_recordset_id"`

	DnsTrafficPolicyId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SDnsRecordSetTrafficPolicy) Detach

type SDnsRecordSetTrafficPolicyManager

type SDnsRecordSetTrafficPolicyManager struct {
	db.SJointResourceBaseManager
	SDnsZoneResourceBaseManager
}
var DnsRecordSetTrafficPolicyManager *SDnsRecordSetTrafficPolicyManager

func (*SDnsRecordSetTrafficPolicyManager) GetMasterFieldName

func (manager *SDnsRecordSetTrafficPolicyManager) GetMasterFieldName() string

func (*SDnsRecordSetTrafficPolicyManager) GetSlaveFieldName

func (manager *SDnsRecordSetTrafficPolicyManager) GetSlaveFieldName() string

type SDnsRecordSetValidateInfo

type SDnsRecordSetValidateInfo struct {
	api.SDnsRecordSet
	TrafficPolicies []api.DnsRecordPolicy
}

type SDnsTrafficPolicy

type SDnsTrafficPolicy struct {
	db.SEnabledStatusInfrasResourceBase

	Provider    string              `width:"64" charset:"ascii" list:"domain" create:"domain_required"`
	PolicyType  string              `width:"32" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
	PolicyValue string              `width:"32" charset:"ascii" nullable:"false" list:"domain" create:"domain_optional"`
	Options     *jsonutils.JSONDict `get:"domain" list:"domain" create:"domain_optional"`
}

type SDnsTrafficPolicyManager

type SDnsTrafficPolicyManager struct {
	db.SEnabledStatusInfrasResourceBaseManager
}
var DnsTrafficPolicyManager *SDnsTrafficPolicyManager

func (*SDnsTrafficPolicyManager) FetchCustomizeColumns

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

详情

func (*SDnsTrafficPolicyManager) ListItemFilter

列表

func (*SDnsTrafficPolicyManager) Register

func (*SDnsTrafficPolicyManager) ValidateCreateData

创建

type SDnsZone

type SDnsZone struct {
	db.SEnabledStatusInfrasResourceBase

	IsDirty bool `nullable:"false" default:"false"`

	ZoneType string              `width:"32" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
	Options  *jsonutils.JSONDict `get:"domain" list:"domain" create:"domain_optional"`
}

func (*SDnsZone) AddVpc

func (self *SDnsZone) AddVpc(ctx context.Context, vpcId string) error

func (*SDnsZone) CustomizeDelete

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

func (*SDnsZone) DelaySync

func (self *SDnsZone) DelaySync(ctx context.Context, userCred mcclient.TokenCredential)

func (*SDnsZone) Delete

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

func (*SDnsZone) DoSyncRecords

func (self *SDnsZone) DoSyncRecords(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDnsZone) GetCloudaccounts

func (self *SDnsZone) GetCloudaccounts() ([]SCloudaccount, error)

func (*SDnsZone) GetDnsRecordSets

func (self *SDnsZone) GetDnsRecordSets() ([]SDnsRecordSet, error)

func (*SDnsZone) GetDnsZoneCache

func (self *SDnsZone) GetDnsZoneCache(accountId string) (*SDnsZoneCache, error)

func (*SDnsZone) GetDnsZoneCaches

func (self *SDnsZone) GetDnsZoneCaches() ([]SDnsZoneCache, error)

func (*SDnsZone) GetUsages

func (dzone *SDnsZone) GetUsages() []db.IUsage

func (*SDnsZone) GetVpcs

func (self *SDnsZone) GetVpcs() ([]SVpc, error)

func (*SDnsZone) PerformAddVpcs

添加VPC

func (*SDnsZone) PerformCache

指定云账号创建

func (*SDnsZone) PerformPurge

func (*SDnsZone) PerformRemoveVpcs

func (self *SDnsZone) PerformRemoveVpcs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DnsZoneRemoveVpcsInput) (jsonutils.JSONObject, error)

移除VPC

func (*SDnsZone) PerformSyncRecordsets

func (self *SDnsZone) PerformSyncRecordsets(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DnsZoneSyncRecordSetsInput) (jsonutils.JSONObject, error)

同步解析列表到云上

func (*SDnsZone) PerformSyncstatus

func (self *SDnsZone) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DnsZoneSyncStatusInput) (jsonutils.JSONObject, error)

同步状态

func (*SDnsZone) PerformUncache

func (self *SDnsZone) PerformUncache(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.DnsZoneUnacheInput) (jsonutils.JSONObject, error)

删除云账号的云上资源

func (*SDnsZone) PostCreate

func (self *SDnsZone) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SDnsZone) PostUpdate

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

func (*SDnsZone) RealDelete

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

func (*SDnsZone) RegisterCache

func (self *SDnsZone) RegisterCache(ctx context.Context, userCred mcclient.TokenCredential, accountId string) (*SDnsZoneCache, error)

func (*SDnsZone) RemoveVpc

func (self *SDnsZone) RemoveVpc(ctx context.Context, vpcId string) error

func (*SDnsZone) StartDnsZoneCreateTask

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

func (*SDnsZone) StartDnsZoneDeleteTask

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

func (*SDnsZone) StartDnsZoneSyncRecordSetsTask

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

func (*SDnsZone) StartDnsZoneSyncVpcsTask

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

func (*SDnsZone) SyncDnsRecordSets

func (self *SDnsZone) SyncDnsRecordSets(ctx context.Context, userCred mcclient.TokenCredential, provider string, ext cloudprovider.ICloudDnsZone) compare.SyncResult

type SDnsZoneCache

type SDnsZoneCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SDnsZoneResourceBase

	// 归属云账号ID
	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	ProductType    string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SDnsZoneCache) CustomizeDelete

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

func (*SDnsZoneCache) Delete

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

func (*SDnsZoneCache) GetCloudaccount

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

func (*SDnsZoneCache) GetDnsZone

func (self *SDnsZoneCache) GetDnsZone() (*SDnsZone, error)

func (*SDnsZoneCache) GetICloudDnsZone

func (self *SDnsZoneCache) GetICloudDnsZone(ctx context.Context) (cloudprovider.ICloudDnsZone, error)

func (*SDnsZoneCache) GetOwnerId

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

func (*SDnsZoneCache) GetProvider

func (self *SDnsZoneCache) GetProvider(ctx context.Context) (cloudprovider.ICloudProvider, error)

func (*SDnsZoneCache) GetRecordSets

func (self *SDnsZoneCache) GetRecordSets() ([]cloudprovider.DnsRecordSet, error)

func (*SDnsZoneCache) GetRecordSetsByDnsType

func (self *SDnsZoneCache) GetRecordSetsByDnsType(dnsTypes []cloudprovider.TDnsType) ([]SDnsRecordSet, error)

func (*SDnsZoneCache) GetVpcs

func (self *SDnsZoneCache) GetVpcs() ([]SVpc, error)

func (*SDnsZoneCache) RealDelete

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

func (*SDnsZoneCache) StartDnsZoneCacheCreateTask

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

func (*SDnsZoneCache) StartDnsZoneCacheDeleteTask

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

func (*SDnsZoneCache) SyncRecordSets

func (self *SDnsZoneCache) SyncRecordSets(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDnsZoneCache) SyncVpcForCloud

func (self *SDnsZoneCache) SyncVpcForCloud(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDnsZoneCache) SyncWithCloudDnsZone

func (self *SDnsZoneCache) SyncWithCloudDnsZone(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudDnsZone) error

type SDnsZoneCacheManager

var DnsZoneCacheManager *SDnsZoneCacheManager

func (*SDnsZoneCacheManager) FetchCustomizeColumns

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

func (*SDnsZoneCacheManager) FetchOwnerId

func (*SDnsZoneCacheManager) FilterByOwner

func (manager *SDnsZoneCacheManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SDnsZoneCacheManager) ListItemFilter

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

func (*SDnsZoneCacheManager) ResourceScope

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

func (*SDnsZoneCacheManager) ValidateCreateData

type SDnsZoneManager

type SDnsZoneManager struct {
	db.SEnabledStatusInfrasResourceBaseManager
}
var DnsZoneManager *SDnsZoneManager

func (*SDnsZoneManager) FetchCustomizeColumns

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

解析详情

func (*SDnsZoneManager) GetCacheDetails

func (self *SDnsZoneManager) GetCacheDetails(ctx context.Context, userCred mcclient.TokenCredential, dnsZoneIds []string) (map[string][]jsonutils.JSONObject, error)

func (*SDnsZoneManager) GetExtraMaps

func (manager *SDnsZoneManager) GetExtraMaps(dnsZoneIds []string) (map[string][]string, map[string][]string, error)

func (*SDnsZoneManager) GetPropertyCapability

func (manager *SDnsZoneManager) GetPropertyCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDnsZoneManager) ListItemFilter

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

列表

func (*SDnsZoneManager) ValidateCreateData

创建

type SDnsZoneResourceBase

type SDnsZoneResourceBase struct {
	DnsZoneId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"dns_zone_id"`
}

type SDnsZoneResourceBaseManager

type SDnsZoneResourceBaseManager struct{}

func (*SDnsZoneResourceBaseManager) ListItemFilter

type SDnsZoneVpc

type SDnsZoneVpc struct {
	db.SJointResourceBase
	SDnsZoneResourceBase

	VpcId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SDnsZoneVpc) Detach

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

type SDnsZoneVpcManager

type SDnsZoneVpcManager struct {
	db.SJointResourceBaseManager
	SDnsZoneResourceBaseManager
}
var DnsZoneVpcManager *SDnsZoneVpcManager

func (*SDnsZoneVpcManager) GetMasterFieldName

func (manager *SDnsZoneVpcManager) GetMasterFieldName() string

func (*SDnsZoneVpcManager) GetSlaveFieldName

func (manager *SDnsZoneVpcManager) GetSlaveFieldName() string

type SDomainQuota

type SDomainQuota struct {
	quotas.SQuotaBase

	quotas.SBaseDomainQuotaKeys

	Cloudaccount int `default:"-1" allow_zero:"true" json:"cloudaccount"`

	Globalvpc int `default:"-1" allow_zero:"true" json:"globalvpc"`

	DnsZone int `default:"-1" allow_zero:"true" json:"dns_zone"`
}

func (*SDomainQuota) Add

func (self *SDomainQuota) Add(quota quotas.IQuota)

func (*SDomainQuota) Allocable

func (self *SDomainQuota) Allocable(request quotas.IQuota) int

func (*SDomainQuota) Exceed

func (used *SDomainQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SDomainQuota) FetchSystemQuota

func (self *SDomainQuota) FetchSystemQuota()

func (*SDomainQuota) FetchUsage

func (self *SDomainQuota) FetchUsage(ctx context.Context) error

func (*SDomainQuota) GetKeys

func (self *SDomainQuota) GetKeys() quotas.IQuotaKeys

func (*SDomainQuota) IsEmpty

func (self *SDomainQuota) IsEmpty() bool

func (*SDomainQuota) ResetNegative

func (self *SDomainQuota) ResetNegative()

func (*SDomainQuota) SetKeys

func (self *SDomainQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SDomainQuota) Sub

func (self *SDomainQuota) Sub(quota quotas.IQuota)

func (*SDomainQuota) ToJSON

func (self *SDomainQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SDomainQuota) Update

func (self *SDomainQuota) Update(quota quotas.IQuota)

type SDomainQuotaDetail

type SDomainQuotaDetail struct {
	SDomainQuota

	quotas.SBaseDomainQuotaDetailKeys
}

域配额详情

func GetDomainQuota

func GetDomainQuota(query quotas.SBaseQuotaQueryInput) *SDomainQuotaDetail

获取指定域的配额

func ListDomainQuotas

func ListDomainQuotas(query quotas.SBaseQuotaQueryInput) *SDomainQuotaDetail

获取所有域的域配额

func SetDomainQuotas

func SetDomainQuotas(input SetDomainQuotaInput) *SDomainQuotaDetail

设置域的域配额

type SDynamicschedtag

type SDynamicschedtag struct {
	db.SStandaloneResourceBase
	SSchedtagResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"`

	// 动态调度标间的匹配条件
	// example: host.sys_load > 1.5 || host.mem_used_percent > 0.7 => "high_load"
	Condition string `width:"1024" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"`

	Enabled tristate.TriState `default:"true" create:"optional" list:"user" update:"user"`
}

dynamic schedtag is called before scan host candidates, dynamically adding additional schedtag to hosts condition examples:

host.sys_load > 1.5 || host.mem_used_percent > 0.7 => "high_load"

func (*SDynamicschedtag) PerformEvaluate

func (*SDynamicschedtag) ValidateUpdateData

func (self *SDynamicschedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SDynamicschedtagManager

type SDynamicschedtagManager struct {
	db.SStandaloneResourceBaseManager
	SSchedtagResourceBaseManager

	StandaloneResourcesManager map[string]IDynamicResourceManager
	VirtualResourcesManager    map[string]IDynamicResourceManager
}
var DynamicschedtagManager *SDynamicschedtagManager

func (*SDynamicschedtagManager) BindStandaloneResourceManager

func (man *SDynamicschedtagManager) BindStandaloneResourceManager(ms ...IDynamicResourceManager)

func (*SDynamicschedtagManager) BindVirtualResourceManager

func (man *SDynamicschedtagManager) BindVirtualResourceManager(ms ...IDynamicResourceManager)

func (*SDynamicschedtagManager) FetchCustomizeColumns

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

func (*SDynamicschedtagManager) GetEnabledDynamicSchedtagsByResource

func (manager *SDynamicschedtagManager) GetEnabledDynamicSchedtagsByResource(resType string) []SDynamicschedtag

func (*SDynamicschedtagManager) InitializeData

func (man *SDynamicschedtagManager) InitializeData() error

func (*SDynamicschedtagManager) ListItemFilter

动态调度标签列表

func (*SDynamicschedtagManager) OrderByExtraFields

func (manager *SDynamicschedtagManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.DynamicschedtagListInput,
) (*sqlchemy.SQuery, error)

func (*SDynamicschedtagManager) QueryDistinctExtraField

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

func (*SDynamicschedtagManager) ValidateCreateData

type SEipNetwork

type SEipNetwork struct {
	// contains filtered or unexported fields
}

func NewEipNetwork

func NewEipNetwork(net *SNetwork, owner mcclient.IIdentityProvider, user mcclient.TokenCredential, freecnt int) SEipNetwork

func (SEipNetwork) GetNetwork

func (en SEipNetwork) GetNetwork() *SNetwork

type SEipNetworks

type SEipNetworks []SEipNetwork

func (SEipNetworks) Len

func (a SEipNetworks) Len() int

func (SEipNetworks) Less

func (a SEipNetworks) Less(i, j int) bool

func (SEipNetworks) Swap

func (a SEipNetworks) Swap(i, j int)

type SElasticSearch

type SElasticSearch struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase

	SCloudregionResourceBase
	SDeletePreventableResourceBase

	// 版本
	Version string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`

	// 套餐名称
	// example: elasticsearch.sn2ne.xlarge
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`

	// CPU数量
	// example: 1
	VcpuCount int `nullable:"false" default:"1" list:"user" create:"optional"`
	// 内存大小
	// example: 1024
	VmemSizeGb int `nullable:"false" list:"user" create:"optional"`

	// 存储类型
	// example: local_ssd
	StorageType string `nullable:"false" list:"user" create:"required"`
	// 存储大小
	// example: 1024
	DiskSizeGb int `nullable:"false" list:"user" create:"required"`
	// 实例类型
	// example: ha
	Category string `nullable:"false" list:"user" create:"optional"`

	VpcId     string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"vpc_id"`
	NetworkId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"network_id"`

	// 可用区Id
	ZoneId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"zone_id"`
	// 是否是多可用区部署
	IsMultiAz bool `nullable:"false" default:"false" list:"user" update:"user" create:"optional"`
}

func (*SElasticSearch) CustomizeDelete

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

func (*SElasticSearch) Delete

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

func (*SElasticSearch) GetIElasticSearch

func (self *SElasticSearch) GetIElasticSearch(ctx context.Context) (cloudprovider.ICloudElasticSearch, error)

func (*SElasticSearch) GetIRegion

func (self *SElasticSearch) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SElasticSearch) PerformSyncstatus

同步ElasticSearch实例状态

func (*SElasticSearch) PostUpdate

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

func (*SElasticSearch) RealDelete

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

func (*SElasticSearch) StartDeleteTask

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

func (*SElasticSearch) SyncWithCloudElasticSearch

func (self *SElasticSearch) SyncWithCloudElasticSearch(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudElasticSearch) error

同步资源属性

func (*SElasticSearch) ValidateDeleteCondition

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

判断资源是否可以删除

type SElasticSearchManager

var ElasticSearchManager *SElasticSearchManager

func (*SElasticSearchManager) FetchCustomizeColumns

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

func (*SElasticSearchManager) GetContextManagers

func (manager *SElasticSearchManager) GetContextManagers() [][]db.IModelManager

func (*SElasticSearchManager) ListItemExportKeys

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

func (*SElasticSearchManager) ListItemFilter

ElasticSearch实例列表

func (*SElasticSearchManager) OrderByExtraFields

func (*SElasticSearchManager) QueryDistinctExtraField

func (man *SElasticSearchManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SElasticSearchManager) TotalCount

func (man *SElasticSearchManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (SEsCountStat, error)

type SElasticcache

type SElasticcache struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SBillingResourceBase
	SDeletePreventableResourceBase
	SVpcResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	SZoneResourceBase

	// 备可用区
	SlaveZones string `width:"512" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"slave_zones"`

	// 实例规格
	// example: redis.master.micro.default
	InstanceType string `width:"96" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"instance_type"`

	// 容量
	// example: 1024
	CapacityMB int `nullable:"false" list:"user" create:"optional" json:"capacity_mb"`

	// 对应Sku
	LocalCategory string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"local_category"`

	// 类型
	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"node_type"`

	// 后端存储引擎
	// Redis | Memcache
	// example: redis
	Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" json:"engine"`

	// 后端存储引擎版本
	// example: 4.0
	EngineVersion string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" json:"engine_version"`

	// 网络类型, CLASSIC(经典网络)  VPC(专有网络)
	// example: CLASSIC
	NetworkType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"network_type"`

	// 所属网络ID
	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"network_id"`

	// 带宽
	Bandwidth int `nullable:"true" list:"user" create:"optional"`

	// 安全组
	SecurityGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"security_group_id"`

	//  内网DNS
	PrivateDNS string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"private_dns"`

	//  内网IP地址
	PrivateIpAddr string `width:"17" charset:"ascii" list:"user" create:"optional" json:"private_ip_addr"`

	// 内网访问端口
	PrivateConnectPort int `nullable:"true" list:"user" create:"optional" json:"private_connect_port"`

	// 公网DNS
	PublicDNS string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"public_dns"`

	// 公网IP地址
	PublicIpAddr string `width:"17" charset:"ascii" list:"user" create:"optional" json:"public_ip_addr"`

	// 外网访问端口
	PublicConnectPort int `nullable:"true" list:"user" create:"optional" json:"public_connect_port"`

	// 维护开始时间,格式为HH:mmZ
	// example: 02:00Z
	MaintainStartTime string `width:"8" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"maintain_start_time"`

	// 维护结束时间
	MaintainEndTime string `width:"8" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"maintain_end_time"`

	// 访问密码? on (开启密码)|off (免密码访问)
	AuthMode string `width:"8" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"auth_mode"`

	// 最大连接数
	Connections int `nullable:"true" list:"user" create:"optional"`
}

func (*SElasticcache) CancelExpireTime

func (self *SElasticcache) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SElasticcache) CustomizeDelete

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

func (*SElasticcache) Delete

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

func (*SElasticcache) DeleteSubResources

func (self *SElasticcache) DeleteSubResources(ctx context.Context, userCred mcclient.TokenCredential)

清理所有关联资源记录

func (*SElasticcache) GetAdminAccount

func (self *SElasticcache) GetAdminAccount() (*SElasticcacheAccount, error)

func (*SElasticcache) GetCreateAliyunElasticcacheParams

func (self *SElasticcache) GetCreateAliyunElasticcacheParams(ctx context.Context, data *jsonutils.JSONDict) (*cloudprovider.SCloudElasticCacheInput, error)

func (*SElasticcache) GetCreateHuaweiElasticcacheParams

func (self *SElasticcache) GetCreateHuaweiElasticcacheParams(ctx context.Context, data *jsonutils.JSONDict) (*cloudprovider.SCloudElasticCacheInput, error)

func (*SElasticcache) GetCreateQCloudElasticcacheParams

func (self *SElasticcache) GetCreateQCloudElasticcacheParams(ctx context.Context, data *jsonutils.JSONDict) (*cloudprovider.SCloudElasticCacheInput, error)

func (*SElasticcache) GetDetailsLoginInfo

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

func (*SElasticcache) GetElasticcacheAccounts

func (self *SElasticcache) GetElasticcacheAccounts() ([]SElasticcacheAccount, error)

func (*SElasticcache) GetElasticcacheAcls

func (self *SElasticcache) GetElasticcacheAcls() ([]SElasticcacheAcl, error)

func (*SElasticcache) GetElasticcacheBackups

func (self *SElasticcache) GetElasticcacheBackups() ([]SElasticcacheBackup, error)

func (*SElasticcache) GetElasticcacheParameters

func (self *SElasticcache) GetElasticcacheParameters() ([]SElasticcacheParameter, error)

func (*SElasticcache) GetElasticcacheSecgroups

func (self *SElasticcache) GetElasticcacheSecgroups() ([]SElasticcachesecgroup, error)

func (*SElasticcache) GetExpiredAt

func (self *SElasticcache) GetExpiredAt() time.Time

func (*SElasticcache) GetQuotaKeys

func (cache *SElasticcache) GetQuotaKeys() quotas.IQuotaKeys

func (*SElasticcache) GetSlaveZones

func (self *SElasticcache) GetSlaveZones() ([]SZone, error)

func (*SElasticcache) GetUsages

func (cache *SElasticcache) GetUsages() []db.IUsage

func (*SElasticcache) OnMetadataUpdated

func (self *SElasticcache) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SElasticcache) PerformAddSecgroup

func (*SElasticcache) PerformAllocatePublicConnection

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

func (*SElasticcache) PerformCancelExpire

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

func (*SElasticcache) PerformChangeSpec

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

func (*SElasticcache) PerformFlushInstance

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

func (*SElasticcache) PerformPostpaidExpire

func (self *SElasticcache) PerformPostpaidExpire(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PostpaidExpireInput) (jsonutils.JSONObject, error)

func (*SElasticcache) PerformReleasePublicConnection

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

func (*SElasticcache) PerformRemoteUpdate

func (*SElasticcache) PerformRenew

func (*SElasticcache) PerformResetPassword

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

func (*SElasticcache) PerformRestart

func (*SElasticcache) PerformRevokeSecgroup

func (*SElasticcache) PerformSetAutoRenew

func (self *SElasticcache) PerformSetAutoRenew(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.GuestAutoRenewInput) (jsonutils.JSONObject, error)

设置自动续费 要求实例状态为running 要求实例计费类型为包年包月(预付费)

func (*SElasticcache) PerformSetMaintainTime

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

func (*SElasticcache) PerformSetSecgroup

func (*SElasticcache) PerformSync

func (*SElasticcache) PerformSyncstatus

同步弹性缓存状态

func (*SElasticcache) PerformUpdateAuthMode

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

func (*SElasticcache) PerformUpdateBackupPolicy

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

func (*SElasticcache) PerformUpdateInstanceParameters

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

func (*SElasticcache) PostCreate

func (*SElasticcache) ProcessElasticcacheSecgroupsInput

func (self *SElasticcache) ProcessElasticcacheSecgroupsInput(ctx context.Context, userCred mcclient.TokenCredential, action string, input *api.ElasticcacheSecgroupsInput) ([]string, error)

func (*SElasticcache) SaveRenewInfo

func (cache *SElasticcache) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bcycle *bc.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SElasticcache) SetAutoRenew

func (self *SElasticcache) SetAutoRenew(autoRenew bool) error

func (*SElasticcache) SetDisableDelete

func (cache *SElasticcache) SetDisableDelete(userCred mcclient.TokenCredential, val bool) error

func (*SElasticcache) StartAllocatePublicConnectionTask

func (self *SElasticcache) StartAllocatePublicConnectionTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartChangeSpecTask

func (self *SElasticcache) StartChangeSpecTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartDeleteElasticcacheTask

func (self *SElasticcache) StartDeleteElasticcacheTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartElasticcacheCreateTask

func (self *SElasticcache) StartElasticcacheCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartFlushInstanceTask

func (self *SElasticcache) StartFlushInstanceTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartReleasePublicConnectionTask

func (self *SElasticcache) StartReleasePublicConnectionTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartRemoteUpdateTask

func (self *SElasticcache) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SElasticcache) StartResetPasswordTask

func (self *SElasticcache) StartResetPasswordTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartRestartTask

func (self *SElasticcache) StartRestartTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, data jsonutils.JSONObject) error

func (*SElasticcache) StartSetAutoRenewTask

func (self *SElasticcache) StartSetAutoRenewTask(ctx context.Context, userCred mcclient.TokenCredential, autoRenew bool, parentTaskId string) error

func (*SElasticcache) StartSetMaintainTimeTask

func (self *SElasticcache) StartSetMaintainTimeTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartSyncSecgroupsTask

func (self *SElasticcache) StartSyncSecgroupsTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartSyncTask

func (self *SElasticcache) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartUpdateAuthModeTask

func (self *SElasticcache) StartUpdateAuthModeTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartUpdateBackupPolicyTask

func (self *SElasticcache) StartUpdateBackupPolicyTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) StartUpdateInstanceParametersTask

func (self *SElasticcache) StartUpdateInstanceParametersTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcache) SyncElasticcacheSecgroups

func (self *SElasticcache) SyncElasticcacheSecgroups(ctx context.Context, userCred mcclient.TokenCredential, externalIds []string) compare.SyncResult

func (*SElasticcache) SyncSecgroup

func (*SElasticcache) SyncWithCloudElasticcache

func (self *SElasticcache) SyncWithCloudElasticcache(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extInstance cloudprovider.ICloudElasticcache) error

func (*SElasticcache) ValidateDeleteCondition

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

func (*SElasticcache) ValidatePurgeCondition

func (self *SElasticcache) ValidatePurgeCondition(ctx context.Context) error

func (*SElasticcache) ValidatorAllocatePublicConnectionData

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

func (*SElasticcache) ValidatorChangeSpecData

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

func (*SElasticcache) ValidatorReleasePublicConnectionData

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

func (*SElasticcache) ValidatorResetPasswordData

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

func (*SElasticcache) ValidatorSetMaintainTimeData

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

func (*SElasticcache) ValidatorUpdateAuthModeData

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

func (*SElasticcache) ValidatorUpdateBackupPolicyData

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

func (*SElasticcache) ValidatorUpdateInstanceParametersData

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

type SElasticcacheAccount

type SElasticcacheAccount struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SElasticcacheResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`

	AccountType      string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional"` // 账号类型 normal |admin
	AccountPrivilege string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional"` // 账号权限 read | write | repl(复制, 复制权限支持读写,且开放SYNC/PSYNC命令)
	Password         string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"optional"`              // 账号密码
}

func (*SElasticcacheAccount) CustomizeDelete

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

func (*SElasticcacheAccount) Delete

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

func (*SElasticcacheAccount) GetCreateAliyunElasticcacheAccountParams

func (self *SElasticcacheAccount) GetCreateAliyunElasticcacheAccountParams() (cloudprovider.SCloudElasticCacheAccountInput, error)

func (*SElasticcacheAccount) GetCreateQcloudElasticcacheAccountParams

func (self *SElasticcacheAccount) GetCreateQcloudElasticcacheAccountParams() (cloudprovider.SCloudElasticCacheAccountInput, error)

func (*SElasticcacheAccount) GetDecodedPassword

func (self *SElasticcacheAccount) GetDecodedPassword() (string, error)

func (*SElasticcacheAccount) GetDetailsLoginInfo

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

func (*SElasticcacheAccount) GetOwnerId

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

func (*SElasticcacheAccount) GetRegion

func (self *SElasticcacheAccount) GetRegion() *SCloudregion

func (*SElasticcacheAccount) GetUniqValues

func (self *SElasticcacheAccount) GetUniqValues() jsonutils.JSONObject

func (*SElasticcacheAccount) GetUpdateAliyunElasticcacheAccountParams

func (self *SElasticcacheAccount) GetUpdateAliyunElasticcacheAccountParams(data jsonutils.JSONDict) (cloudprovider.SCloudElasticCacheAccountUpdateInput, error)

func (*SElasticcacheAccount) GetUpdateHuaweiElasticcacheAccountParams

func (self *SElasticcacheAccount) GetUpdateHuaweiElasticcacheAccountParams(data jsonutils.JSONDict) (cloudprovider.SCloudElasticCacheAccountUpdateInput, error)

func (*SElasticcacheAccount) GetUpdateQcloudElasticcacheAccountParams

func (self *SElasticcacheAccount) GetUpdateQcloudElasticcacheAccountParams(data jsonutils.JSONDict) (cloudprovider.SCloudElasticCacheAccountUpdateInput, error)

func (*SElasticcacheAccount) PerformResetPassword

func (*SElasticcacheAccount) PostCreate

func (*SElasticcacheAccount) SavePassword

func (self *SElasticcacheAccount) SavePassword(passwd string) error

func (*SElasticcacheAccount) StartDeleteElasticcacheAccountTask

func (self *SElasticcacheAccount) StartDeleteElasticcacheAccountTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheAccount) StartElasticcacheAccountCreateTask

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

func (*SElasticcacheAccount) StartResetPasswordTask

func (self *SElasticcacheAccount) StartResetPasswordTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheAccount) SyncWithCloudElasticcacheAccount

func (self *SElasticcacheAccount) SyncWithCloudElasticcacheAccount(ctx context.Context, userCred mcclient.TokenCredential, extAccount cloudprovider.ICloudElasticcacheAccount) error

func (*SElasticcacheAccount) ValidatePurgeCondition

func (self *SElasticcacheAccount) ValidatePurgeCondition(ctx context.Context) error

func (*SElasticcacheAccount) ValidatorResetPasswordData

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

type SElasticcacheAccountManager

SElasticcache.Account

var ElasticcacheAccountManager *SElasticcacheAccountManager

func (*SElasticcacheAccountManager) FetchCustomizeColumns

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

func (*SElasticcacheAccountManager) FetchOwnerId

func (*SElasticcacheAccountManager) FetchUniqValues

func (*SElasticcacheAccountManager) FilterByOwner

func (*SElasticcacheAccountManager) FilterByUniqValues

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

func (*SElasticcacheAccountManager) ListItemExportKeys

func (*SElasticcacheAccountManager) ListItemFilter

弹性缓存账号列表

func (*SElasticcacheAccountManager) OrderByExtraFields

func (*SElasticcacheAccountManager) QueryDistinctExtraField

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

func (*SElasticcacheAccountManager) ResourceScope

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

func (*SElasticcacheAccountManager) SyncElasticcacheAccounts

func (manager *SElasticcacheAccountManager) SyncElasticcacheAccounts(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, cloudElasticcacheAccounts []cloudprovider.ICloudElasticcacheAccount) compare.SyncResult

func (*SElasticcacheAccountManager) ValidateCreateData

type SElasticcacheAcl

type SElasticcacheAcl struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SElasticcacheResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`

	// Ip地址白名单列表
	IpList string `width:"256" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required" json:"ip_list"`
}

func (*SElasticcacheAcl) CustomizeDelete

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

func (*SElasticcacheAcl) Delete

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

func (*SElasticcacheAcl) GetOwnerId

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

func (*SElasticcacheAcl) GetRegion

func (self *SElasticcacheAcl) GetRegion() *SCloudregion

func (*SElasticcacheAcl) GetUniqValues

func (self *SElasticcacheAcl) GetUniqValues() jsonutils.JSONObject

func (*SElasticcacheAcl) PostCreate

func (*SElasticcacheAcl) PostUpdate

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

func (*SElasticcacheAcl) StartDeleteElasticcacheAclTask

func (self *SElasticcacheAcl) StartDeleteElasticcacheAclTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheAcl) StartElasticcacheAclCreateTask

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

func (*SElasticcacheAcl) StartUpdateElasticcacheAclTask

func (self *SElasticcacheAcl) StartUpdateElasticcacheAclTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheAcl) SyncWithCloudElasticcacheAcl

func (self *SElasticcacheAcl) SyncWithCloudElasticcacheAcl(ctx context.Context, userCred mcclient.TokenCredential, extAcl cloudprovider.ICloudElasticcacheAcl) error

func (*SElasticcacheAcl) ValidateDeleteCondition

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

func (*SElasticcacheAcl) ValidatePurgeCondition

func (self *SElasticcacheAcl) ValidatePurgeCondition(ctx context.Context) error

func (*SElasticcacheAcl) ValidateUpdateData

func (self *SElasticcacheAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SElasticcacheAclManager

SElasticcache.Acl

var ElasticcacheAclManager *SElasticcacheAclManager

func (*SElasticcacheAclManager) FetchCustomizeColumns

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

func (*SElasticcacheAclManager) FetchOwnerId

func (*SElasticcacheAclManager) FetchUniqValues

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

func (*SElasticcacheAclManager) FilterByOwner

func (*SElasticcacheAclManager) FilterByUniqValues

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

func (*SElasticcacheAclManager) ListItemExportKeys

func (*SElasticcacheAclManager) ListItemFilter

弹性缓存ACL规则列表

func (*SElasticcacheAclManager) OrderByExtraFields

func (manager *SElasticcacheAclManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.ElasticcacheAclListInput,
) (*sqlchemy.SQuery, error)

func (*SElasticcacheAclManager) QueryDistinctExtraField

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

func (*SElasticcacheAclManager) ResourceScope

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

func (*SElasticcacheAclManager) SyncElasticcacheAcls

func (manager *SElasticcacheAclManager) SyncElasticcacheAcls(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, cloudElasticcacheAcls []cloudprovider.ICloudElasticcacheAcl) compare.SyncResult

func (*SElasticcacheAclManager) ValidateCreateData

type SElasticcacheBackup

type SElasticcacheBackup struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SElasticcacheResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`

	// 备份大小
	BackupSizeMb int `nullable:"false" list:"user" create:"optional"`

	// 备份类型, 全量|增量额
	BackupType string `width:"32" charset:"ascii" nullable:"true" create:"optional" list:"user"`

	// 备份模式,自动|手动
	BackupMode string `width:"32" charset:"ascii" nullable:"true" create:"optional" list:"user"`

	// 下载地址
	DownloadURL string `width:"512" charset:"ascii" nullable:"true" create:"optional" list:"user"`

	// 开始备份时间
	StartTime time.Time `list:"user" create:"optional"`
	// 结束备份时间
	EndTime time.Time `list:"user" create:"optional"`
}

func (*SElasticcacheBackup) GetOwnerId

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

func (*SElasticcacheBackup) GetRegion

func (self *SElasticcacheBackup) GetRegion() *SCloudregion

func (*SElasticcacheBackup) GetUniqValues

func (self *SElasticcacheBackup) GetUniqValues() jsonutils.JSONObject

func (*SElasticcacheBackup) PerformRestoreInstance

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

func (*SElasticcacheBackup) PostCreate

func (*SElasticcacheBackup) StartElasticcacheBackupCreateTask

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

func (*SElasticcacheBackup) StartRestoreInstanceTask

func (self *SElasticcacheBackup) StartRestoreInstanceTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheBackup) SyncWithCloudElasticcacheBackup

func (self *SElasticcacheBackup) SyncWithCloudElasticcacheBackup(ctx context.Context, userCred mcclient.TokenCredential, extBackup cloudprovider.ICloudElasticcacheBackup) error

func (*SElasticcacheBackup) ValidateDeleteCondition

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

func (*SElasticcacheBackup) ValidatePurgeCondition

func (self *SElasticcacheBackup) ValidatePurgeCondition(ctx context.Context) error

func (*SElasticcacheBackup) ValidatorRestoreInstanceData

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

type SElasticcacheBackupManager

SElasticcache.Backup

var ElasticcacheBackupManager *SElasticcacheBackupManager

func (*SElasticcacheBackupManager) FetchCustomizeColumns

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

func (*SElasticcacheBackupManager) FetchOwnerId

func (*SElasticcacheBackupManager) FetchUniqValues

func (*SElasticcacheBackupManager) FilterByOwner

func (*SElasticcacheBackupManager) FilterByUniqValues

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

func (*SElasticcacheBackupManager) ListItemExportKeys

func (*SElasticcacheBackupManager) ListItemFilter

弹性缓存备份列表

func (*SElasticcacheBackupManager) OrderByExtraFields

func (*SElasticcacheBackupManager) QueryDistinctExtraField

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

func (*SElasticcacheBackupManager) ResourceScope

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

func (*SElasticcacheBackupManager) SyncElasticcacheBackups

func (manager *SElasticcacheBackupManager) SyncElasticcacheBackups(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, cloudElasticcacheBackups []cloudprovider.ICloudElasticcacheBackup) compare.SyncResult

func (*SElasticcacheBackupManager) ValidateCreateData

type SElasticcacheJointsManager

type SElasticcacheJointsManager struct {
	db.SVirtualJointResourceBaseManager
	SElasticcacheResourceBaseManager
}

func NewElasticcacheJointsManager

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

func (*SElasticcacheJointsManager) FetchCustomizeColumns

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

func (*SElasticcacheJointsManager) GetMasterFieldName

func (manager *SElasticcacheJointsManager) GetMasterFieldName() string

func (*SElasticcacheJointsManager) ListItemExportKeys

func (*SElasticcacheJointsManager) ListItemFilter

func (*SElasticcacheJointsManager) OrderByExtraFields

type SElasticcacheManager

var ElasticcacheManager *SElasticcacheManager

func (*SElasticcacheManager) BatchCreateValidateCreateData

func (manager *SElasticcacheManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SElasticcacheManager) DeleteExpiredPostpaids

func (manager *SElasticcacheManager) DeleteExpiredPostpaids(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SElasticcacheManager) FetchCustomizeColumns

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

func (*SElasticcacheManager) GetExpiredModels

func (manager *SElasticcacheManager) GetExpiredModels(advanceDay int) ([]IBillingModel, error)

func (*SElasticcacheManager) GetOwnerIdByElasticcacheId

func (manager *SElasticcacheManager) GetOwnerIdByElasticcacheId(elasticcacheId string) mcclient.IIdentityProvider

func (*SElasticcacheManager) ListItemExportKeys

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

func (*SElasticcacheManager) ListItemFilter

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

列出弹性缓存(redis等)

func (*SElasticcacheManager) OrderByExtraFields

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

func (*SElasticcacheManager) QueryDistinctExtraField

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

func (*SElasticcacheManager) SyncElasticcaches

func (*SElasticcacheManager) TotalCount

func (man *SElasticcacheManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (int, error)

func (*SElasticcacheManager) ValidateCreateData

type SElasticcacheParameter

type SElasticcacheParameter struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SElasticcacheResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`

	// Parameter KEY
	Key string `width:"64" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`

	// Parameter Value
	Value string `width:"256" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`

	// 校验代码,参数的可选范围。
	ValueRange string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// True(可修改)   False(不可修改)
	Modifiable bool `nullable:"true" list:"user" create:"optional"`

	// True(重启生效) False(无需重启,提交后即生效)
	ForceRestart bool `nullable:"true" list:"user" create:"optional"`
}

func (*SElasticcacheParameter) GetOwnerId

func (*SElasticcacheParameter) GetRegion

func (self *SElasticcacheParameter) GetRegion() *SCloudregion

func (*SElasticcacheParameter) PostUpdate

func (*SElasticcacheParameter) StartUpdateElasticcacheParameterTask

func (self *SElasticcacheParameter) StartUpdateElasticcacheParameterTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SElasticcacheParameter) SyncWithCloudElasticcacheParameter

func (self *SElasticcacheParameter) SyncWithCloudElasticcacheParameter(ctx context.Context, userCred mcclient.TokenCredential, extParameter cloudprovider.ICloudElasticcacheParameter) error

func (*SElasticcacheParameter) ValidatePurgeCondition

func (self *SElasticcacheParameter) ValidatePurgeCondition(ctx context.Context) error

func (*SElasticcacheParameter) ValidateUpdateData

func (self *SElasticcacheParameter) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SElasticcacheParameterManager

SElasticcache.Parameter

var ElasticcacheParameterManager *SElasticcacheParameterManager

func (*SElasticcacheParameterManager) FetchCustomizeColumns

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

func (*SElasticcacheParameterManager) FetchOwnerId

func (*SElasticcacheParameterManager) FilterByOwner

func (*SElasticcacheParameterManager) ListItemExportKeys

func (*SElasticcacheParameterManager) ListItemFilter

列出弹性缓存参数

func (*SElasticcacheParameterManager) OrderByExtraFields

func (*SElasticcacheParameterManager) QueryDistinctExtraField

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

func (*SElasticcacheParameterManager) ResourceScope

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

func (*SElasticcacheParameterManager) SyncElasticcacheParameters

func (manager *SElasticcacheParameterManager) SyncElasticcacheParameters(ctx context.Context, userCred mcclient.TokenCredential, elasticcache *SElasticcache, cloudElasticcacheParameters []cloudprovider.ICloudElasticcacheParameter) compare.SyncResult

type SElasticcacheResourceBase

type SElasticcacheResourceBase struct {
	// 弹性缓存ID
	ElasticcacheId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true" json:"elasticcache_id"`
}

func (*SElasticcacheResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SElasticcacheResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SElasticcacheResourceBase) GetElasticcache

func (self *SElasticcacheResourceBase) GetElasticcache() (*SElasticcache, error)

func (*SElasticcacheResourceBase) GetIRegion

func (*SElasticcacheResourceBase) GetVpc

func (self *SElasticcacheResourceBase) GetVpc() *SVpc

type SElasticcacheResourceBaseManager

type SElasticcacheResourceBaseManager struct {
	SVpcResourceBaseManager
	SZoneResourceBaseManager
}

func (*SElasticcacheResourceBaseManager) FetchCustomizeColumns

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

func (*SElasticcacheResourceBaseManager) GetExportKeys

func (manager *SElasticcacheResourceBaseManager) GetExportKeys() []string

func (*SElasticcacheResourceBaseManager) GetOrderByFields

func (manager *SElasticcacheResourceBaseManager) GetOrderByFields(query api.ElasticcacheFilterListInput) []string

func (*SElasticcacheResourceBaseManager) GetOrderBySubQuery

func (*SElasticcacheResourceBaseManager) ListItemExportKeys

func (*SElasticcacheResourceBaseManager) ListItemFilter

func (*SElasticcacheResourceBaseManager) OrderByExtraFields

func (*SElasticcacheResourceBaseManager) QueryDistinctExtraField

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

type SElasticcacheSku

type SElasticcacheSku struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SCloudregionResourceBase // 区域
	SZoneResourceBase        // 主可用区

	SlaveZoneId string `width:"64" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"` // 备可用区

	InstanceSpec  string `width:"96" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	EngineArch    string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	LocalCategory string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:""`

	PrepaidStatus  string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"`
	PostpaidStatus string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"`

	// 引擎	redis|memcached
	Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 引擎版本	3.0
	EngineVersion string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// CPU 架构 x86|ARM
	CpuArch string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 存储类型	DRAM|SCM
	StorageType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// standrad|enhanced
	PerformanceType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"admin_optional" update:"admin"`

	// 内存容量
	MemorySizeMB int `nullable:"false" list:"user" create:"admin_required" update:"admin"`
	// 套餐附带硬盘容量
	DiskSizeGB int `nullable:"false" list:"user" create:"admin_required" update:"admin"`
	// 最小分片数量
	ShardNum int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 最大分片数量
	MaxShardNum int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 最小副本数量
	ReplicasNum int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 最大副本数量
	MaxReplicasNum int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`

	// 最大客户端数
	MaxClients int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 最大连接数
	MaxConnections int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 最大内网带宽
	MaxInBandwidthMb int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// 实际可使用的最大内存
	MaxMemoryMB int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`
	// QPS参考值
	QPS int `nullable:"false" list:"user" create:"admin_optional" update:"admin"`

	// 公有云厂商	Aliyun/Azure/AWS/Qcloud/...
	Provider string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"admin_required" update:"admin"`
}

func (SElasticcacheSku) GetGlobalId

func (self SElasticcacheSku) GetGlobalId() string

func (*SElasticcacheSku) MarkAsSoldout

func (self *SElasticcacheSku) MarkAsSoldout(ctx context.Context) error

type SElasticcacheSkuManager

var ElasticcacheSkuManager *SElasticcacheSkuManager

func (*SElasticcacheSkuManager) FetchCustomizeColumns

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

func (*SElasticcacheSkuManager) FetchSkusByRegion

func (manager *SElasticcacheSkuManager) FetchSkusByRegion(regionID string) ([]SElasticcacheSku, error)

获取region下所有Available状态的sku id

func (*SElasticcacheSkuManager) FetchSlaveZoneResourceInfos

func (self *SElasticcacheSkuManager) FetchSlaveZoneResourceInfos(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{}) []api.SlaveZoneResourceInfoBase

func (*SElasticcacheSkuManager) GetPropertyCapability

func (manager *SElasticcacheSkuManager) GetPropertyCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticcacheSkuManager) GetPropertyInstanceSpecs

func (manager *SElasticcacheSkuManager) GetPropertyInstanceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticcacheSkuManager) GetPropertySyncTasks

func (manager *SElasticcacheSkuManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SElasticcacheSkuManager) GetSkuCountByRegion

func (manager *SElasticcacheSkuManager) GetSkuCountByRegion(regionId string) (int, error)

func (*SElasticcacheSkuManager) ListItemExportKeys

func (*SElasticcacheSkuManager) ListItemFilter

弹性缓存套餐规格列表

func (*SElasticcacheSkuManager) OrderByExtraFields

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

func (*SElasticcacheSkuManager) PerformActionSync

func (manager *SElasticcacheSkuManager) PerformActionSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticcacheSkuManager) PerformSyncSkus

func (*SElasticcacheSkuManager) QueryDistinctExtraField

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

func (*SElasticcacheSkuManager) SyncElasticcacheSkus

func (manager *SElasticcacheSkuManager) SyncElasticcacheSkus(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, extSkuMeta *SSkuResourcesMeta) compare.SyncResult

type SElasticcachesecgroup

type SElasticcachesecgroup struct {
	SElasticcacheJointsBase

	SSecurityGroupResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SElasticcachesecgroup) Delete

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

type SElasticcachesecgroupManager

type SElasticcachesecgroupManager struct {
	SElasticcacheJointsManager
	SSecurityGroupResourceBaseManager
}
var ElasticcachesecgroupManager *SElasticcachesecgroupManager

func (*SElasticcachesecgroupManager) FetchCustomizeColumns

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

func (*SElasticcachesecgroupManager) GetSlaveFieldName

func (manager *SElasticcachesecgroupManager) GetSlaveFieldName() string

func (*SElasticcachesecgroupManager) ListItemExportKeys

func (*SElasticcachesecgroupManager) ListItemFilter

func (*SElasticcachesecgroupManager) OrderByExtraFields

type SElasticip

type SElasticip struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`

	SBillingResourceBase

	// IP子网Id, 仅私有云不为空
	NetworkId string `width:"36" charset:"ascii" nullable:"true" get:"user" list:"user" create:"optional"`
	// 标识弹性或非弹性
	// | Mode       | 说明       |
	// |------------|------------|
	// | public_ip  | 公网IP     |
	// | elastic_ip | 弹性公网IP |
	//
	// example: elastic_ip
	Mode string `width:"32" charset:"ascii" get:"user" list:"user" create:"optional"`

	// IP地址
	IpAddr string `width:"17" charset:"ascii" list:"user" update:"admin"`

	// 绑定资源类型
	AssociateType string `width:"32" charset:"ascii" list:"user" update:"admin"`
	// 绑定资源Id
	AssociateId string `width:"256" charset:"ascii" list:"user" update:"admin"`

	// 带宽大小
	Bandwidth int `list:"user" create:"optional" default:"0"`

	// 计费类型: 流量、带宽
	// example: bandwidth
	ChargeType string `width:"64" name:"charge_type" list:"user" create:"required"`
	// 线路类型
	BgpType string `width:"64" charset:"utf8" nullable:"true" get:"user" list:"user" create:"optional"`

	// 是否跟随主机删除而自动释放
	AutoDellocate tristate.TriState `default:"false" get:"user" create:"optional" update:"user"`
}

func (*SElasticip) AllocateAndAssociateInstance

func (eip *SElasticip) AllocateAndAssociateInstance(ctx context.Context, userCred mcclient.TokenCredential, ins IEipAssociateInstance, input api.ElasticipAssociateInput, parentTaskId string) error

func (*SElasticip) AssociateInstance

func (self *SElasticip) AssociateInstance(ctx context.Context, userCred mcclient.TokenCredential, insType string, ins db.IStatusStandaloneModel) error

func (*SElasticip) AssociateInstanceGroup

func (self *SElasticip) AssociateInstanceGroup(ctx context.Context, userCred mcclient.TokenCredential, insType string, ins db.IStatusStandaloneModel) error

func (*SElasticip) AssociateLoadbalancer

func (self *SElasticip) AssociateLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer) error

func (*SElasticip) AssociateNatGateway

func (self *SElasticip) AssociateNatGateway(ctx context.Context, userCred mcclient.TokenCredential, nat *SNatGateway) 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) GetAssociateInstanceGroup

func (self *SElasticip) GetAssociateInstanceGroup() *SGroup

func (*SElasticip) GetAssociateLoadbalancer

func (self *SElasticip) GetAssociateLoadbalancer() *SLoadbalancer

func (*SElasticip) GetAssociateNatGateway

func (self *SElasticip) GetAssociateNatGateway() *SNatGateway

func (*SElasticip) GetAssociateResource

func (self *SElasticip) GetAssociateResource() db.IModel

func (*SElasticip) GetAssociateVM

func (self *SElasticip) GetAssociateVM() *SGuest

func (*SElasticip) GetIEip

func (self *SElasticip) GetIEip(ctx context.Context) (cloudprovider.ICloudEIP, error)

func (*SElasticip) GetIRegion

func (self *SElasticip) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SElasticip) GetNetwork

func (self *SElasticip) GetNetwork() (*SNetwork, error)

func (*SElasticip) GetQuotaKeys

func (eip *SElasticip) GetQuotaKeys() (quotas.IQuotaKeys, error)

func (*SElasticip) GetShortDesc

func (self *SElasticip) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SElasticip) GetUsages

func (eip *SElasticip) GetUsages() []db.IUsage

func (*SElasticip) GetZone

func (self *SElasticip) GetZone() (*SZone, error)

func (*SElasticip) IsAssociated

func (self *SElasticip) IsAssociated() bool

func (*SElasticip) PerformAssociate

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 (*SElasticip) PerformPurge

func (*SElasticip) PerformSync

func (*SElasticip) PerformSyncstatus

同步弹性公网IP状态

func (*SElasticip) PostCreate

func (*SElasticip) RealDelete

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

func (*SElasticip) StartEipAssociateInstanceTask

func (self *SElasticip) StartEipAssociateInstanceTask(ctx context.Context, userCred mcclient.TokenCredential, input api.ElasticipAssociateInput, parentTaskId string) error

func (*SElasticip) StartEipAssociateTask

func (self *SElasticip) StartEipAssociateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) 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, autoDelete bool, 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(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, ext cloudprovider.ICloudEIP, syncOwnerId mcclient.IIdentityProvider) error

func (*SElasticip) ValidateDeleteCondition

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

type SElasticipManager

var ElasticipManager *SElasticipManager

func (*SElasticipManager) FetchCustomizeColumns

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

func (*SElasticipManager) ListItemExportKeys

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

func (*SElasticipManager) ListItemFilter

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

弹性公网IP列表

func (*SElasticipManager) NewEipForVMOnHost

func (manager *SElasticipManager) NewEipForVMOnHost(ctx context.Context, userCred mcclient.TokenCredential, args *NewEipForVMOnHostArgs) (*SElasticip, error)

func (*SElasticipManager) OrderByExtraFields

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

func (*SElasticipManager) QueryDistinctExtraField

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

func (*SElasticipManager) SyncEips

func (*SElasticipManager) TotalCount

func (manager *SElasticipManager) TotalCount(scope rbacutils.TRbacScope, ownerId mcclient.IIdentityProvider, rangeObjs []db.IStandaloneModel, providers []string, brands []string, cloudEnv string, policyResult rbacutils.SPolicyResult) EipUsage

func (*SElasticipManager) ValidateCreateData

type SEsCountStat

type SEsCountStat struct {
	TotalEsCount   int
	TotalCpuCount  int
	TotalMemSizeGb int
}

type SExternalProject

type SExternalProject struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase

	ExternalDomainId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 归属云账号ID
	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func GetAvailableExternalProject

func GetAvailableExternalProject(local *db.STenant, projects []SExternalProject) *SExternalProject

func (*SExternalProject) GetCloudaccount

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

func (*SExternalProject) PerformChangeProject

切换本地项目

func (*SExternalProject) SyncWithCloudProject

func (self *SExternalProject) SyncWithCloudProject(ctx context.Context, userCred mcclient.TokenCredential, account *SCloudaccount, ext cloudprovider.ICloudProject) error

type SExternalProjectManager

var ExternalProjectManager *SExternalProjectManager

func (*SExternalProjectManager) FetchCustomizeColumns

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

func (*SExternalProjectManager) GetProject

func (manager *SExternalProjectManager) GetProject(externalId string, providerId string) (*SExternalProject, error)

func (*SExternalProjectManager) InitializeData

func (manager *SExternalProjectManager) InitializeData() error

func (*SExternalProjectManager) ListItemExportKeys

func (*SExternalProjectManager) ListItemFilter

云平台导入项目列表

func (*SExternalProjectManager) OrderByExtraFields

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

func (*SExternalProjectManager) QueryDistinctExtraField

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

func (*SExternalProjectManager) SyncProjects

func (*SExternalProjectManager) ValidateCreateData

type SFileSystem

type SFileSystem struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SZoneResourceBase

	SDeletePreventableResourceBase

	// 文件系统类型
	// enmu: extreme, standard, cpfs
	FileSystemType string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required"`

	// 存储类型
	// enmu: performance, capacity, standard, advance, advance_100, advance_200
	StorageType string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 协议类型
	// enum: NFS, SMB, cpfs
	Protocol string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 容量, 单位Gb
	Capacity int64 `nullable:"false" list:"user" create:"optional"`
	// 已使用容量, 单位Gb
	UsedCapacity int64 `nullable:"false" list:"user"`

	// 最多支持挂载点数量, -1代表无限制
	MountTargetCountLimit int `nullable:"false" list:"user" default:"-1"`
}

func (*SFileSystem) CustomizeDelete

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

func (*SFileSystem) Delete

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

func (*SFileSystem) GetCloudproviderId

func (self *SFileSystem) GetCloudproviderId() string

func (*SFileSystem) GetICloudFileSystem

func (self *SFileSystem) GetICloudFileSystem(ctx context.Context) (cloudprovider.ICloudFileSystem, error)

func (*SFileSystem) GetIRegion

func (self *SFileSystem) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SFileSystem) GetMountTargets

func (self *SFileSystem) GetMountTargets() ([]SMountTarget, error)

func (*SFileSystem) OnMetadataUpdated

func (self *SFileSystem) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SFileSystem) PerformRemoteUpdate

func (*SFileSystem) PerformSyncstatus

同步NAS状态

func (*SFileSystem) PostCreate

func (*SFileSystem) RealDelete

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

func (*SFileSystem) StartCreateTask

func (self *SFileSystem) StartCreateTask(ctx context.Context, userCred mcclient.TokenCredential, networkId string, parentTaskId string) error

func (*SFileSystem) StartDeleteTask

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

func (*SFileSystem) StartRemoteUpdateTask

func (self *SFileSystem) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SFileSystem) StartSyncstatus

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

func (*SFileSystem) SyncAllWithCloudFileSystem

func (self *SFileSystem) SyncAllWithCloudFileSystem(ctx context.Context, userCred mcclient.TokenCredential, fs cloudprovider.ICloudFileSystem) error

func (*SFileSystem) SyncMountTargets

func (self *SFileSystem) SyncMountTargets(ctx context.Context, userCred mcclient.TokenCredential, extMounts []cloudprovider.ICloudMountTarget) compare.SyncResult

func (*SFileSystem) SyncWithCloudFileSystem

func (self *SFileSystem) SyncWithCloudFileSystem(ctx context.Context, userCred mcclient.TokenCredential, fs cloudprovider.ICloudFileSystem) error

func (*SFileSystem) ValidateDeleteCondition

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

type SFileSystemManager

var FileSystemManager *SFileSystemManager

func (*SFileSystemManager) DeleteExpiredPostpaids

func (manager *SFileSystemManager) DeleteExpiredPostpaids(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (SFileSystemManager) FetchCustomizeColumns

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

func (*SFileSystemManager) GetContextManagers

func (manager *SFileSystemManager) GetContextManagers() [][]db.IModelManager

func (*SFileSystemManager) ListItemExportKeys

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

func (*SFileSystemManager) ListItemFilter

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

func (*SFileSystemManager) OrderByExtraFields

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

func (*SFileSystemManager) QueryDistinctExtraField

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

func (*SFileSystemManager) ValidateCreateData

type SGlobalVpc

func (*SGlobalVpc) CustomizeDelete

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

func (*SGlobalVpc) Delete

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

func (*SGlobalVpc) GetChangeOwnerRequiredDomainIds

func (globalVpc *SGlobalVpc) GetChangeOwnerRequiredDomainIds() []string

func (*SGlobalVpc) GetICloudGlobalVpc

func (self *SGlobalVpc) GetICloudGlobalVpc(ctx context.Context) (cloudprovider.ICloudGlobalVpc, error)

func (*SGlobalVpc) GetRequiredSharedDomainIds

func (globalVpc *SGlobalVpc) GetRequiredSharedDomainIds() []string

func (*SGlobalVpc) GetUsages

func (globalVpc *SGlobalVpc) GetUsages() []db.IUsage

func (*SGlobalVpc) GetVpcCount

func (self *SGlobalVpc) GetVpcCount() (int, error)

func (*SGlobalVpc) GetVpcQuery

func (self *SGlobalVpc) GetVpcQuery() *sqlchemy.SQuery

func (*SGlobalVpc) GetVpcs

func (self *SGlobalVpc) GetVpcs() ([]SVpc, error)

func (*SGlobalVpc) PerformSyncstatus

func (self *SGlobalVpc) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.SyncstatusInput) (jsonutils.JSONObject, error)

同步全局VPC状态

func (*SGlobalVpc) PostCreate

func (*SGlobalVpc) RealDelete

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

func (*SGlobalVpc) StartCreateTask

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

func (*SGlobalVpc) StartDeleteTask

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

func (*SGlobalVpc) StartSyncstatusTask

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

func (*SGlobalVpc) SyncWithCloudGlobalVpc

func (self *SGlobalVpc) SyncWithCloudGlobalVpc(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudGlobalVpc) error

func (*SGlobalVpc) ValidateDeleteCondition

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

func (*SGlobalVpc) ValidateUpdateCondition

func (self *SGlobalVpc) ValidateUpdateCondition(ctx context.Context) error

func (*SGlobalVpc) ValidateUpdateData

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

type SGlobalVpcManager

var GlobalVpcManager *SGlobalVpcManager

func (*SGlobalVpcManager) FetchCustomizeColumns

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

func (*SGlobalVpcManager) ListItemFilter

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

全局VPC列表

func (*SGlobalVpcManager) OrderByExtraFields

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

func (*SGlobalVpcManager) QueryDistinctExtraField

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

func (*SGlobalVpcManager) ValidateCreateData

type SGlobalVpcResourceBase

type SGlobalVpcResourceBase struct {
	GlobalvpcId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"globalvpc_id"`
}

func (*SGlobalVpcResourceBase) GetGlobalVpc

func (self *SGlobalVpcResourceBase) GetGlobalVpc() (*SGlobalVpc, error)

type SGlobalVpcResourceBaseManager

type SGlobalVpcResourceBaseManager struct{}

func (*SGlobalVpcResourceBaseManager) FetchCustomizeColumns

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

func (*SGlobalVpcResourceBaseManager) GetExportKeys

func (manager *SGlobalVpcResourceBaseManager) GetExportKeys() []string

func (*SGlobalVpcResourceBaseManager) ListItemExportKeys

func (*SGlobalVpcResourceBaseManager) ListItemFilter

func (*SGlobalVpcResourceBaseManager) OrderByExtraFields

func (*SGlobalVpcResourceBaseManager) QueryDistinctExtraField

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

type SGroup

type SGroup struct {
	db.SVirtualResourceBase

	SZoneResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	db.SEnabledResourceBase `nullable:"false" default:"true" create:"optional" list:"user" update:"user"`

	// 服务类型
	ServiceType string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	ParentId    string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	// 调度策略
	SchedStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"user" create:"optional"`

	// the upper limit number of guests with this group in a host
	Granularity     int               `nullable:"false" list:"user" get:"user" create:"optional" update:"user" default:"1"`
	ForceDispersion tristate.TriState `list:"user" get:"user" create:"optional" update:"user" default:"true"`
}

func ValidateGroupResourceInput

func ValidateGroupResourceInput(userCred mcclient.TokenCredential, input api.GroupResourceInput) (*SGroup, api.GroupResourceInput, error)

func (*SGroup) ClearAllScheDescCache

func (group *SGroup) ClearAllScheDescCache() error

func (*SGroup) Delete

func (grp *SGroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGroup) GetGuestCount

func (group *SGroup) GetGuestCount() int

func (*SGroup) GetGuests

func (group *SGroup) GetGuests() []SGuest

func (*SGroup) GetNetworks

func (group *SGroup) GetNetworks() ([]SGroupnetwork, error)

func (*SGroup) GetVpc

func (grp *SGroup) GetVpc() (*SVpc, error)

func (*SGroup) PerformAssociateEip

func (grp *SGroup) PerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerAssociateEipInput) (jsonutils.JSONObject, error)

func (*SGroup) PerformAttachnetwork

func (grp *SGroup) PerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.GroupAttachNetworkInput) (*api.SGroup, error)

func (*SGroup) PerformBindGuests

func (group *SGroup) PerformBindGuests(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGroup) PerformCreateEip

func (grp *SGroup) PerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerCreateEipInput) (jsonutils.JSONObject, error)

func (*SGroup) PerformDetachnetwork

func (grp *SGroup) PerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.GroupDetachNetworkInput) (*api.SGroup, error)

func (*SGroup) PerformDisable

func (group *SGroup) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)

func (*SGroup) PerformDissociateEip

func (grp *SGroup) PerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerDissociateEipInput) (jsonutils.JSONObject, error)

func (*SGroup) PerformEnable

func (group *SGroup) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)

func (*SGroup) PerformUnbindGuests

func (group *SGroup) PerformUnbindGuests(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGroup) ValidateDeleteCondition

func (group *SGroup) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SGroupJointsBase

type SGroupJointsBase struct {
	db.SVirtualJointResourceBase

	GroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SGroupJointsBase) GetGroup

func (self *SGroupJointsBase) GetGroup() *SGroup

type SGroupJointsManager

type SGroupJointsManager struct {
	db.SVirtualJointResourceBaseManager
	SGroupResourceBaseManager
}

func NewGroupJointsManager

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

func (*SGroupJointsManager) FetchCustomizeColumns

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

func (*SGroupJointsManager) GetMasterFieldName

func (manager *SGroupJointsManager) GetMasterFieldName() string

func (*SGroupJointsManager) ListItemExportKeys

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

func (*SGroupJointsManager) ListItemFilter

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

func (*SGroupJointsManager) OrderByExtraFields

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

type SGroupManager

var GroupManager *SGroupManager

func (*SGroupManager) FetchCustomizeColumns

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

func (*SGroupManager) ListItemExportKeys

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

func (*SGroupManager) ListItemFilter

func (sm *SGroupManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.InstanceGroupListInput,
) (*sqlchemy.SQuery, error)

主机组列表

func (*SGroupManager) OrderByExtraFields

func (sm *SGroupManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.InstanceGroupListInput,
) (*sqlchemy.SQuery, error)

func (*SGroupManager) QueryDistinctExtraField

func (sm *SGroupManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SGroupResourceBase

type SGroupResourceBase struct {
	// 实例组ID
	GroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SGroupResourceBase) GetGroup

func (self *SGroupResourceBase) GetGroup() *SGroup

type SGroupResourceBaseManager

type SGroupResourceBaseManager struct {
}

func (*SGroupResourceBaseManager) FetchCustomizeColumns

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

func (*SGroupResourceBaseManager) GetExportKeys

func (manager *SGroupResourceBaseManager) GetExportKeys() []string

func (*SGroupResourceBaseManager) GetOrderByFields

func (manager *SGroupResourceBaseManager) GetOrderByFields(query api.GroupFilterListInput) []string

func (*SGroupResourceBaseManager) GetOrderBySubQuery

func (manager *SGroupResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.GroupFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SGroupResourceBaseManager) ListItemExportKeys

func (*SGroupResourceBaseManager) ListItemFilter

func (*SGroupResourceBaseManager) OrderByExtraFields

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

func (*SGroupResourceBaseManager) QueryDistinctExtraField

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

type SGroupguest

type SGroupguest struct {
	SGroupJointsBase

	Tag         string `width:"256" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	GuestId     string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
	GuestStatus string `width:"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

type SGroupguestManager

type SGroupguestManager struct {
	SGroupJointsManager
	SGuestResourceBaseManager
}
var GroupguestManager *SGroupguestManager

func (*SGroupguestManager) Attach

func (self *SGroupguestManager) Attach(ctx context.Context, groupId, guestId string) (*SGroupguest, error)

func (*SGroupguestManager) FetchByGroupId

func (self *SGroupguestManager) FetchByGroupId(groupId string) ([]SGroupguest, error)

func (*SGroupguestManager) FetchByGuestId

func (self *SGroupguestManager) FetchByGuestId(guestId string) ([]SGroupguest, error)

func (*SGroupguestManager) FetchCustomizeColumns

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

func (*SGroupguestManager) GetSlaveFieldName

func (manager *SGroupguestManager) GetSlaveFieldName() string

func (*SGroupguestManager) ListItemExportKeys

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

func (*SGroupguestManager) ListItemFilter

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

func (*SGroupguestManager) OrderByExtraFields

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

type SGroupnetwork

type SGroupnetwork struct {
	SGroupJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` // 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" list:"user"` // 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) GetNetwork

func (self *SGroupnetwork) GetNetwork() *SNetwork

type SGroupnetworkManager

type SGroupnetworkManager struct {
	SGroupJointsManager
	SNetworkResourceBaseManager
}
var GroupnetworkManager *SGroupnetworkManager

func (*SGroupnetworkManager) FetchByGroupId

func (manager *SGroupnetworkManager) FetchByGroupId(groupId string) ([]SGroupnetwork, error)

func (*SGroupnetworkManager) FetchCustomizeColumns

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

func (*SGroupnetworkManager) GetSlaveFieldName

func (manager *SGroupnetworkManager) GetSlaveFieldName() string

func (*SGroupnetworkManager) InitializeData

func (manager *SGroupnetworkManager) InitializeData() error

func (*SGroupnetworkManager) ListItemExportKeys

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

func (*SGroupnetworkManager) ListItemFilter

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

func (*SGroupnetworkManager) OrderByExtraFields

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

type SGuest

type SGuest struct {
	db.SVirtualResourceBase

	db.SExternalizedResourceBase

	SBillingResourceBase
	SDeletePreventableResourceBase
	db.SMultiArchResourceBase
	db.SRecordChecksumResourceBase

	SHostnameResourceBase
	SHostResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" get:"user" index:"true"`

	db.SEncryptedResource

	// CPU大小
	VcpuCount int `nullable:"false" default:"1" list:"user" create:"optional"`
	// 内存大小, 单位Mb
	VmemSize int `nullable:"false" list:"user" create:"required"`

	// 启动顺序
	BootOrder string `width:"8" charset:"ascii" nullable:"true" default:"cdn" list:"user" update:"user" create:"optional"`

	// 关机操作类型
	// example: stop
	ShutdownBehavior string `width:"16" charset:"ascii" default:"stop" list:"user" update:"user" create:"optional"`

	// 秘钥对Id
	KeypairId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 备份机所在宿主机Id
	BackupHostId string `width:"36" charset:"ascii" nullable:"true" list:"user" get:"user"`

	// 迁移或克隆的速度
	ProgressMbps float64 `nullable:"false" default:"0" list:"user" create:"optional" update:"user" log:"skip"`

	Vga     string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	Vdi     string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	Machine string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	Bios    string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	// 操作系统类型
	OsType string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	FlavorId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 安全组Id
	// example: default
	SecgrpId string `width:"36" charset:"ascii" nullable:"true" list:"user" get:"user" create:"optional"`
	// 管理员可见安全组Id
	AdminSecgrpId string `width:"36" charset:"ascii" nullable:"true" list:"domain" get:"domain"`

	SrcIpCheck  tristate.TriState `default:"true" create:"optional" list:"user" update:"user"`
	SrcMacCheck tristate.TriState `default:"true" create:"optional" list:"user" update:"user"`

	// 虚拟化技术
	// example: kvm
	Hypervisor string `width:"16" charset:"ascii" nullable:"false" default:"kvm" list:"user" create:"required"`

	// 套餐名称
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`

	SshableLastState tristate.TriState `default:"false" list:"user"`

	IsDaemon tristate.TriState `default:"false" list:"admin" create:"admin_optional" update:"admin"`

	// 最大内网带宽
	InternetMaxBandwidthOut int `nullable:"true" list:"user" create:"optional"`
	// 磁盘吞吐量
	Throughput int `nullable:"true" list:"user" create:"optional"`

	QgaStatus string `width:"36" charset:"ascii" nullable:"false" default:"unknown" list:"user" create:"optional"`
}

func (*SGuest) AllowDeleteItem

func (self *SGuest) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) Attach2Network

func (self *SGuest) Attach2Network(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	args Attach2NetworkArgs,
) ([]SGuestnetwork, error)

func (*SGuest) AttachDisk

func (self *SGuest) AttachDisk(ctx context.Context, disk *SDisk, userCred mcclient.TokenCredential, driver string, cache string, mountpoint string) error

func (*SGuest) CanPerformPrepaidRecycle

func (self *SGuest) CanPerformPrepaidRecycle() error

func (*SGuest) CancelExpireTime

func (self *SGuest) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) CategorizeDisks

func (self *SGuest) CategorizeDisks() SGuestDiskCategory

func (*SGuest) CategorizeNics

func (self *SGuest) CategorizeNics() SGuestNicCategory

func (*SGuest) CheckQemuVersion

func (self *SGuest) CheckQemuVersion(qemuVer, compareVer string) bool

if qemuVer >= compareVer return true

func (*SGuest) ChooseHostStorage

func (self *SGuest) ChooseHostStorage(host *SHost, diskConfig *api.DiskConfig, candidate *schedapi.CandidateDisk) (*SStorage, error)

func (*SGuest) CleanTapRecords

func (self *SGuest) CleanTapRecords(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) ConvertNetworks

func (guest *SGuest) ConvertNetworks(targetGuest *SGuest) error

func (*SGuest) CreateBackupDisks

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

func (*SGuest) CreateDisksOnHost

func (self *SGuest) CreateDisksOnHost(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	host *SHost,
	disks []*api.DiskConfig,
	pendingUsage quotas.IQuota,
	inheritBilling bool,
	isWithServerCreate bool,
	candidateDisks []*schedapi.CandidateDisk,
	backupCandidateDisks []*schedapi.CandidateDisk,
	autoAttach bool,
) error

func (*SGuest) CreateIsolatedDeviceOnHost

func (self *SGuest) CreateIsolatedDeviceOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, devs []*api.IsolatedDeviceConfig, pendingUsage quotas.IQuota) error

func (*SGuest) CreateNetworksOnHost

func (self *SGuest) CreateNetworksOnHost(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	host *SHost,
	netArray []*api.NetworkConfig,
	pendingUsage quotas.IQuota,
	candidateNets []*schedapi.CandidateNet,
) error

func (*SGuest) CustomizeCreate

func (guest *SGuest) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SGuest) CustomizeDelete

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

删除虚拟机

func (*SGuest) Delete

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

func (*SGuest) DeleteAllDisksInDB

func (self *SGuest) DeleteAllDisksInDB(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DeleteAllInstanceSnapshotInDB

func (self *SGuest) DeleteAllInstanceSnapshotInDB(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DeleteEip

func (self *SGuest) DeleteEip(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DetachAllNetworks

func (self *SGuest) DetachAllNetworks(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DetachDisk

func (self *SGuest) DetachDisk(ctx context.Context, disk *SDisk, userCred mcclient.TokenCredential)

func (*SGuest) DiskCount

func (guest *SGuest) DiskCount() (int, error)

func (*SGuest) DoCancelPendingDelete

func (self *SGuest) DoCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DoPendingDelete

func (self *SGuest) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SGuest) DoPerformPrepaidRecycle

func (self *SGuest) DoPerformPrepaidRecycle(ctx context.Context, userCred mcclient.TokenCredential, autoDelete bool) (jsonutils.JSONObject, error)

func (*SGuest) EjectIso

func (self *SGuest) EjectIso(userCred mcclient.TokenCredential) bool

func (*SGuest) EventNotify

func (self *SGuest) EventNotify(ctx context.Context, userCred mcclient.TokenCredential, action noapi.SAction)

func (*SGuest) FillDiskSchedDesc

func (self *SGuest) FillDiskSchedDesc(desc *api.ServerConfigs)

func (*SGuest) FillGroupSchedDesc

func (self *SGuest) FillGroupSchedDesc(desc *api.ServerConfigs)

func (*SGuest) FillNetSchedDesc

func (self *SGuest) FillNetSchedDesc(desc *api.ServerConfigs)

func (*SGuest) GenerateVirtInstallCommandLine

func (self *SGuest) GenerateVirtInstallCommandLine(
	vdiProtocol string, vdiListenPort int64, extraCmdline []jsonutils.JSONObject, libvirtBridge string,
) (string, error)

func (*SGuest) GetApptags

func (self *SGuest) GetApptags() []string

func (*SGuest) GetCdrom

func (self *SGuest) GetCdrom() *SGuestcdrom

func (*SGuest) GetCloudproviderId

func (guest *SGuest) GetCloudproviderId() string

func (*SGuest) GetCreateParams

func (guest *SGuest) GetCreateParams(ctx context.Context, userCred mcclient.TokenCredential) (*api.ServerCreateInput, error)

func (*SGuest) GetDeployConfigOnHost

func (self *SGuest) GetDeployConfigOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, params *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SGuest) GetDetailsCpusetCores

func (self *SGuest) GetDetailsCpusetCores(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerGetCPUSetCoresInput) (*api.ServerGetCPUSetCoresResp, error)

func (*SGuest) GetDetailsCreateParams

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

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) GetDetailsJnlp

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

func (*SGuest) GetDetailsMakeSshableCmd

func (guest *SGuest) GetDetailsMakeSshableCmd(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) (output compute_api.GuestMakeSshableCmdOutput, err error)

func (*SGuest) GetDetailsQemuInfo

func (self *SGuest) GetDetailsQemuInfo(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*api.ServerQemuInfo, error)

func (*SGuest) GetDetailsRemoteNics

func (guest *SGuest) GetDetailsRemoteNics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) GetDetailsSshable

func (guest *SGuest) GetDetailsSshable(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SGuest) GetDetailsSshport

func (guest *SGuest) GetDetailsSshport(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
) (compute_api.GuestSshportOutput, error)

func (*SGuest) GetDetailsTasks

func (guest *SGuest) GetDetailsTasks(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) GetDetailsVirtInstall

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

func (*SGuest) GetDetailsVnc

func (*SGuest) GetDiskIndex

func (self *SGuest) GetDiskIndex(diskId string) int8

func (*SGuest) GetDiskSnapshotsNotInInstanceSnapshots

func (self *SGuest) GetDiskSnapshotsNotInInstanceSnapshots() ([]SSnapshot, error)

func (*SGuest) GetDisks

func (self *SGuest) GetDisks() ([]SDisk, error)

func (*SGuest) GetDisksQuery

func (guest *SGuest) GetDisksQuery() *sqlchemy.SQuery

func (*SGuest) GetDisksSize

func (guest *SGuest) GetDisksSize() int

func (*SGuest) GetDriver

func (guest *SGuest) GetDriver() IGuestDriver

func (*SGuest) GetDynamicConditionInput

func (guest *SGuest) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SGuest) GetEipOrPublicIp

func (self *SGuest) GetEipOrPublicIp() (*SElasticip, error)

func (*SGuest) GetElasticIp

func (self *SGuest) GetElasticIp() (*SElasticip, error)

func (*SGuest) GetExpiredAt

func (guest *SGuest) GetExpiredAt() time.Time

func (*SGuest) GetExtraOptions

func (self *SGuest) GetExtraOptions(ctx context.Context, userCred mcclient.TokenCredential) *jsonutils.JSONDict

func (*SGuest) GetGroups

func (guest *SGuest) GetGroups() []SGroupguest

func (*SGuest) GetGuestDisk

func (guest *SGuest) GetGuestDisk(diskId string) *SGuestdisk

func (*SGuest) GetGuestDisks

func (guest *SGuest) GetGuestDisks() ([]SGuestdisk, error)

func (*SGuest) GetGuestSecgroups

func (self *SGuest) GetGuestSecgroups() ([]SGuestsecgroup, error)

func (*SGuest) GetGuestnetworkByIp

func (guest *SGuest) GetGuestnetworkByIp(ipAddr string) (*SGuestnetwork, error)

func (*SGuest) GetGuestnetworkByMac

func (guest *SGuest) GetGuestnetworkByMac(macAddr string) (*SGuestnetwork, error)

func (*SGuest) GetHost

func (guest *SGuest) GetHost() (*SHost, error)

func (*SGuest) GetHostType

func (guest *SGuest) GetHostType() string

func (*SGuest) GetHypervisor

func (guest *SGuest) GetHypervisor() string

func (*SGuest) GetIRegion

func (self *SGuest) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SGuest) GetIVM

func (self *SGuest) GetIVM(ctx context.Context) (cloudprovider.ICloudVM, error)

func (*SGuest) GetInstanceSnapshotCount

func (self *SGuest) GetInstanceSnapshotCount() (int, error)

func (*SGuest) GetInstanceSnapshots

func (self *SGuest) GetInstanceSnapshots() ([]SInstanceSnapshot, error)

func (*SGuest) GetIsolatedDevices

func (self *SGuest) GetIsolatedDevices() ([]SIsolatedDevice, error)

func (*SGuest) GetJsonDescAtBaremetal

func (self *SGuest) GetJsonDescAtBaremetal(ctx context.Context, host *SHost) *api.GuestJsonDesc

func (*SGuest) GetJsonDescAtHypervisor

func (self *SGuest) GetJsonDescAtHypervisor(ctx context.Context, host *SHost) *api.GuestJsonDesc

func (*SGuest) GetKeypairPublicKey

func (self *SGuest) GetKeypairPublicKey() string

func (*SGuest) GetNetworks

func (guest *SGuest) GetNetworks(netId string) ([]SGuestnetwork, error)

func (*SGuest) GetNetworksQuery

func (guest *SGuest) GetNetworksQuery(netId string) *sqlchemy.SQuery

func (*SGuest) GetOS

func (self *SGuest) GetOS() string

func (*SGuest) GetOSProfile

func (self *SGuest) GetOSProfile() osprofile.SOSProfile

func (*SGuest) GetOldPassword

func (self *SGuest) GetOldPassword(ctx context.Context, userCred mcclient.TokenCredential) string

func (*SGuest) GetPrivateIPs

func (self *SGuest) GetPrivateIPs() []string

func (*SGuest) GetPublicIp

func (self *SGuest) GetPublicIp() (*SElasticip, error)

func (*SGuest) GetQemuCmdline

func (self *SGuest) GetQemuCmdline(userCred mcclient.TokenCredential) string

func (*SGuest) GetQemuVersion

func (self *SGuest) GetQemuVersion(userCred mcclient.TokenCredential) string

func (*SGuest) GetQuotaKeys

func (guest *SGuest) GetQuotaKeys() (quotas.IQuotaKeys, error)

func (*SGuest) GetRealIPs

func (self *SGuest) GetRealIPs() []string

func (*SGuest) GetRegionalQuotaKeys

func (guest *SGuest) GetRegionalQuotaKeys() (quotas.IQuotaKeys, error)

func (*SGuest) GetSchedMigrateParams

func (self *SGuest) GetSchedMigrateParams(
	userCred mcclient.TokenCredential,
	input *api.ServerMigrateForecastInput,
) *schedapi.ScheduleInput

func (*SGuest) GetSecgroups

func (self *SGuest) GetSecgroups() ([]SSecurityGroup, error)

func (*SGuest) GetShortDesc

func (self *SGuest) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SGuest) GetSpec

func (self *SGuest) GetSpec(checkStatus bool) *jsonutils.JSONDict

func (*SGuest) GetSshPort

func (guest *SGuest) GetSshPort(ctx context.Context, userCred mcclient.TokenCredential) int

func (*SGuest) GetStorages

func (self *SGuest) GetStorages() []*SStorage

func (*SGuest) GetSystemDisk

func (guest *SGuest) GetSystemDisk() (*SDisk, error)

func (*SGuest) GetTemplateId

func (self *SGuest) GetTemplateId() string

func (*SGuest) GetUsages

func (guest *SGuest) GetUsages() []db.IUsage

func (*SGuest) GetUserData

func (self *SGuest) GetUserData(ctx context.Context, userCred mcclient.TokenCredential) string

func (*SGuest) GetVdi

func (self *SGuest) GetVdi() string

func (*SGuest) GetVpc

func (guest *SGuest) GetVpc() (*SVpc, error)

func (*SGuest) GuestDisksHasSnapshot

func (self *SGuest) GuestDisksHasSnapshot() (bool, error)

func (*SGuest) GuestNonSchedStartTask

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

func (*SGuest) GuestSchedStartTask

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

func (*SGuest) GuestStartAndSyncToBackup

func (guest *SGuest) GuestStartAndSyncToBackup(
	ctx context.Context, userCred mcclient.TokenCredential, parentTaskId, guestStatus string,
) error

func (*SGuest) InsertIsoSucc

func (self *SGuest) InsertIsoSucc(imageId string, path string, size int64, name string) bool

func (*SGuest) InstaceCreateSnapshot

func (self *SGuest) InstaceCreateSnapshot(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	instanceSnapshot *SInstanceSnapshot,
	pendingUsage *SRegionQuota,
) error

func (*SGuest) InstanceCreateBackup

func (self *SGuest) InstanceCreateBackup(ctx context.Context, userCred mcclient.TokenCredential, instanceBackup *SInstanceBackup) error

func (*SGuest) IsAttach2Disk

func (self *SGuest) IsAttach2Disk(disk *SDisk) (bool, error)

func (*SGuest) IsEipAssociable

func (self *SGuest) IsEipAssociable() error

func (*SGuest) IsExitOnly

func (self *SGuest) IsExitOnly() bool

func (*SGuest) IsFailureStatus

func (self *SGuest) IsFailureStatus() bool

func (*SGuest) IsImport

func (self *SGuest) IsImport(ctx context.Context, userCred mcclient.TokenCredential) bool

func (*SGuest) IsLegalKey

func (self *SGuest) IsLegalKey(key string) bool

func (*SGuest) IsLinux

func (self *SGuest) IsLinux() bool

func (*SGuest) IsNetworkAllocated

func (guest *SGuest) IsNetworkAllocated() bool

func (*SGuest) IsPrepaidRecycle

func (self *SGuest) IsPrepaidRecycle() bool

func (*SGuest) IsWindows

func (self *SGuest) IsWindows() bool

func (*SGuest) JoinGroups

func (self *SGuest) JoinGroups(ctx context.Context, userCred mcclient.TokenCredential, groupIds []string) error

func (*SGuest) LeaveAllGroups

func (self *SGuest) LeaveAllGroups(ctx context.Context, userCred mcclient.TokenCredential)

func (*SGuest) NetworkCount

func (guest *SGuest) NetworkCount() (int, error)

func (*SGuest) NotifyAdminServerEvent

func (self *SGuest) NotifyAdminServerEvent(ctx context.Context, event string, priority notify.TNotifyPriority)

func (*SGuest) NotifyServerEvent

func (self *SGuest) NotifyServerEvent(
	ctx context.Context, userCred mcclient.TokenCredential, event string, priority notify.TNotifyPriority,
	loginInfo bool, kwargs *jsonutils.JSONDict, notifyAdmin bool,
)

func (*SGuest) OnMetadataUpdated

func (guest *SGuest) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SGuest) OnScheduleToHost

func (self *SGuest) OnScheduleToHost(ctx context.Context, userCred mcclient.TokenCredential, hostId string) error

func (*SGuest) PendingDetachScalingGroup

func (self *SGuest) PendingDetachScalingGroup() error

func (*SGuest) PerformAddSecgroup

func (self *SGuest) PerformAddSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestAddSecgroupInput,
) (jsonutils.JSONObject, error)

绑定多个安全组

func (*SGuest) PerformAssignAdminSecgroup

func (self *SGuest) PerformAssignAdminSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestAssignSecgroupInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformAssignSecgroup

func (self *SGuest) PerformAssignSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestAssignSecgroupInput,
) (jsonutils.JSONObject, error)

+onecloud:swagger-gen-ignore

func (*SGuest) PerformAssociateEip

func (self *SGuest) PerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerAssociateEipInput) (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, input api.ServerAttachDiskInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformAttachnetwork

func (self *SGuest) PerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.AttachNetworkInput) (*api.SGuest, error)

func (*SGuest) PerformBindGroups

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

func (*SGuest) PerformBlockMirrorReady

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

func (*SGuest) PerformBlockStreamFailed

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

func (*SGuest) PerformCalculateRecordChecksum

func (self *SGuest) PerformCalculateRecordChecksum(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) PerformCancelExpire

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

func (*SGuest) PerformCancelLiveMigrate

func (self *SGuest) PerformCancelLiveMigrate(
	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, input api.ServerChangeConfigInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformChangeIpaddr

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

Change IPaddress of a guestnetwork first detach the network, then attach a network with identity mac address but different IP configurations TODO change IP address of a teaming NIC may fail!!

func (*SGuest) PerformChangeOwner

func (*SGuest) PerformClone

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

func (*SGuest) PerformCloseForward

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

func (*SGuest) PerformConvert

func (self *SGuest) PerformConvert(
	ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data *api.ConvertEsxiToKvmInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformConvertToKvm

func (self *SGuest) PerformConvertToKvm(
	ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data *api.ConvertEsxiToKvmInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformCpuset

func (self *SGuest) PerformCpuset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.ServerCPUSetInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformCpusetRemove

func (self *SGuest) PerformCpusetRemove(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.ServerCPUSetRemoveInput) (*api.ServerCPUSetRemoveResp, error)

func (*SGuest) PerformCreateBackup

func (self *SGuest) PerformCreateBackup(
	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, input api.ServerCreateEipInput) (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) PerformDelExtraOption

func (self *SGuest) PerformDelExtraOption(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerDelExtraOptionInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformDeleteBackup

func (self *SGuest) PerformDeleteBackup(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, input api.ServerDeployInput) (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, input api.ServerDetachDiskInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformDetachnetwork

func (self *SGuest) PerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerDetachnetworkInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformDissociateEip

func (self *SGuest) PerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerDissociateEipInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformEjectiso

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

func (*SGuest) PerformEnableMemclean

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

func (*SGuest) PerformEvent

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

func (*SGuest) PerformFreeze

func (self *SGuest) PerformFreeze(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformFreezeInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformInsertiso

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

func (*SGuest) PerformInstanceBackup

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

func (*SGuest) PerformInstanceSnapshot

func (self *SGuest) PerformInstanceSnapshot(
	ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerInstanceSnapshot,
) (jsonutils.JSONObject, error)

1. validate guest status, guest hypervisor 2. validate every disk manual snapshot count 3. validate snapshot quota with disk count

func (*SGuest) PerformInstanceSnapshotReset

func (self *SGuest) PerformInstanceSnapshotReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerResetInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformIoThrottle

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

func (*SGuest) PerformListForward

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

func (*SGuest) PerformLiveMigrate

func (self *SGuest) PerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.GuestLiveMigrateInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformMakeSshable

func (guest *SGuest) PerformMakeSshable(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input compute_api.GuestMakeSshableInput,
) (output compute_api.GuestMakeSshableOutput, err error)

func (*SGuest) PerformMigrate

func (self *SGuest) PerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.GuestMigrateInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformMigrateForecast

func (self *SGuest) PerformMigrateForecast(ctx context.Context, userCred mcclient.TokenCredential, _ jsonutils.JSONObject, input *api.ServerMigrateForecastInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformMigrateNetwork

func (guest *SGuest) PerformMigrateNetwork(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.ServerMigrateNetworkInput,
) (jsonutils.JSONObject, error)

* Migrate a server from one network to another network, without change IP address * Scenerio: the server used to be in a VPC, migrate it to a underlay network without network interruption

func (*SGuest) PerformModifySrcCheck

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

func (*SGuest) PerformMonitor

func (self *SGuest) PerformMonitor(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input *api.ServerMonitorInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformOpenForward

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

func (*SGuest) PerformPostpaidExpire

func (self *SGuest) PerformPostpaidExpire(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PostpaidExpireInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformPrepaidRecycle

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

func (*SGuest) PerformProbeIsolatedDevices

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

func (*SGuest) PerformPublicipToEip

func (self *SGuest) PerformPublicipToEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.GuestPublicipToEipInput) (jsonutils.JSONObject, error)

公网Ip转Eip 要求虚拟机有公网IP,并且虚拟机状态为running 或 ready 目前仅支持阿里云和腾讯云

func (*SGuest) PerformPurge

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

func (*SGuest) PerformQgaCommand

func (self *SGuest) PerformQgaCommand(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input *api.ServerQgaCommandInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformQgaSetPassword

func (self *SGuest) PerformQgaSetPassword(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input *api.ServerQgaSetPasswordInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformRebuildRoot

func (self *SGuest) PerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ServerRebuildRootInput) (*api.SGuest, error)

重装系统(更换系统镜像)

func (*SGuest) PerformReconcileBackup

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

func (*SGuest) PerformRemoteUpdate

func (self *SGuest) PerformRemoteUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerRemoteUpdateInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformRenew

func (self *SGuest) PerformRenew(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) PerformResizeDisk

func (guest *SGuest) PerformResizeDisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerResizeDiskInput) (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) PerformResume

func (self *SGuest) PerformResume(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerResumeInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformRevokeAdminSecgroup

func (self *SGuest) PerformRevokeAdminSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestRevokeSecgroupInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformRevokeSecgroup

func (self *SGuest) PerformRevokeSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestRevokeSecgroupInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformSaveGuestImage

func (self *SGuest) PerformSaveGuestImage(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, input api.ServerSaveGuestImageInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformSaveImage

func (*SGuest) PerformSendkeys

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

func (*SGuest) PerformSetAutoRenew

func (self *SGuest) PerformSetAutoRenew(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.GuestAutoRenewInput) (jsonutils.JSONObject, error)

设置自动续费 要求虚拟机状态为running 或 ready 要求虚拟机计费类型为包年包月(预付费)

func (*SGuest) PerformSetExtraOption

func (self *SGuest) PerformSetExtraOption(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerSetExtraOptionInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformSetIsolatedDevice

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

func (*SGuest) PerformSetLiveMigrateParams

func (self *SGuest) PerformSetLiveMigrateParams(
	ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerSetLiveMigrateParamsInput,
) (jsonutils.JSONObject, error)

func (*SGuest) PerformSetPassword

func (self *SGuest) PerformSetPassword(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerSetPasswordInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformSetQemuParams

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

func (*SGuest) PerformSetSecgroup

func (self *SGuest) PerformSetSecgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestSetSecgroupInput,
) (jsonutils.JSONObject, error)

全量覆盖安全组

func (*SGuest) PerformSetSshport

func (*SGuest) PerformSnapshotAndClone

func (self *SGuest) PerformSnapshotAndClone(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.ServerSnapshotAndCloneInput,
) (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, input apis.PerformStatusInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformStop

func (self *SGuest) PerformStop(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject,
	input api.ServerStopInput) (jsonutils.JSONObject, error)

func (*SGuest) PerformStreamDisksComplete

func (self *SGuest) PerformStreamDisksComplete(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) PerformSwitchToBackup

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

func (*SGuest) PerformSync

func (*SGuest) PerformSyncFixNics

func (self *SGuest) PerformSyncFixNics(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.GuestSyncFixNicsInput) (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) PerformUnbindGroups

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

func (*SGuest) PerformUndoPrepaidRecycle

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

func (*SGuest) PerformUserData

func (self *SGuest) PerformUserData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerUserDataInput) (jsonutils.JSONObject, error)

func (*SGuest) PostCreate

func (guest *SGuest) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SGuest) PostUpdate

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

func (*SGuest) PreCheckPerformAction

func (self *SGuest) PreCheckPerformAction(
	ctx context.Context, userCred mcclient.TokenCredential,
	action string, query jsonutils.JSONObject, data jsonutils.JSONObject,
) error

func (*SGuest) RealDelete

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

func (*SGuest) RevokeAllSecgroups

func (self *SGuest) RevokeAllSecgroups(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) SaveDeployInfo

func (self *SGuest) SaveDeployInfo(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject)

func (*SGuest) SaveRenewInfo

func (self *SGuest) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bc *billing.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SGuest) SendMonitorCommand

func (self *SGuest) SendMonitorCommand(ctx context.Context, userCred mcclient.TokenCredential, cmd *api.ServerMonitorInput) (jsonutils.JSONObject, error)

func (*SGuest) SetAutoRenew

func (self *SGuest) SetAutoRenew(autoRenew bool) error

func (*SGuest) SetCreateParams

func (guest *SGuest) SetCreateParams(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject)

func (*SGuest) SetDisableDelete

func (self *SGuest) SetDisableDelete(userCred mcclient.TokenCredential, val bool) error

func (*SGuest) SetExtraOptions

func (self *SGuest) SetExtraOptions(ctx context.Context, userCred mcclient.TokenCredential, extraOptions *jsonutils.JSONDict) error

func (*SGuest) SetHostId

func (guest *SGuest) SetHostId(userCred mcclient.TokenCredential, hostId string) error

func (*SGuest) SetHostIdWithBackup

func (guest *SGuest) SetHostIdWithBackup(userCred mcclient.TokenCredential, master, slave string) error

func (*SGuest) SetSshPort

func (guest *SGuest) SetSshPort(ctx context.Context, userCred mcclient.TokenCredential, port int) error

func (*SGuest) StartAttachIsolatedDevice

func (self *SGuest) StartAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, device string, autoStart bool) error

func (*SGuest) StartAttachIsolatedDevices

func (self *SGuest) StartAttachIsolatedDevices(ctx context.Context, userCred mcclient.TokenCredential, devModel string, count int, autoStart bool) error

func (*SGuest) StartAutoDeleteGuestTask

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

func (*SGuest) StartBlockIoThrottleTask

func (self *SGuest) StartBlockIoThrottleTask(ctx context.Context, userCred mcclient.TokenCredential, bpsMb, iops int64) error

func (*SGuest) StartChangeConfigTask

func (self *SGuest) StartChangeConfigTask(ctx context.Context, userCred mcclient.TokenCredential,
	data *jsonutils.JSONDict, parentTaskId string, pendingUsage quotas.IQuota) error

func (*SGuest) StartChangeDiskStorageTask

func (self *SGuest) StartChangeDiskStorageTask(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerChangeDiskStorageInternalInput, parentTaskId string) error

func (*SGuest) StartConvertEsxiToKvmTask

func (self *SGuest) StartConvertEsxiToKvmTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	preferHostId string, newGuest *SGuest, createInput *api.ServerCreateInput,
) error

func (*SGuest) StartCreateBackup

func (self *SGuest) StartCreateBackup(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, kwargs *jsonutils.JSONDict) error

func (*SGuest) StartDeleteGuestSnapshots

func (guest *SGuest) StartDeleteGuestSnapshots(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartDeleteGuestTask

func (self *SGuest) StartDeleteGuestTask(
	ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string,
	opts api.ServerDeleteInput,
) error

func (*SGuest) StartEjectisoTask

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

func (*SGuest) StartGuestCPUSetTask

func (self *SGuest) StartGuestCPUSetTask(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerCPUSetInput) error

func (*SGuest) StartGuestCreateBackupTask

func (self *SGuest) StartGuestCreateBackupTask(
	ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, data jsonutils.JSONObject,
) (jsonutils.JSONObject, error)

func (*SGuest) StartGuestCreateDiskTask

func (self *SGuest) StartGuestCreateDiskTask(ctx context.Context, userCred mcclient.TokenCredential, disks []*api.DiskConfig, parentTaskId string) error

func (*SGuest) StartGuestCreateTask

func (self *SGuest) StartGuestCreateTask(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerCreateInput, pendingUsage quotas.IQuota, parentTaskId string) error

func (*SGuest) StartGuestDeleteOnHostTask

func (self *SGuest) StartGuestDeleteOnHostTask(ctx context.Context, userCred mcclient.TokenCredential, hostId string, purge bool, parentTaskId string) error

func (*SGuest) StartGuestDeployTask

func (self *SGuest) StartGuestDeployTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	kwargs *jsonutils.JSONDict, action string, parentTaskId string,
) error

func (*SGuest) StartGuestDetachdiskTask

func (self *SGuest) StartGuestDetachdiskTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	disk *SDisk, keepDisk bool, parentTaskId string, purge bool, syncDescOnly bool,
) error

func (*SGuest) StartGuestDiskResizeTask

func (guest *SGuest) StartGuestDiskResizeTask(ctx context.Context, userCred mcclient.TokenCredential, diskId string, sizeMb int64, parentTaskId string, pendingUsage quotas.IQuota) error

func (*SGuest) StartGuestLiveMigrateTask

func (self *SGuest) StartGuestLiveMigrateTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	guestStatus, preferHostId string,
	skipCpuCheck, skipKernelCheck, enableTLS, quicklyFinish *bool,
	maxBandwidthMb *int64, keepDestGuestOnFailed *bool, parentTaskId string,
) error

func (*SGuest) StartGuestSaveGuestImage

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

func (*SGuest) StartGuestSaveImage

func (self *SGuest) StartGuestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, input api.ServerSaveImageInput, parentTaskId string) error

func (*SGuest) StartGuestStopAndFreezeTask

func (self *SGuest) StartGuestStopAndFreezeTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) StartGuestStopTask

func (self *SGuest) StartGuestStopTask(ctx context.Context, userCred mcclient.TokenCredential, isForce, stopCharging bool, parentTaskId string) error

func (*SGuest) StartGueststartTask

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

func (*SGuest) StartInsertIsoTask

func (self *SGuest) StartInsertIsoTask(ctx context.Context, imageId string, boot bool, hostId string, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartInstanceSnapshotAndCloneTask

func (self *SGuest) StartInstanceSnapshotAndCloneTask(
	ctx context.Context, userCred mcclient.TokenCredential, newlyGuestName string,
	pendingUsage *SQuota, pendingRegionUsage *SRegionQuota, instanceSnapshot *SInstanceSnapshot,
	input api.ServerSnapshotAndCloneInput,
) error

func (*SGuest) StartMigrateTask

func (self *SGuest) StartMigrateTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	isRescueMode, autoStart bool, guestStatus, preferHostId, parentTaskId string,
) error

func (*SGuest) StartMirrorJob

func (self *SGuest) StartMirrorJob(ctx context.Context, userCred mcclient.TokenCredential, nbdServerPort int64, parentTaskId string) error

func (*SGuest) StartPublicipToEipTask

func (self *SGuest) StartPublicipToEipTask(ctx context.Context, userCred mcclient.TokenCredential, autoStart bool, parentTaskId string) error

func (*SGuest) StartRebuildRootTask

func (self *SGuest) StartRebuildRootTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, needStop, autoStart bool, passwd string, resetPasswd bool, allDisk bool) error

func (*SGuest) StartReconcileBackup

func (self *SGuest) StartReconcileBackup(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) StartRemoteUpdateTask

func (guest *SGuest) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SGuest) StartRestartNetworkTask

func (self *SGuest) StartRestartNetworkTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, ip string, inBlockStream bool) error

func (*SGuest) StartResumeTask

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

func (*SGuest) StartSetAutoRenewTask

func (self *SGuest) StartSetAutoRenewTask(ctx context.Context, userCred mcclient.TokenCredential, input api.GuestAutoRenewInput, parentTaskId string) error

func (*SGuest) StartSnapshotResetTask

func (self *SGuest) StartSnapshotResetTask(ctx context.Context, userCred mcclient.TokenCredential, instanceSnapshot *SInstanceSnapshot, autoStart *bool, withMemory bool) error

func (*SGuest) StartSuspendTask

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

func (*SGuest) StartSyncTask

func (self *SGuest) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, firewallOnly bool, parentTaskId string) error

func (*SGuest) StartSyncTaskWithoutSyncstatus

func (self *SGuest) StartSyncTaskWithoutSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, fwOnly bool, parentTaskId string) error

func (*SGuest) StartSyncstatus

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

func (*SGuest) StartUndeployGuestTask

func (self *SGuest) StartUndeployGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, targetHostId string) error

func (*SGuest) SwitchToBackup

func (self *SGuest) SwitchToBackup(userCred mcclient.TokenCredential) error

func (*SGuest) SyncAllWithCloudVM

func (guest *SGuest) SyncAllWithCloudVM(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, extVM cloudprovider.ICloudVM, syncStatus bool) error

func (*SGuest) SyncCapacityUsedForStorage

func (self *SGuest) SyncCapacityUsedForStorage(ctx context.Context, storageIds []string) error

func (*SGuest) SyncInstanceSnapshots

func (self *SGuest) SyncInstanceSnapshots(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider) compare.SyncResult

func (*SGuest) SyncOsInfo

func (g *SGuest) SyncOsInfo(ctx context.Context, userCred mcclient.TokenCredential, extVM cloudprovider.IOSInfo) error

func (*SGuest) SyncVMDisks

func (self *SGuest) SyncVMDisks(ctx context.Context, userCred mcclient.TokenCredential, provider cloudprovider.ICloudProvider, host *SHost, vdisks []cloudprovider.ICloudDisk, syncOwnerId mcclient.IIdentityProvider) compare.SyncResult

func (*SGuest) SyncVMEip

func (self *SGuest) SyncVMEip(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extEip cloudprovider.ICloudEIP, syncOwnerId mcclient.IIdentityProvider) compare.SyncResult

func (*SGuest) SyncVMNics

func (self *SGuest) SyncVMNics(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vnics []cloudprovider.ICloudNic, ipList []string) compare.SyncResult

func (*SGuest) SyncVMSecgroups

func (self *SGuest) SyncVMSecgroups(ctx context.Context, userCred mcclient.TokenCredential, externalIds []string) error

func (*SGuest) ToCreateInput

func (self *SGuest) ToCreateInput(ctx context.Context, userCred mcclient.TokenCredential) *api.ServerCreateInput

func (*SGuest) ToDisksConfig

func (self *SGuest) ToDisksConfig() []*api.DiskConfig

func (*SGuest) ToIsolatedDevicesConfig

func (self *SGuest) ToIsolatedDevicesConfig() []*api.IsolatedDeviceConfig

func (*SGuest) ToNetworksConfig

func (self *SGuest) ToNetworksConfig() []*api.NetworkConfig

func (*SGuest) ToSchedDesc

func (self *SGuest) ToSchedDesc() *schedapi.ScheduleInput

func (*SGuest) UpdateQgaStatus

func (self *SGuest) UpdateQgaStatus(status string) error

func (*SGuest) ValidateAttachDisk

func (self *SGuest) ValidateAttachDisk(ctx context.Context, disk *SDisk) error

func (*SGuest) ValidateDeleteCondition

func (guest *SGuest) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SGuest) ValidatePurgeCondition

func (guest *SGuest) ValidatePurgeCondition(ctx context.Context) error

func (*SGuest) ValidateResizeDisk

func (guest *SGuest) ValidateResizeDisk(disk *SDisk, storage *SStorage) error

func (*SGuest) ValidateUpdateData

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

func (*SGuest) VerifySendKeys

func (self *SGuest) VerifySendKeys(keyStr string) error

type SGuestCountStat

type SGuestCountStat struct {
	TotalGuestCount       int
	TotalCpuCount         int
	TotalMemSize          int
	TotalDiskSize         int
	TotalIsolatedCount    int
	TotalBackupGuestCount int
	TotalBackupCpuCount   int
	TotalBackupMemSize    int
	TotalBackupDiskSize   int
}

type SGuestDiskCategory

type SGuestDiskCategory struct {
	Root *SDisk
	Swap []*SDisk
	Data []*SDisk
}

type SGuestJointsBase

type SGuestJointsBase struct {
	db.SVirtualJointResourceBase

	GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SGuestJointsBase) ValidateUpdateData

type SGuestJointsManager

type SGuestJointsManager struct {
	db.SVirtualJointResourceBaseManager
	SGuestResourceBaseManager
}

func NewGuestJointsManager

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

func (*SGuestJointsManager) FetchCustomizeColumns

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

func (*SGuestJointsManager) GetMasterFieldName

func (manager *SGuestJointsManager) GetMasterFieldName() string

func (*SGuestJointsManager) ListItemExportKeys

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

func (*SGuestJointsManager) ListItemFilter

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

func (*SGuestJointsManager) OrderByExtraFields

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

type SGuestManager

+onecloud:swagger-gen-model-singular=server +onecloud:swagger-gen-model-plural=servers

var GuestManager *SGuestManager

func (*SGuestManager) AutoRenewPrepaidServer

func (manager *SGuestManager) AutoRenewPrepaidServer(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestManager) BatchCreateValidateCreateData

func (manager *SGuestManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SGuestManager) BatchPreValidate

func (manager *SGuestManager) BatchPreValidate(
	ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject, data *jsonutils.JSONDict, count int,
) error

func (*SGuestManager) CleanPendingDeleteServers

func (manager *SGuestManager) CleanPendingDeleteServers(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestManager) CreateGuestFromInstanceSnapshot

func (manager *SGuestManager) CreateGuestFromInstanceSnapshot(
	ctx context.Context, userCred mcclient.TokenCredential, input api.ServerSnapshotAndCloneInput, isp *SInstanceSnapshot,
) (*SGuest, *jsonutils.JSONDict, error)

func (*SGuestManager) DeleteExpiredPostpaidServers

func (manager *SGuestManager) DeleteExpiredPostpaidServers(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestManager) DeleteExpiredPrepaidServers

func (manager *SGuestManager) DeleteExpiredPrepaidServers(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestManager) DoImport

func (man *SGuestManager) DoImport(
	ctx context.Context, userCred mcclient.TokenCredential, desc *api.SImportGuestDesc,
) (*SGuest, error)

func (*SGuestManager) ExtraSearchConditions

func (manager *SGuestManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition

func (*SGuestManager) FetchCustomizeColumns

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

func (*SGuestManager) FetchGuestById

func (manager *SGuestManager) FetchGuestById(guestId string) *SGuest

func (*SGuestManager) GetExpiredModels

func (manager *SGuestManager) GetExpiredModels(advanceDay int) ([]IBillingModel, error)

func (*SGuestManager) GetExportExtraKeys

func (manager *SGuestManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict

func (*SGuestManager) GetIpInProjectWithName

func (manager *SGuestManager) GetIpInProjectWithName(projectId, name string, isExitOnly bool) []string

func (*SGuestManager) GetMetadataHiddenKeys

func (self *SGuestManager) GetMetadataHiddenKeys() []string

func (*SGuestManager) GetPropertyStatistics

func (manager *SGuestManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error)

func (*SGuestManager) GetSpecIdent

func (manager *SGuestManager) GetSpecIdent(spec *jsonutils.JSONDict) []string

func (*SGuestManager) GetSpecShouldCheckStatus

func (manager *SGuestManager) GetSpecShouldCheckStatus(query *jsonutils.JSONDict) (bool, error)

func (*SGuestManager) InitializeData

func (manager *SGuestManager) InitializeData() error

func (*SGuestManager) ListItemExportKeys

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

func (*SGuestManager) ListItemFilter

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

云主机实例列表

func (*SGuestManager) OnCreateComplete

func (manager *SGuestManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SGuestManager) OrderByExtraFields

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

func (*SGuestManager) PerformBatchMigrate

func (manager *SGuestManager) PerformBatchMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) PerformBatchSetUserMetadata

func (manager *SGuestManager) PerformBatchSetUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) PerformBatchUserMetadata

func (manager *SGuestManager) PerformBatchUserMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) PerformDirtyServerStart

func (manager *SGuestManager) PerformDirtyServerStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) PerformDirtyServerVerify

func (manager *SGuestManager) PerformDirtyServerVerify(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) PerformImport

func (*SGuestManager) PerformImportFromLibvirt

func (manager *SGuestManager) PerformImportFromLibvirt(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuestManager) QueryDistinctExtraField

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

func (*SGuestManager) ReconcileBackupGuests

func (self *SGuestManager) ReconcileBackupGuests(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestManager) SetPropertiesWithInstanceSnapshot

func (manager *SGuestManager) SetPropertiesWithInstanceSnapshot(
	ctx context.Context, userCred mcclient.TokenCredential, ispId string, items []db.IModel,
)

func (*SGuestManager) StartHostGuestsMigrateTask

func (manager *SGuestManager) StartHostGuestsMigrateTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	guests []*SGuest, kwargs *jsonutils.JSONDict, parentTaskId string,
) error

func (*SGuestManager) TotalCount

func (manager *SGuestManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	status []string, hypervisors []string,
	includeSystem bool, pendingDelete bool,
	hostTypes []string, resourceTypes []string, providers []string, brands []string, cloudEnv string,
	since *time.Time,
	policyResult rbacutils.SPolicyResult,
) SGuestCountStat

func (*SGuestManager) ValidateCreateData

func (manager *SGuestManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, oinput api.ServerCreateInput) (*jsonutils.JSONDict, error)

创建虚拟机实例

func (*SGuestManager) ValidateNameLoginAccount

func (manager *SGuestManager) ValidateNameLoginAccount(name string) error

func (*SGuestManager) ValidatePolicyDefinitions

func (manager *SGuestManager) ValidatePolicyDefinitions(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.ServerCreateInput) error

type SGuestNicCategory

type SGuestNicCategory struct {
	InternalNics []SGuestnetwork
	ExternalNics []SGuestnetwork
}

type SGuestResourceBase

type SGuestResourceBase struct {
	GuestId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SGuestResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SGuestResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SGuestResourceBase) GetGuest

func (self *SGuestResourceBase) GetGuest() (*SGuest, error)

func (*SGuestResourceBase) GetHost

func (self *SGuestResourceBase) GetHost() (*SHost, error)

func (*SGuestResourceBase) GetRegion

func (self *SGuestResourceBase) GetRegion() (*SCloudregion, error)

func (*SGuestResourceBase) GetZone

func (self *SGuestResourceBase) GetZone() (*SZone, error)

type SGuestResourceBaseManager

type SGuestResourceBaseManager struct {
	SHostResourceBaseManager
}

func (*SGuestResourceBaseManager) FetchCustomizeColumns

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

func (*SGuestResourceBaseManager) GetExportKeys

func (manager *SGuestResourceBaseManager) GetExportKeys() []string

func (*SGuestResourceBaseManager) GetOrderByFields

func (manager *SGuestResourceBaseManager) GetOrderByFields(query api.ServerFilterListInput) []string

func (*SGuestResourceBaseManager) GetOrderBySubQuery

func (manager *SGuestResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.ServerFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SGuestResourceBaseManager) ListItemExportKeys

func (*SGuestResourceBaseManager) ListItemFilter

func (*SGuestResourceBaseManager) OrderByExtraFields

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

func (*SGuestResourceBaseManager) QueryDistinctExtraField

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

type SGuestSyncResult

type SGuestSyncResult struct {
	Local  *SGuest
	Remote cloudprovider.ICloudVM
	IsNew  bool
}

type SGuestTemplate

type SGuestTemplate struct {
	db.SSharableVirtualResourceBase
	SCloudregionResourceBase
	SVpcResourceBase

	// 虚拟机CPU数量
	VcpuCount int `nullable:"false" default:"1" create:"optional" json:"vcpu_count"`

	// 虚拟机内存大小(MB)
	VmemSize int `nullable:"false" create:"optional" json:"vmem_size"`

	// 虚拟机操作系统类型
	// pattern:Linux|Windows|VMWare
	OsType string `width:"36" charset:"ascii" nullable:"true" create:"optional" json:"os_type" list:"user" get:"user"`

	// 镜像类型
	ImageType string `width:"10" charset:"ascii" nullabel:"true" default:"normal" create:"optional" json:"image_type"`

	// 镜像ID
	ImageId string `width:"128" charset:"ascii" create:"optional" json:"image_id"`

	// 虚拟机技术
	Hypervisor string `width:"16" charset:"ascii" default:"kvm" create:"optional" json:"hypervisor"`

	// 计费方式
	BillingType string `width:"16" charset:"ascii" default:"postpaid" create:"optional" list:"user" get:"user" json:"billing_type"`

	// 其他配置信息
	Content jsonutils.JSONObject `nullable:"false" list:"user" update:"user" create:"optional" json:"content"`

	LastCheckTime time.Time
}

func (*SGuestTemplate) PerformInspect

func (*SGuestTemplate) PerformPublic

func (*SGuestTemplate) PostCreate

func (*SGuestTemplate) PostUpdate

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

func (*SGuestTemplate) Validate

func (*SGuestTemplate) ValidateDeleteCondition

func (gt *SGuestTemplate) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SGuestTemplateManager

var GuestTemplateManager *SGuestTemplateManager

func (*SGuestTemplateManager) FetchCustomizeColumns

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

func (*SGuestTemplateManager) InspectAllTemplate

func (gm *SGuestTemplateManager) InspectAllTemplate(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SGuestTemplateManager) ListItemExportKeys

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

func (*SGuestTemplateManager) ListItemFilter

主机模板列表

func (*SGuestTemplateManager) OrderByExtraFields

func (*SGuestTemplateManager) QueryDistinctExtraField

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

type SGuestTemplateResourceBase

type SGuestTemplateResourceBase struct {
	// 主机模板ID
	GuestTemplateId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SGuestTemplateResourceBase) GetGuestTemplate

func (self *SGuestTemplateResourceBase) GetGuestTemplate() *SGuestTemplate

type SGuestTemplateResourceBaseManager

type SGuestTemplateResourceBaseManager struct{}

func (*SGuestTemplateResourceBaseManager) FetchCustomizeColumns

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

func (*SGuestTemplateResourceBaseManager) GetExportKeys

func (manager *SGuestTemplateResourceBaseManager) GetExportKeys() []string

func (*SGuestTemplateResourceBaseManager) ListItemExportKeys

func (*SGuestTemplateResourceBaseManager) ListItemFilter

func (*SGuestTemplateResourceBaseManager) QueryDistinctExtraField

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

type SGuestTemplateValidate

type SGuestTemplateValidate struct {
	Hypervisor    string
	CloudregionId string
	VpcId         string
	NetworkIds    []string
}

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          int64     `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"`
}

+onecloud:swagger-gen-ignore

func (*SGuestcdrom) GetDetails

func (self *SGuestcdrom) GetDetails() string

type SGuestcdromManager

type SGuestcdromManager struct {
	db.SModelBaseManager
}

+onecloud:swagger-gen-ignore

var GuestcdromManager *SGuestcdromManager

type SGuestdisk

type SGuestdisk struct {
	SGuestJointsBase

	SDiskResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`

	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)
	Iops      int    `nullable:"true" default:"0"`
	Bps       int    `nullable:"true" default:"0"` // Mb

	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) 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(ctx context.Context, driver string, cache string, mountpoint string) error

func (*SGuestdisk) GetDisk

func (self *SGuestdisk) GetDisk() *SDisk

func (*SGuestdisk) GetJsonDescAtHost

func (self *SGuestdisk) GetJsonDescAtHost(ctx context.Context, host *SHost) *api.GuestdiskJsonDesc

func (*SGuestdisk) ToDiskConfig

func (self *SGuestdisk) ToDiskConfig() *api.DiskConfig

func (*SGuestdisk) ToDiskInfo

func (self *SGuestdisk) ToDiskInfo() DiskInfo

DEPRECATE: will be remove in future, use ToDiskConfig

func (*SGuestdisk) ValidateUpdateData

type SGuestdiskManager

type SGuestdiskManager struct {
	SGuestJointsManager
	SDiskResourceBaseManager
}
var GuestdiskManager *SGuestdiskManager

func (*SGuestdiskManager) FetchCustomizeColumns

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

func (*SGuestdiskManager) GetSlaveFieldName

func (manager *SGuestdiskManager) GetSlaveFieldName() string

func (*SGuestdiskManager) ListItemExportKeys

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

func (*SGuestdiskManager) ListItemFilter

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

func (*SGuestdiskManager) OrderByExtraFields

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

type SGuestnetwork

type SGuestnetwork struct {
	SGuestJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" `

	// MAC地址
	MacAddr string `width:"32" charset:"ascii" nullable:"false" list:"user" index:"true"`
	// IPv4地址
	IpAddr string `width:"16" charset:"ascii" nullable:"false" list:"user"`
	// IPv6地址
	Ip6Addr string `width:"64" charset:"ascii" nullable:"true" list:"user"`
	// 虚拟网卡驱动
	Driver string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`
	// 网卡队列数
	NumQueues int `nullable:"true" default:"1" list:"user" update:"user"`
	// 带宽限制,单位mbps
	BwLimit int `nullable:"false" default:"0" list:"user"`
	// 网卡序号
	Index int8 `nullable:"false" default:"0" list:"user" update:"user"`
	// 是否为虚拟接口(无IP)
	Virtual bool `default:"false" list:"user"`
	// 虚拟网卡设备名称
	Ifname string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`

	// bind配对网卡MAC地址
	TeamWith string `width:"32" charset:"ascii" nullable:"false" list:"user"`

	// IPv4映射地址,当子网属于私有云vpc的时候分配,用于访问外网
	MappedIpAddr string `width:"16" charset:"ascii" nullable:"true" list:"user"`

	// 网卡关联的Eip实例
	EipId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
}

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) GetDetailedString

func (self *SGuestnetwork) GetDetailedString() string

func (*SGuestnetwork) GetGuest

func (self *SGuestnetwork) GetGuest() *SGuest

func (SGuestnetwork) GetIP

func (self SGuestnetwork) GetIP() string

func (*SGuestnetwork) GetIfname

func (self *SGuestnetwork) GetIfname() string

func (SGuestnetwork) GetMAC

func (self SGuestnetwork) GetMAC() string

func (*SGuestnetwork) GetNetwork

func (gn *SGuestnetwork) GetNetwork() *SNetwork

func (*SGuestnetwork) GetShortDesc

func (self *SGuestnetwork) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SGuestnetwork) GetTeamGuestnetwork

func (self *SGuestnetwork) GetTeamGuestnetwork() (*SGuestnetwork, error)

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(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, network *SNetwork)

func (*SGuestnetwork) ToNetworkConfig

func (self *SGuestnetwork) ToNetworkConfig() *api.NetworkConfig

func (*SGuestnetwork) ValidateUpdateData

type SGuestnetworkManager

type SGuestnetworkManager struct {
	SGuestJointsManager
	SNetworkResourceBaseManager
}
var GuestnetworkManager *SGuestnetworkManager

func (*SGuestnetworkManager) DeleteGuestNics

func (manager *SGuestnetworkManager) DeleteGuestNics(ctx context.Context, userCred mcclient.TokenCredential, gns []SGuestnetwork, reserve bool) error

func (*SGuestnetworkManager) FetchByGuestId

func (manager *SGuestnetworkManager) FetchByGuestId(guestId string) ([]SGuestnetwork, error)

func (*SGuestnetworkManager) FetchByGuestIdIndex

func (manager *SGuestnetworkManager) FetchByGuestIdIndex(guestId string, index int8) (*SGuestnetwork, error)

func (*SGuestnetworkManager) FetchByIdsAndIpMac

func (manager *SGuestnetworkManager) FetchByIdsAndIpMac(guestId string, netId string, ipAddr string, mac string) (*SGuestnetwork, error)

func (*SGuestnetworkManager) FetchCustomizeColumns

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

func (*SGuestnetworkManager) FilterByMac

func (manager *SGuestnetworkManager) FilterByMac(mac string) *sqlchemy.SQuery

func (*SGuestnetworkManager) FilterByParams

func (manager *SGuestnetworkManager) FilterByParams(q *sqlchemy.SQuery, params jsonutils.JSONObject) *sqlchemy.SQuery

func (*SGuestnetworkManager) GenerateMac

func (manager *SGuestnetworkManager) GenerateMac(suggestion string) (string, error)

func (*SGuestnetworkManager) GetGuestByAddress

func (manager *SGuestnetworkManager) GetGuestByAddress(address string) *SGuest

func (*SGuestnetworkManager) GetSlaveFieldName

func (manager *SGuestnetworkManager) GetSlaveFieldName() string

func (*SGuestnetworkManager) ListItemExportKeys

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

func (*SGuestnetworkManager) ListItemFilter

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

func (*SGuestnetworkManager) OrderByExtraFields

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

type SGuestsecgroup

type SGuestsecgroup struct {
	SGuestJointsBase

	SSecurityGroupResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SGuestsecgroup) Delete

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

type SGuestsecgroupManager

type SGuestsecgroupManager struct {
	SGuestJointsManager
	SSecurityGroupResourceBaseManager
}
var GuestsecgroupManager *SGuestsecgroupManager

func (*SGuestsecgroupManager) FetchCustomizeColumns

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

func (*SGuestsecgroupManager) GetSlaveFieldName

func (manager *SGuestsecgroupManager) GetSlaveFieldName() string

func (*SGuestsecgroupManager) ListItemExportKeys

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

func (*SGuestsecgroupManager) ListItemFilter

func (*SGuestsecgroupManager) OrderByExtraFields

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

type SHost

type SHost struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SZoneResourceBase `update:""`
	SManagedResourceBase
	SBillingResourceBase
	SHostnameResourceBase

	// 机架
	Rack string `width:"16" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// 机位
	Slots string `width:"16" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`

	// 管理口MAC
	AccessMac string `width:"32" charset:"ascii" nullable:"false" index:"true" list:"domain" update:"domain"`

	// 管理口Ip地址
	AccessIp string `width:"16" charset:"ascii" nullable:"true" list:"domain" update:"domain"`

	// 管理地址
	ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	// 系统信息
	SysInfo jsonutils.JSONObject `nullable:"true" search:"domain" list:"domain" update:"domain" create:"domain_optional"`
	// 物理机序列号信息
	SN string `width:"128" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	// CPU核数
	CpuCount int `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// 物理CPU颗数
	NodeCount int8 `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// CPU描述信息
	CpuDesc string `width:"128" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// CPU频率
	CpuMhz int `nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// CPU缓存大小,单位KB
	CpuCache int `nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// 预留CPU大小
	CpuReserved int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`
	// CPU超分比
	CpuCmtbound float32 `nullable:"true" default:"8" list:"domain" update:"domain" create:"domain_optional"`
	// CPUMicrocode
	CpuMicrocode string `width:"64" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// CPU架构
	CpuArchitecture string `width:"16" charset:"ascii" nullable:"true" get:"domain" list:"domain" update:"domain" create:"domain_optional"`

	// 内存大小,单位Mb
	MemSize int `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// 预留内存大小
	MemReserved int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`
	// 内存超分比
	MemCmtbound float32 `nullable:"true" default:"1" list:"domain" update:"domain" create:"domain_optional"`

	// 存储大小,单位Mb
	StorageSize int `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// 存储类型
	StorageType string `width:"20" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
	// 存储驱动类型
	StorageDriver string `width:"20" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
	// 存储详情
	StorageInfo jsonutils.JSONObject `nullable:"true" get:"domain" update:"domain" create:"domain_optional"`

	// IPMI地址
	IpmiIp string `width:"16" charset:"ascii" nullable:"true" list:"domain"`

	// IPMI详情
	IpmiInfo jsonutils.JSONObject `nullable:"true" get:"domain" update:"domain" create:"domain_optional"`

	// 宿主机状态
	// example: online
	HostStatus string `width:"16" charset:"ascii" nullable:"false" default:"offline" list:"domain"`

	// 宿主机类型
	HostType string `width:"36" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`

	// host服务软件版本
	Version string `width:"128" charset:"ascii" list:"domain" update:"domain" create:"domain_optional"`
	// OVN软件版本
	OvnVersion string `width:"64" charset:"ascii" list:"domain" update:"domain" create:"domain_optional"`

	IsBaremetal bool `nullable:"true" default:"false" list:"domain" update:"domain" create:"domain_optional"`

	// 是否处于维护状态
	IsMaintenance bool `nullable:"true" default:"false" list:"domain"`

	LastPingAt time.Time ``
	// health check enabled by host agent online
	EnableHealthCheck bool `nullable:"true" default:"false"`

	ResourceType string `width:"36" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_optional" default:"shared"`

	RealExternalId string `width:"256" charset:"utf8" get:"domain"`

	// 是否为导入的宿主机
	IsImport bool `nullable:"true" default:"false" list:"domain" create:"domain_optional"`

	// 是否允许PXE启动
	EnablePxeBoot tristate.TriState `default:"true" list:"domain" create:"domain_optional" update:"domain"`

	// 主机UUID
	Uuid string `width:"64" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	// 主机启动模式, 可能值为PXE和ISO
	BootMode string `width:"8" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	// IPv4地址,作为私有云vpc访问外网时的网关
	OvnMappedIpAddr string `width:"16" charset:"ascii" nullable:"true" list:"user"`

	// UEFI详情
	UefiInfo jsonutils.JSONObject `nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
}

func ValidateHostResourceInput

func ValidateHostResourceInput(userCred mcclient.TokenCredential, input api.HostResourceInput) (*SHost, api.HostResourceInput, error)

func (*SHost) Attach2Network

func (self *SHost) Attach2Network(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	opt *hostAttachNetworkOption,
) (*SHostnetwork, error)

func (*SHost) Attach2Storage

func (self *SHost) Attach2Storage(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, mountPoint string) error

func (*SHost) Attach2Wire

func (self *SHost) Attach2Wire(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire) error

func (*SHost) BaremetalSyncRequest

func (self *SHost) BaremetalSyncRequest(ctx context.Context, method httputils.THttpMethod, url string, headers http.Header, body *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func (*SHost) BorrowIpAddrsFromGuest

func (self *SHost) BorrowIpAddrsFromGuest(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) ClearSchedDescCache

func (self *SHost) ClearSchedDescCache() error

func (*SHost) ClearSchedDescSessionCache

func (self *SHost) ClearSchedDescSessionCache(sessionId string) error

func (*SHost) CustomizeCreate

func (model *SHost) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SHost) CustomizeDelete

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

func (*SHost) Delete

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

func (*SHost) DeleteBaremetalnetwork

func (self *SHost) DeleteBaremetalnetwork(ctx context.Context, userCred mcclient.TokenCredential, bn *SHostnetwork, reserve bool)

func (*SHost) DisableNetif

func (self *SHost) DisableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error

* Disable a net interface, remove IP address if assigned

func (*SHost) DoSaveRenewInfo

func (self *SHost) DoSaveRenewInfo(ctx context.Context, userCred mcclient.TokenCredential, bc *billing.SBillingCycle, expireAt *time.Time) error

func (*SHost) EnableNetif

func (self *SHost) EnableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, network, ipAddr, allocDir string, netType string, reserve, requireDesignatedIp bool) error

func (*SHost) EsxiRequest

func (self *SHost) EsxiRequest(ctx context.Context, method httputils.THttpMethod, url string, headers http.Header, body *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func (*SHost) GetAdminNetInterface

func (self *SHost) GetAdminNetInterface() *SNetInterface

func (*SHost) GetAgent

func (self *SHost) GetAgent(at api.TAgentType) *SBaremetalagent

func (*SHost) GetAttach2Network

func (self *SHost) GetAttach2Network(netId string) *SHostnetwork

func (*SHost) GetAttachedEnabledHostStorages

func (self *SHost) GetAttachedEnabledHostStorages(storageType []string) []SStorage

func (*SHost) GetAttachedLocalStorageCapacity

func (self *SHost) GetAttachedLocalStorageCapacity() SStorageCapacity

func (*SHost) GetAttachedLocalStorages

func (self *SHost) GetAttachedLocalStorages() []SStorage

func (*SHost) GetBaremetalServer

func (self *SHost) GetBaremetalServer() *SGuest

func (*SHost) GetBaremetalnetworks

func (self *SHost) GetBaremetalnetworks() []SHostnetwork

func (*SHost) GetBaremetalnetworksQuery

func (self *SHost) GetBaremetalnetworksQuery() *sqlchemy.SQuery

func (*SHost) GetBaremetalstorage

func (self *SHost) GetBaremetalstorage() *SHoststorage

func (*SHost) GetCPUOvercommitBound

func (self *SHost) GetCPUOvercommitBound() float32

func (*SHost) GetChangeOwnerRequiredDomainIds

func (host *SHost) GetChangeOwnerRequiredDomainIds() []string

func (*SHost) GetContainerCount

func (self *SHost) GetContainerCount(status []string) (int, error)

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int

func (*SHost) GetDetailsAppOptions

func (h *SHost) GetDetailsAppOptions(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) GetDetailsIpmi

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

func (*SHost) GetDetailsJnlp

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

func (*SHost) GetDetailsSpec

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

func (*SHost) GetDetailsTapConfig

func (h *SHost) GetDetailsTapConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.SHostTapConfig, error)

func (*SHost) GetDetailsVnc

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

func (*SHost) GetDevsReservedResource

func (self *SHost) GetDevsReservedResource(devs []SIsolatedDevice) *api.IsolatedDeviceReservedResourceInput

func (*SHost) GetDriverWithDefault

func (self *SHost) GetDriverWithDefault() IHostDriver

func (*SHost) GetDynamicConditionInput

func (host *SHost) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SHost) GetFetchUrl

func (self *SHost) GetFetchUrl(disableHttps bool) string

func (*SHost) GetGuestCount

func (self *SHost) GetGuestCount() (int, error)

func (*SHost) GetGuests

func (self *SHost) GetGuests() ([]SGuest, error)

func (*SHost) GetGuestsBackupOnThisHost

func (self *SHost) GetGuestsBackupOnThisHost() []SGuest

func (*SHost) GetGuestsMasterOnThisHost

func (self *SHost) GetGuestsMasterOnThisHost() []SGuest

func (*SHost) GetGuestsQuery

func (self *SHost) GetGuestsQuery() *sqlchemy.SQuery

func (*SHost) GetHardwareSpecification

func (self *SHost) GetHardwareSpecification() *jsonutils.JSONDict

func (*SHost) GetHostDriver

func (self *SHost) GetHostDriver() IHostDriver

func (*SHost) GetHostnameByName

func (host *SHost) GetHostnameByName() string

func (*SHost) GetHoststorageByExternalId

func (self *SHost) GetHoststorageByExternalId(extId string) *SHoststorage

func (*SHost) GetHoststorageOfId

func (self *SHost) GetHoststorageOfId(storageId string) *SHoststorage

func (*SHost) GetHoststorages

func (self *SHost) GetHoststorages() []SHoststorage

func (*SHost) GetHoststoragesQuery

func (self *SHost) GetHoststoragesQuery() *sqlchemy.SQuery

func (*SHost) GetHostwires

func (self *SHost) GetHostwires() []SHostwire

func (*SHost) GetIHost

func (self *SHost) GetIHost(ctx context.Context) (cloudprovider.ICloudHost, error)

func (*SHost) GetIHostAndProvider

func (self *SHost) GetIHostAndProvider(ctx context.Context) (cloudprovider.ICloudHost, cloudprovider.ICloudProvider, error)

func (*SHost) GetIRegion

func (self *SHost) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SHost) GetIpmiInfo

func (host *SHost) GetIpmiInfo() (types.SIPMIInfo, error)

func (*SHost) GetKvmGuests

func (self *SHost) GetKvmGuests() []SGuest

func (*SHost) GetLeastUsedStorage

func (self *SHost) GetLeastUsedStorage(backend string) *SStorage

func (*SHost) GetLocalStoragecache

func (self *SHost) GetLocalStoragecache() *SStoragecache

func (*SHost) GetMasterWire

func (self *SHost) GetMasterWire() *SWire

func (*SHost) GetMemSize

func (self *SHost) GetMemSize() int

func (*SHost) GetMemoryOvercommitBound

func (self *SHost) GetMemoryOvercommitBound() float32

func (*SHost) GetMetadataHiddenKeys

func (self *SHost) GetMetadataHiddenKeys() []string

func (*SHost) GetNetInterface

func (self *SHost) GetNetInterface(mac string) *SNetInterface

func (*SHost) GetNetInterfaces

func (self *SHost) GetNetInterfaces() []SNetInterface

func (*SHost) GetNetifName

func (self *SHost) GetNetifName(netif *SNetInterface) string

func (*SHost) GetNetifsOnWire

func (self *SHost) GetNetifsOnWire(wire *SWire) []SNetInterface

func (*SHost) GetNetinterfacesWithIdAndCredential

func (self *SHost) GetNetinterfacesWithIdAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) ([]SNetInterface, *SNetwork, error)

func (*SHost) GetNetworkWithId

func (self *SHost) GetNetworkWithId(netId string, reserved bool) (*SNetwork, error)

func (*SHost) GetNics

func (host *SHost) GetNics() []*types.SNic

func (*SHost) GetNonsystemGuestCount

func (self *SHost) GetNonsystemGuestCount() (int, error)

func (*SHost) GetNotReadyGuestsMemorySize

func (self *SHost) GetNotReadyGuestsMemorySize() (int, error)

func (*SHost) GetPinnedCpusetCores

func (self *SHost) GetPinnedCpusetCores(ctx context.Context, userCred mcclient.TokenCredential) (map[string][]int, error)

func (*SHost) GetQuotaKeys

func (model *SHost) GetQuotaKeys() quotas.SDomainRegionalCloudResourceKeys

func (*SHost) GetRegion

func (self *SHost) GetRegion() (*SCloudregion, error)

func (*SHost) GetReservedResourceForIsolatedDevice

func (self *SHost) GetReservedResourceForIsolatedDevice() (int, *api.IsolatedDeviceReservedResourceInput)

func (*SHost) GetResourceType

func (self *SHost) GetResourceType() string

func (*SHost) GetRunningGuestCount

func (self *SHost) GetRunningGuestCount() (int, error)

func (*SHost) GetRunningGuestMemorySize

func (self *SHost) GetRunningGuestMemorySize() int

func (*SHost) GetSchedtagJointManager

func (host *SHost) GetSchedtagJointManager() ISchedtagJointManager

func (*SHost) GetSchedtags

func (self *SHost) GetSchedtags() []SSchedtag

func (*SHost) GetShortDesc

func (self *SHost) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SHost) GetSpec

func (self *SHost) GetSpec(statusCheck bool) *jsonutils.JSONDict

func (*SHost) GetStorageByFilePath

func (self *SHost) GetStorageByFilePath(path string) *SStorage

func (*SHost) GetStorageCount

func (self *SHost) GetStorageCount() (int, error)

func (*SHost) GetStoragecache

func (self *SHost) GetStoragecache() *SStoragecache

func (*SHost) GetUEFIInfo

func (host *SHost) GetUEFIInfo() (*types.EFIBootMgrInfo, error)

func (*SHost) GetUsages

func (host *SHost) GetUsages() []db.IUsage

func (*SHost) GetVirtualCPUCount

func (self *SHost) GetVirtualCPUCount() float32

func (*SHost) GetVirtualMemorySize

func (self *SHost) GetVirtualMemorySize() float32

func (*SHost) GetWireCount

func (self *SHost) GetWireCount() (int, error)

func (*SHost) GetWiresQuery

func (self *SHost) GetWiresQuery() *sqlchemy.SQuery

func (*SHost) GetZone

func (self *SHost) GetZone() (*SZone, error)

func (*SHost) HasBMC

func (self *SHost) HasBMC() bool

func (*SHost) InitializedGuestStart

func (self *SHost) InitializedGuestStart(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) InitializedGuestStop

func (self *SHost) InitializedGuestStop(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) InstanceGroups

func (host *SHost) InstanceGroups() ([]SGroup, map[string]int, error)

InstanceGroups returns the enabled group of guest in host and their frequency of occurrence

func (*SHost) IsArmHost

func (self *SHost) IsArmHost() bool

func (*SHost) IsAssignable

func (host *SHost) IsAssignable(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) IsBaremetalAgentReady

func (self *SHost) IsBaremetalAgentReady() bool

func (*SHost) IsEsxiAgentReady

func (self *SHost) IsEsxiAgentReady() bool

func (*SHost) IsIpAddrWithinConvertedGuest

func (self *SHost) IsIpAddrWithinConvertedGuest(ctx context.Context, userCred mcclient.TokenCredential, ipAddr string, netif *SNetInterface) error

func (*SHost) IsMaintaining

func (host *SHost) IsMaintaining() bool

func (*SHost) IsPrepaidRecycle

func (host *SHost) IsPrepaidRecycle() bool

func (*SHost) IsPrepaidRecycleResource

func (self *SHost) IsPrepaidRecycleResource() bool

func (*SHost) IsUEFIBoot

func (self *SHost) IsUEFIBoot() bool

func (*SHost) MarkGuestUnknown

func (self *SHost) MarkGuestUnknown(userCred mcclient.TokenCredential)

func (*SHost) MigrateSharedStorageServers

func (host *SHost) MigrateSharedStorageServers(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) OnHostDown

func (host *SHost) OnHostDown(ctx context.Context, userCred mcclient.TokenCredential)

func (*SHost) PerformAddNetif

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

func (*SHost) PerformAutoMigrateOnHostDown

func (self *SHost) PerformAutoMigrateOnHostDown(
	ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.HostAutoMigrateInput,
) (jsonutils.JSONObject, error)

func (*SHost) PerformCacheImage

func (self *SHost) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.CacheImageInput) (jsonutils.JSONObject, error)

func (*SHost) PerformChangeOwner

func (*SHost) PerformConvertHypervisor

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

func (*SHost) PerformDisable

func (self *SHost) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)

func (*SHost) PerformDisableNetif

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

func (*SHost) PerformEjectIso

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

func (*SHost) PerformEnable

func (self *SHost) PerformEnable(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input apis.PerformEnableInput,
) (jsonutils.JSONObject, error)

func (*SHost) PerformEnableNetif

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

func (*SHost) PerformHostExitMaintenance

func (host *SHost) PerformHostExitMaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformHostMaintenance

func (host *SHost) PerformHostMaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformInitialize

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

func (*SHost) PerformInsertIso

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

func (*SHost) PerformIpmiProbe

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

func (*SHost) PerformMaintenance

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

func (*SHost) PerformOffline

func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.HostOfflineInput) (jsonutils.JSONObject, error)

func (*SHost) PerformOnline

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

func (*SHost) PerformPing

func (self *SHost) PerformPing(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SHostPingInput) (jsonutils.JSONObject, error)

func (*SHost) PerformPrepare

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

func (*SHost) PerformPrivate

func (host *SHost) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error)

func (*SHost) PerformProbeIsolatedDevices

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

func (*SHost) PerformPublic

func (*SHost) PerformRemoveAllNetifs

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

func (*SHost) PerformRemoveNetif

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

func (*SHost) PerformRenewPrepaidRecycle

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

func (*SHost) PerformReserveCpus

func (self *SHost) PerformReserveCpus(
	ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, input api.HostReserveCpusInput,
) (jsonutils.JSONObject, error)

func (*SHost) PerformReset

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

func (*SHost) PerformSetReservedResourceForIsolatedDevice

func (host *SHost) PerformSetReservedResourceForIsolatedDevice(
	ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, input api.IsolatedDeviceReservedResourceInput,
) (jsonutils.JSONObject, error)

func (*SHost) PerformSetSchedtag

func (host *SHost) PerformSetSchedtag(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformStart

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

func (*SHost) PerformStatus

func (host *SHost) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformStatusInput) (jsonutils.JSONObject, error)

func (*SHost) PerformStop

func (*SHost) PerformSyncConfig

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

func (*SHost) PerformSyncstatus

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

func (*SHost) PerformUndoConvert

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

func (*SHost) PerformUndoPrepaidRecycle

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

func (*SHost) PerformUnmaintenance

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

func (*SHost) PerformUnreserveCpus

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

func (*SHost) PerformUpdateStorage

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

func (*SHost) PostCreate

func (self *SHost) PostCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
)

func (*SHost) PostUpdate

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

func (*SHost) RealDelete

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

func (*SHost) RebuildRecycledGuest

func (host *SHost) RebuildRecycledGuest(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) RemoteHealthStatus

func (host *SHost) RemoteHealthStatus(ctx context.Context) string

func (*SHost) RemoveNetif

func (self *SHost) RemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error

func (*SHost) Request

func (self *SHost) Request(ctx context.Context, userCred mcclient.TokenCredential, method httputils.THttpMethod, url string, headers http.Header, body jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) SaveCleanUpdates

func (self *SHost) SaveCleanUpdates(doUpdate func() error) (map[string]sqlchemy.SUpdateDiff, error)

func (*SHost) SaveUpdates

func (self *SHost) SaveUpdates(doUpdate func() error) (map[string]sqlchemy.SUpdateDiff, error)

func (*SHost) SetGuestCreateNetworkAndDiskParams

func (host *SHost) SetGuestCreateNetworkAndDiskParams(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerCreateInput) (*api.ServerCreateInput, error)

func (*SHost) SetStatus

func (host *SHost) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error

func (*SHost) StartBaremetalCreateTask

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

func (*SHost) StartBaremetalUnmaintenanceTask

func (self *SHost) StartBaremetalUnmaintenanceTask(ctx context.Context, userCred mcclient.TokenCredential, startGuest bool, action string) error

func (*SHost) StartDeleteBaremetalTask

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

func (*SHost) StartEjectIsoTask

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

func (*SHost) StartImageCacheTask

func (self *SHost) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, input api.CacheImageInput) error

func (*SHost) StartInsertIsoTask

func (self *SHost) StartInsertIsoTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, boot bool, parentTaskId string) error

func (*SHost) StartIpmiProbeTask

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

func (*SHost) StartMaintainTask

func (host *SHost) StartMaintainTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) error

func (*SHost) StartPrepareTask

func (self *SHost) StartPrepareTask(ctx context.Context, userCred mcclient.TokenCredential, onfinish, parentTaskId string) error

func (*SHost) StartSyncAllGuestsStatusTask

func (self *SHost) StartSyncAllGuestsStatusTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) StartSyncConfig

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

func (*SHost) StartSyncTask

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

func (*SHost) StartSyncstatus

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

func (*SHost) SyncAttachedStorageStatus

func (self *SHost) SyncAttachedStorageStatus()

func (*SHost) SyncCleanSchedDescCache

func (self *SHost) SyncCleanSchedDescCache() error

func (*SHost) SyncClearSchedDescSessionCache

func (self *SHost) SyncClearSchedDescSessionCache(sessionId string) error

func (*SHost) SyncEsxiHostWires

func (host *SHost) SyncEsxiHostWires(ctx context.Context, userCred mcclient.TokenCredential, remoteHost cloudprovider.ICloudHost) compare.SyncResult

TODO: support multithreaded operation

func (*SHost) SyncHostExternalNics

func (host *SHost) SyncHostExternalNics(ctx context.Context, userCred mcclient.TokenCredential, ihost cloudprovider.ICloudHost) compare.SyncResult

func (*SHost) SyncHostStorages

func (self *SHost) SyncHostStorages(ctx context.Context, userCred mcclient.TokenCredential, storages []cloudprovider.ICloudStorage, provider *SCloudprovider) ([]SStorage, []cloudprovider.ICloudStorage, compare.SyncResult)

func (*SHost) SyncHostWires

func (self *SHost) SyncHostWires(ctx context.Context, userCred mcclient.TokenCredential, wires []cloudprovider.ICloudWire) compare.SyncResult

func (*SHost) SyncWithRealPrepaidVM

func (self *SHost) SyncWithRealPrepaidVM(ctx context.Context, userCred mcclient.TokenCredential, iVM cloudprovider.ICloudVM) error

func (*SHost) UpdateDiskConfig

func (self *SHost) UpdateDiskConfig(userCred mcclient.TokenCredential, layouts []baremetal.Layout) error

func (*SHost) UpdateDnsRecord

func (self *SHost) UpdateDnsRecord(netif *SNetInterface, isAdd bool)

func (*SHost) UpdateDnsRecords

func (self *SHost) UpdateDnsRecords(isAdd bool)

func (*SHost) ValidateDeleteCondition

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

func (*SHost) ValidatePurgeCondition

func (self *SHost) ValidatePurgeCondition(ctx context.Context) error

func (*SHost) ValidateUpdateData

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

type SHostGuestResourceUsage

type SHostGuestResourceUsage struct {
	GuestCount     int
	GuestVcpuCount int
	GuestVmemSize  int
}

type SHostHealthChecker

type SHostHealthChecker struct {
	// contains filtered or unexported fields
}

func InitHostHealthChecker

func InitHostHealthChecker(cli *etcd.SEtcdClient, timeout int) *SHostHealthChecker

func (*SHostHealthChecker) StartHostsHealthCheck

func (h *SHostHealthChecker) StartHostsHealthCheck(ctx context.Context) error

func (*SHostHealthChecker) UnwatchHost

func (h *SHostHealthChecker) UnwatchHost(ctx context.Context, hostname string)

func (*SHostHealthChecker) WatchHost

func (h *SHostHealthChecker) WatchHost(ctx context.Context, hostname string) error

type SHostJointsBase

type SHostJointsBase struct {
	db.SJointResourceBase
}

type SHostJointsManager

type SHostJointsManager struct {
	db.SJointResourceBaseManager
	SHostResourceBaseManager
}

func NewHostJointsManager

func NewHostJointsManager(hostIdFieldName string, dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IStandaloneModelManager) SHostJointsManager

func (*SHostJointsManager) FetchCustomizeColumns

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

func (*SHostJointsManager) ListItemExportKeys

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

func (*SHostJointsManager) ListItemFilter

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

func (*SHostJointsManager) OrderByExtraFields

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

type SHostManager

var HostManager *SHostManager

func (*SHostManager) ClearAllSchedDescCache

func (self *SHostManager) ClearAllSchedDescCache() error

func (*SHostManager) ClearSchedDescCache

func (self *SHostManager) ClearSchedDescCache(hostId string) error

func (*SHostManager) ClearSchedDescSessionCache

func (self *SHostManager) ClearSchedDescSessionCache(hostId, sessionId string) error

func (*SHostManager) CustomizeFilterList

func (manager *SHostManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*db.CustomizeListFilters, error)

func (*SHostManager) FetchCustomizeColumns

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

func (*SHostManager) FetchGuestCnt

func (manager *SHostManager) FetchGuestCnt(hostIds []string) map[string]*sGuestCnt

func (*SHostManager) FetchHostByExtId

func (manager *SHostManager) FetchHostByExtId(extid string) *SHost

func (*SHostManager) FetchHostByHostname

func (manager *SHostManager) FetchHostByHostname(hostname string) *SHost

func (*SHostManager) FetchHostById

func (manager *SHostManager) FetchHostById(hostId string) *SHost

func (*SHostManager) GetContextManagers

func (manager *SHostManager) GetContextManagers() [][]db.IModelManager

func (*SHostManager) GetEnabledKvmHost

func (self *SHostManager) GetEnabledKvmHost() (*SHost, error)

func (*SHostManager) GetHostByIp

func (manager *SHostManager) GetHostByIp(managerId, hostType, hostIp string) (*SHost, error)

func (*SHostManager) GetHostByRealExternalId

func (manager *SHostManager) GetHostByRealExternalId(eid 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) GetPropertyHostTypeCount

func (self *SHostManager) GetPropertyHostTypeCount(ctx context.Context, userCred mcclient.TokenCredential, query api.HostListInput) (jsonutils.JSONObject, error)

func (*SHostManager) GetPropertyNodeCount

func (self *SHostManager) GetPropertyNodeCount(ctx context.Context, userCred mcclient.TokenCredential, query api.HostListInput) (jsonutils.JSONObject, error)

func (*SHostManager) GetSpecIdent

func (manager *SHostManager) GetSpecIdent(input *jsonutils.JSONDict) []string

func (*SHostManager) GetSpecShouldCheckStatus

func (man *SHostManager) GetSpecShouldCheckStatus(query *jsonutils.JSONDict) (bool, error)

func (*SHostManager) InitializeData

func (manager *SHostManager) InitializeData() error

func (*SHostManager) IsNewNameUnique

func (self *SHostManager) IsNewNameUnique(name string, userCred mcclient.TokenCredential, kwargs *jsonutils.JSONDict) (bool, error)

func (*SHostManager) ListItemExportKeys

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

func (*SHostManager) ListItemFilter

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

宿主机/物理机列表

func (*SHostManager) NewFromCloudHost

func (manager *SHostManager) NewFromCloudHost(ctx context.Context, userCred mcclient.TokenCredential, extHost cloudprovider.ICloudHost, provider *SCloudprovider, izone *SZone) (*SHost, error)

func (*SHostManager) OrderByExtraFields

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

func (*SHostManager) PingDetectionTask

func (manager *SHostManager) PingDetectionTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SHostManager) QueryDistinctExtraField

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

func (*SHostManager) SyncClearSchedDescSessionCache

func (self *SHostManager) SyncClearSchedDescSessionCache(hostId, sessionId string) error

sync clear sched desc on scheduler side

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.IIdentityProvider,
	scope rbacutils.TRbacScope,
	rangeObjs []db.IStandaloneModel,
	hostStatus, status string,
	hostTypes []string,
	resourceTypes []string,
	providers []string, brands []string, cloudEnv string,
	enabled, isBaremetal tristate.TriState,
	policyResult rbacutils.SPolicyResult,
) HostsCountStat

func (*SHostManager) ValidateCreateData

func (manager *SHostManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	input api.HostCreateInput,
) (api.HostCreateInput, error)

func (*SHostManager) ValidateSizeParams

func (manager *SHostManager) ValidateSizeParams(input api.HostSizeAttributes) (api.HostSizeAttributes, error)

type SHostResourceBase

type SHostResourceBase struct {
	HostId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
}

func (*SHostResourceBase) GetChangeOwnerCandidateDomainIds

func (model *SHostResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SHostResourceBase) GetHost

func (self *SHostResourceBase) GetHost() *SHost

type SHostResourceBaseManager

type SHostResourceBaseManager struct {
	SZoneResourceBaseManager
	SManagedResourceBaseManager
	// contains filtered or unexported fields
}

func (*SHostResourceBaseManager) FetchCustomizeColumns

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

func (*SHostResourceBaseManager) GetExportKeys

func (manager *SHostResourceBaseManager) GetExportKeys() []string

func (*SHostResourceBaseManager) GetOrderByFields

func (manager *SHostResourceBaseManager) GetOrderByFields(query api.HostFilterListInput) []string

func (*SHostResourceBaseManager) GetOrderBySubQuery

func (manager *SHostResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.HostFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SHostResourceBaseManager) ListItemExportKeys

func (*SHostResourceBaseManager) ListItemFilter

func (*SHostResourceBaseManager) OrderByExtraFields

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

func (*SHostResourceBaseManager) QueryDistinctExtraField

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

type SHostnameResourceBase

type SHostnameResourceBase struct {
	Hostname string `width:"60" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
}

type SHostnameResourceBaseManager

type SHostnameResourceBaseManager struct {
}

func (*SHostnameResourceBaseManager) ValidateHostname

func (manager *SHostnameResourceBaseManager) ValidateHostname(name string, osType string, input api.HostnameInput) (api.HostnameInput, error)

type SHostnetwork

type SHostnetwork struct {
	SHostJointsBase

	// 宿主机ID
	BaremetalId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
	// 网络ID
	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
	// IP地址
	IpAddr string `width:"16" charset:"ascii" list:"domain"`
	// MAC地址
	MacAddr string `width:"18" charset:"ascii" list:"domain"`
}

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) GetHost

func (bn *SHostnetwork) GetHost() *SHost

func (*SHostnetwork) GetNetInterface

func (bn *SHostnetwork) GetNetInterface() *SNetInterface

func (*SHostnetwork) GetNetwork

func (bn *SHostnetwork) GetNetwork() *SNetwork

type SHostnetworkManager

type SHostnetworkManager struct {
	SHostJointsManager
	SNetworkResourceBaseManager
}
var HostnetworkManager *SHostnetworkManager

func (*SHostnetworkManager) FetchCustomizeColumns

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

func (*SHostnetworkManager) GetHostByAddress

func (man *SHostnetworkManager) GetHostByAddress(addr string) *SHost

func (*SHostnetworkManager) GetHostNetworkByAddress

func (man *SHostnetworkManager) GetHostNetworkByAddress(addr string) *SHostnetwork

func (*SHostnetworkManager) GetMasterFieldName

func (manager *SHostnetworkManager) GetMasterFieldName() string

func (*SHostnetworkManager) GetNetworkByAddress

func (man *SHostnetworkManager) GetNetworkByAddress(addr string) *SNetwork

func (*SHostnetworkManager) GetSlaveFieldName

func (manager *SHostnetworkManager) GetSlaveFieldName() string

func (*SHostnetworkManager) ListItemExportKeys

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

func (*SHostnetworkManager) ListItemFilter

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

func (*SHostnetworkManager) OrderByExtraFields

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

func (*SHostnetworkManager) QueryByAddress

func (man *SHostnetworkManager) QueryByAddress(addr string) *sqlchemy.SQuery

type SHostschedtag

type SHostschedtag struct {
	SSchedtagJointsBase

	HostId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // 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) GetDetails

func (self *SHostschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SHostschedtag) GetResourceId

func (self *SHostschedtag) GetResourceId() string

type SHostschedtagManager

type SHostschedtagManager struct {
	*SSchedtagJointsManager
	// contains filtered or unexported fields
}
var (
	HostschedtagManager *SHostschedtagManager
)

func (*SHostschedtagManager) GetMasterFieldName

func (manager *SHostschedtagManager) GetMasterFieldName() string

func (*SHostschedtagManager) ListItemFilter

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

func (*SHostschedtagManager) OrderByExtraFields

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

type SHoststorage

type SHoststorage struct {
	SHostJointsBase

	// 宿主机Id
	HostId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"required" json:"host_id"`
	// 存储Id
	StorageId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"required" json:"storage_id"`

	// 挂载点
	MountPoint string `width:"256" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"required" json:"mount_point"`
	// 是否是根分区
	IsRootPartition bool `nullable:"true" default:"false" list:"domain" update:"domain" create:"optional"`

	// 配置信息
	Config *jsonutils.JSONArray `nullable:"true" get:"domain" json:"config"`
	// 真实容量大小
	RealCapacity int64 `nullable:"true" list:"domain" json:"real_capacity"`
}

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) GetGuestDiskCount

func (self *SHoststorage) GetGuestDiskCount() (int, error)

func (*SHoststorage) GetHost

func (self *SHoststorage) GetHost() *SHost

func (*SHoststorage) GetStorage

func (self *SHoststorage) GetStorage() *SStorage

func (*SHoststorage) PostCreate

func (*SHoststorage) PostDelete

func (self *SHoststorage) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SHoststorage) StartHostStorageAttachTask

func (self *SHoststorage) StartHostStorageAttachTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHoststorage) StartHostStorageDetachTask

func (self *SHoststorage) StartHostStorageDetachTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHoststorage) SyncStorageStatus

func (self *SHoststorage) SyncStorageStatus(userCred mcclient.TokenCredential)

func (*SHoststorage) ValidateDeleteCondition

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

type SHoststorageManager

type SHoststorageManager struct {
	SHostJointsManager
	SStorageResourceBaseManager
}
var HoststorageManager *SHoststorageManager

func (*SHoststorageManager) FetchCustomizeColumns

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

func (*SHoststorageManager) GetMasterFieldName

func (manager *SHoststorageManager) GetMasterFieldName() string

func (*SHoststorageManager) GetSlaveFieldName

func (manager *SHoststorageManager) GetSlaveFieldName() string

func (*SHoststorageManager) GetStorages

func (manager *SHoststorageManager) GetStorages(hostId string) ([]SHoststorage, error)

func (*SHoststorageManager) ListItemExportKeys

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

func (*SHoststorageManager) ListItemFilter

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

func (*SHoststorageManager) OrderByExtraFields

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

func (*SHoststorageManager) ValidateCreateData

type SHostwire

type SHostwire struct {
	SHostJointsBase

	Bridge string `width:"64" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
	// 接口名称
	Interface string `width:"16" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
	// 是否是主地址
	IsMaster bool `nullable:"true" default:"false" list:"domain" update:"domain" create:"domain_optional"`
	// MAC地址
	MacAddr string `width:"18" charset:"ascii" list:"domain" update:"domain" create:"domain_required"`

	// 宿主机Id
	HostId string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
	// 二层网络Id
	WireId string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
}

func (*SHostwire) Delete

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

func (*SHostwire) Detach

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

func (*SHostwire) GetGuestnicsCount

func (self *SHostwire) GetGuestnicsCount() (int, error)

func (*SHostwire) GetHost

func (hw *SHostwire) GetHost() *SHost

func (*SHostwire) GetWire

func (hw *SHostwire) GetWire() *SWire

func (*SHostwire) PostCreate

func (hw *SHostwire) PostCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
)

func (*SHostwire) PreDelete

func (self *SHostwire) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SHostwire) ValidateDeleteCondition

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

type SHostwireManager

type SHostwireManager struct {
	SHostJointsManager
	SWireResourceBaseManager
}
var HostwireManager *SHostwireManager

func (*SHostwireManager) FetchByHostIdAndMac

func (manager *SHostwireManager) FetchByHostIdAndMac(hostId string, mac string) (*SHostwire, error)

func (*SHostwireManager) FetchCustomizeColumns

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

func (*SHostwireManager) FilterByParams

func (manager *SHostwireManager) FilterByParams(q *sqlchemy.SQuery, params jsonutils.JSONObject) *sqlchemy.SQuery

func (*SHostwireManager) GetMasterFieldName

func (manager *SHostwireManager) GetMasterFieldName() string

func (*SHostwireManager) GetSlaveFieldName

func (manager *SHostwireManager) GetSlaveFieldName() string

func (*SHostwireManager) ListItemExportKeys

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

func (*SHostwireManager) ListItemFilter

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

func (*SHostwireManager) OrderByExtraFields

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

type SHuaweiCachedLb

type SHuaweiCachedLb struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	BackendServerId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 后端服务器 实例ID
	BackendId            string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 本地loadbalancebackend id
	CachedBackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SHuaweiCachedLb) GetCachedBackendGroup

func (lbb *SHuaweiCachedLb) GetCachedBackendGroup() (*SHuaweiCachedLbbg, error)

func (*SHuaweiCachedLb) SyncWithCloudLoadbalancerBackend

func (lbb *SHuaweiCachedLb) SyncWithCloudLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) error

type SHuaweiCachedLbManager

type SHuaweiCachedLbManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var HuaweiCachedLbManager *SHuaweiCachedLbManager

func (*SHuaweiCachedLbManager) CreateHuaweiCachedLb

func (man *SHuaweiCachedLbManager) CreateHuaweiCachedLb(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, cachedLbbg *SHuaweiCachedLbbg, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) (*SHuaweiCachedLb, error)

func (*SHuaweiCachedLbManager) GetBackendsByLocalBackendId

func (man *SHuaweiCachedLbManager) GetBackendsByLocalBackendId(backendId string) ([]SHuaweiCachedLb, error)

func (*SHuaweiCachedLbManager) GetResourceCount

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

func (*SHuaweiCachedLbManager) SyncLoadbalancerBackends

func (man *SHuaweiCachedLbManager) SyncLoadbalancerBackends(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, loadbalancerBackendgroup *SHuaweiCachedLbbg, lbbs []cloudprovider.ICloudLoadbalancerBackend, syncRange *SSyncRange) compare.SyncResult

type SHuaweiCachedLbbg

type SHuaweiCachedLbbg struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	AssociatedId   string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`  // 关联ID
	AssociatedType string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`  // 关联类型, listener || rule
	ProtocolType   string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` // 监听协议类型
}

func (*SHuaweiCachedLbbg) GetCachedBackends

func (lbbg *SHuaweiCachedLbbg) GetCachedBackends() ([]SHuaweiCachedLb, error)

func (*SHuaweiCachedLbbg) GetICloudLoadbalancerBackendGroup

func (lbbg *SHuaweiCachedLbbg) GetICloudLoadbalancerBackendGroup(ctx context.Context) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SHuaweiCachedLbbg) GetLoadbalancer

func (lbbg *SHuaweiCachedLbbg) GetLoadbalancer() *SLoadbalancer

func (*SHuaweiCachedLbbg) GetLocalBackendGroup

func (lbbg *SHuaweiCachedLbbg) GetLocalBackendGroup(ctx context.Context, userCred mcclient.TokenCredential) (*SLoadbalancerBackendGroup, error)

func (*SHuaweiCachedLbbg) SyncWithCloudLoadbalancerBackendgroup

func (lbbg *SHuaweiCachedLbbg) SyncWithCloudLoadbalancerBackendgroup(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, extLoadbalancerBackendgroup cloudprovider.ICloudLoadbalancerBackendGroup, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

type SHuaweiCachedLbbgManager

type SHuaweiCachedLbbgManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var HuaweiCachedLbbgManager *SHuaweiCachedLbbgManager

func (*SHuaweiCachedLbbgManager) GetCachedBackendGroupByAssociateId

func (man *SHuaweiCachedLbbgManager) GetCachedBackendGroupByAssociateId(associateId string) (*SHuaweiCachedLbbg, error)

func (*SHuaweiCachedLbbgManager) GetCachedBackendGroups

func (man *SHuaweiCachedLbbgManager) GetCachedBackendGroups(backendGroupId string) ([]SHuaweiCachedLbbg, error)

func (*SHuaweiCachedLbbgManager) GetResourceCount

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

func (*SHuaweiCachedLbbgManager) GetUsableCachedBackendGroup

func (man *SHuaweiCachedLbbgManager) GetUsableCachedBackendGroup(backendGroupId string, protocolType string) (*SHuaweiCachedLbbg, error)

func (*SHuaweiCachedLbbgManager) GetUsableCachedBackendGroups

func (man *SHuaweiCachedLbbgManager) GetUsableCachedBackendGroups(backendGroupId string, protocolType string) ([]SHuaweiCachedLbbg, error)

type SI18nResourceBase

type SI18nResourceBase struct {
}

func (*SI18nResourceBase) GetModelI18N

func (self *SI18nResourceBase) GetModelI18N(ctx context.Context, model db.IModel) *jsonutils.JSONDict

func (*SI18nResourceBase) GetModelKeyI18N

func (self *SI18nResourceBase) GetModelKeyI18N(ctx context.Context, model db.IModel, keyName string) (string, bool)

func (*SI18nResourceBase) RemoveI18ns

func (self *SI18nResourceBase) RemoveI18ns(ctx context.Context, userCred mcclient.TokenCredential, model db.IModel) error

type SI18nResourceBaseManager

type SI18nResourceBaseManager struct {
}

func (*SI18nResourceBaseManager) SyncI18ns

type SIPv6Gateway

type SIPv6Gateway struct {
	db.SSharableVirtualResourceBase
	db.SExternalizedResourceBase

	SVpcResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`
}

func (*SIPv6Gateway) Delete

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

func (*SIPv6Gateway) GetChangeOwnerCandidateDomainIds

func (self *SIPv6Gateway) GetChangeOwnerCandidateDomainIds() []string

func (*SIPv6Gateway) RealDelete

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

func (*SIPv6Gateway) SyncWithCloudIPv6Gateway

func (self *SIPv6Gateway) SyncWithCloudIPv6Gateway(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudIPv6Gateway, provider *SCloudprovider) error

func (*SIPv6Gateway) ValidateDeleteCondition

func (self *SIPv6Gateway) ValidateDeleteCondition(ctx context.Context, data *api.IPv6GatewayDetails) error

func (*SIPv6Gateway) ValidateUpdateCondition

func (self *SIPv6Gateway) ValidateUpdateCondition(ctx context.Context) error

func (*SIPv6Gateway) ValidateUpdateData

type SIPv6GatewayManager

var IPv6GatewayManager *SIPv6GatewayManager

func (*SIPv6GatewayManager) AllowScope

func (manager *SIPv6GatewayManager) AllowScope(userCred mcclient.TokenCredential) rbacutils.TRbacScope

func (*SIPv6GatewayManager) FetchCustomizeColumns

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

func (*SIPv6GatewayManager) GetContextManagers

func (manager *SIPv6GatewayManager) GetContextManagers() [][]db.IModelManager

func (*SIPv6GatewayManager) ListItemExportKeys

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

func (*SIPv6GatewayManager) ListItemFilter

func (manager *SIPv6GatewayManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.IPv6GatewayListInput,
) (*sqlchemy.SQuery, error)

IPv6网关列表

func (*SIPv6GatewayManager) OrderByExtraFields

func (manager *SIPv6GatewayManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.IPv6GatewayListInput,
) (*sqlchemy.SQuery, error)

func (*SIPv6GatewayManager) QueryDistinctExtraField

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

func (*SIPv6GatewayManager) ValidateCreateData

type SInfrasQuota

type SInfrasQuota struct {
	quotas.SQuotaBase

	quotas.SDomainRegionalCloudResourceKeys

	Host int `default:"-1" allow_zero:"true" json:"host"`
	Vpc  int `default:"-1" allow_zero:"true" json:"vpc"`
}

func (*SInfrasQuota) Add

func (self *SInfrasQuota) Add(quota quotas.IQuota)

func (*SInfrasQuota) Allocable

func (self *SInfrasQuota) Allocable(request quotas.IQuota) int

func (*SInfrasQuota) Exceed

func (used *SInfrasQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SInfrasQuota) FetchSystemQuota

func (self *SInfrasQuota) FetchSystemQuota()

func (*SInfrasQuota) FetchUsage

func (self *SInfrasQuota) FetchUsage(ctx context.Context) error

func (*SInfrasQuota) GetKeys

func (self *SInfrasQuota) GetKeys() quotas.IQuotaKeys

func (*SInfrasQuota) IsEmpty

func (self *SInfrasQuota) IsEmpty() bool

func (*SInfrasQuota) ResetNegative

func (self *SInfrasQuota) ResetNegative()

func (*SInfrasQuota) SetKeys

func (self *SInfrasQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SInfrasQuota) Sub

func (self *SInfrasQuota) Sub(quota quotas.IQuota)

func (*SInfrasQuota) ToJSON

func (self *SInfrasQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SInfrasQuota) Update

func (self *SInfrasQuota) Update(quota quotas.IQuota)

type SInfrasQuotaDetail

type SInfrasQuotaDetail struct {
	SInfrasQuota

	quotas.SDomainRegionalCloudResourceDetailKeys
}

基础设施配额详情

func GetInfrasQuota

func GetInfrasQuota(query quotas.SBaseQuotaQueryInput) *SInfrasQuotaDetail

获取指定域的基础设施配额

func ListInfrasQuotas

func ListInfrasQuotas(query quotas.SBaseQuotaQueryInput) *SInfrasQuotaDetail

获取所有域的基础设施配额

func SetInfrasQuotas

func SetInfrasQuotas(input SetInfrasQuotaInput) *SInfrasQuotaDetail

设置指定域的基础设施配额

type SInstanceBackup

type SInstanceBackup struct {
	db.SVirtualResourceBase

	SManagedResourceBase
	SCloudregionResourceBase
	db.SMultiArchResourceBase

	db.SEncryptedResource

	BackupStorageId string `width:"36" charset:"ascii" nullable:"true" create:"required" list:"user" index:"true"`

	GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" index:"true"`
	// 云主机配置 corresponds to api.ServerCreateInput
	ServerConfig jsonutils.JSONObject `nullable:"true" list:"user"`
	// 云主机标签
	ServerMetadata jsonutils.JSONObject `nullable:"true" list:"user"`
	// 安全组
	SecGroups jsonutils.JSONObject `nullable:"true" list:"user"`
	// 秘钥Id
	KeypairId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 操作系统类型
	OsType string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 套餐名称
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`
	// 主机备份容量和
	SizeMb int `nullable:"false" list:"user"`
}

func (*SInstanceBackup) CustomizeCreate

func (self *SInstanceBackup) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) error

func (*SInstanceBackup) CustomizeDelete

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

func (*SInstanceBackup) Delete

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

func (*SInstanceBackup) FillFromPackMetadata

func (ib *SInstanceBackup) FillFromPackMetadata(ctx context.Context, userCred mcclient.TokenCredential, diskBackupIds []string, metadata *api.InstanceBackupPackMetadata) (*SInstanceBackup, error)

func (*SInstanceBackup) GetBackupStorage

func (self *SInstanceBackup) GetBackupStorage() (*SBackupStorage, error)

func (*SInstanceBackup) GetBackups

func (self *SInstanceBackup) GetBackups() ([]SDiskBackup, error)

func (*SInstanceBackup) GetGuest

func (self *SInstanceBackup) GetGuest() (*SGuest, error)

func (*SInstanceBackup) GetRegionDriver

func (self *SInstanceBackup) GetRegionDriver() IRegionDriver

func (*SInstanceBackup) PackMetadata

func (*SInstanceBackup) PerformPack

func (*SInstanceBackup) PerformRecovery

func (*SInstanceBackup) RealDelete

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

func (*SInstanceBackup) StartCreateInstanceBackupTask

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

func (*SInstanceBackup) StartInstanceBackupDeleteTask

func (self *SInstanceBackup) StartInstanceBackupDeleteTask(
	ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, forceDelete bool) error

func (*SInstanceBackup) StartRecoveryTask

func (self *SInstanceBackup) StartRecoveryTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, serverName string) error

func (*SInstanceBackup) ToInstanceCreateInput

func (self *SInstanceBackup) ToInstanceCreateInput(sourceInput *api.ServerCreateInput) (*api.ServerCreateInput, error)

func (*SInstanceBackup) ValidateDeleteCondition

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

type SInstanceBackupJoint

type SInstanceBackupJoint struct {
	db.SVirtualJointResourceBase

	InstanceBackupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	DiskBackupId     string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	DiskIndex        int8   `nullable:"false" default:"0" list:"user" create:"required"`
}

+onecloud:swagger-gen-ignore

func (*SInstanceBackupJoint) Detach

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

type SInstanceBackupJointManager

type SInstanceBackupJointManager struct {
	db.SVirtualJointResourceBaseManager
}

+onecloud:swagger-gen-ignore

var InstanceBackupJointManager *SInstanceBackupJointManager

func (*SInstanceBackupJointManager) CreateJoint

func (manager *SInstanceBackupJointManager) CreateJoint(ctx context.Context, instanceBackupId, backupId string, diskIndex int8) error

func (*SInstanceBackupJointManager) GetMasterFieldName

func (manager *SInstanceBackupJointManager) GetMasterFieldName() string

func (*SInstanceBackupJointManager) GetSlaveFieldName

func (manager *SInstanceBackupJointManager) GetSlaveFieldName() string

func (*SInstanceBackupJointManager) IsSubBackup

func (manager *SInstanceBackupJointManager) IsSubBackup(backupId string) (bool, error)

type SInstanceBackupManager

var InstanceBackupManager *SInstanceBackupManager

func (*SInstanceBackupManager) CreateInstanceBackup

func (manager *SInstanceBackupManager) CreateInstanceBackup(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, name, backupStorageId string) (*SInstanceBackup, error)

func (*SInstanceBackupManager) FetchCustomizeColumns

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

func (*SInstanceBackupManager) ListItemExportKeys

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

func (*SInstanceBackupManager) ListItemFilter

func (*SInstanceBackupManager) OnCreateComplete

func (manager *SInstanceBackupManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SInstanceBackupManager) OrderByExtraFields

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

func (*SInstanceBackupManager) QueryDistinctExtraField

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

type SInstanceSnapshot

type SInstanceSnapshot struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase
	db.SMultiArchResourceBase

	db.SEncryptedResource

	// 云主机Id
	GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	// 云主机配置
	ServerConfig jsonutils.JSONObject `nullable:"true" list:"user"`
	// 云主机标签
	ServerMetadata jsonutils.JSONObject `nullable:"true" list:"user"`
	// 是否自动删除
	AutoDelete bool `default:"false" update:"user" list:"user"`
	// 引用次数
	RefCount int `default:"0" list:"user"`
	// 安全组
	SecGroups jsonutils.JSONObject `nullable:"true" list:"user"`
	// 秘钥Id
	KeypairId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 操作系统类型
	OsType string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 套餐名称
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`
	// 主机快照磁盘容量和
	SizeMb int `nullable:"false"`
	// 镜像ID
	ImageId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
	// 是否保存内存
	WithMemory bool `default:"false" get:"user" list:"user"`
	// 内存文件大小
	MemorySizeMB int `nullable:"true" get:"user" list:"user"`
	// 内存文件所在宿主机
	MemoryFileHostId string `width:"36" charset:"ascii" nullable:"true" get:"user" list:"user"`
	// 内存文件路径
	MemoryFilePath string `width:"512" charset:"utf8" nullable:"true" get:"user" list:"user"`
	// 内存文件校验和
	MemoryFileChecksum string `width:"32" charset:"ascii" nullable:"true" get:"user" list:"user"`
}

func (*SInstanceSnapshot) AddRefCount

func (self *SInstanceSnapshot) AddRefCount(ctx context.Context) error

func (*SInstanceSnapshot) CustomizeCreate

func (self *SInstanceSnapshot) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) error

func (*SInstanceSnapshot) CustomizeDelete

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

func (*SInstanceSnapshot) DecRefCount

func (self *SInstanceSnapshot) DecRefCount(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SInstanceSnapshot) Delete

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

func (*SInstanceSnapshot) GetGuest

func (self *SInstanceSnapshot) GetGuest() (*SGuest, error)

func (*SInstanceSnapshot) GetInstanceSnapshotJointAt

func (self *SInstanceSnapshot) GetInstanceSnapshotJointAt(diskIndex int) (*SInstanceSnapshotJoint, error)

func (*SInstanceSnapshot) GetInstanceSnapshotJointsByOrder

func (isp *SInstanceSnapshot) GetInstanceSnapshotJointsByOrder(guest *SGuest) ([]*SInstanceSnapshotJoint, error)

func (*SInstanceSnapshot) GetQuotaKeys

func (self *SInstanceSnapshot) GetQuotaKeys() quotas.IQuotaKeys

func (*SInstanceSnapshot) GetRegionDriver

func (self *SInstanceSnapshot) GetRegionDriver() IRegionDriver

func (*SInstanceSnapshot) GetSnapshots

func (self *SInstanceSnapshot) GetSnapshots() ([]SSnapshot, error)

func (*SInstanceSnapshot) GetUsages

func (self *SInstanceSnapshot) GetUsages() []db.IUsage

func (*SInstanceSnapshot) RealDelete

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

func (*SInstanceSnapshot) StartCreateInstanceSnapshotTask

func (self *SInstanceSnapshot) StartCreateInstanceSnapshotTask(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	pendingUsage quotas.IQuota,
	parentTaskId string,
) error

func (*SInstanceSnapshot) StartInstanceSnapshotDeleteTask

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

func (*SInstanceSnapshot) SyncWithCloudInstanceSnapshot

func (is *SInstanceSnapshot) SyncWithCloudInstanceSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudInstanceSnapshot, guest *SGuest) error

func (*SInstanceSnapshot) ToInstanceCreateInput

func (self *SInstanceSnapshot) ToInstanceCreateInput(
	sourceInput *api.ServerCreateInput) (*api.ServerCreateInput, error)

func (*SInstanceSnapshot) ValidateDeleteCondition

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

type SInstanceSnapshotJoint

type SInstanceSnapshotJoint struct {
	db.SVirtualJointResourceBase

	InstanceSnapshotId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	SnapshotId         string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	DiskIndex          int8   `nullable:"false" default:"0" list:"user" create:"required"`
}

+onecloud:swagger-gen-ignore

func (*SInstanceSnapshotJoint) Detach

func (*SInstanceSnapshotJoint) GetSnapshotDisk

func (self *SInstanceSnapshotJoint) GetSnapshotDisk() (*SDisk, error)

type SInstanceSnapshotJointManager

type SInstanceSnapshotJointManager struct {
	db.SVirtualJointResourceBaseManager
}

+onecloud:swagger-gen-ignore

var InstanceSnapshotJointManager *SInstanceSnapshotJointManager

func (*SInstanceSnapshotJointManager) CreateJoint

func (manager *SInstanceSnapshotJointManager) CreateJoint(ctx context.Context, instanceSnapshotId, snapshotId string, diskIndex int8) error

func (*SInstanceSnapshotJointManager) GetMasterFieldName

func (manager *SInstanceSnapshotJointManager) GetMasterFieldName() string

func (*SInstanceSnapshotJointManager) GetSlaveFieldName

func (manager *SInstanceSnapshotJointManager) GetSlaveFieldName() string

func (*SInstanceSnapshotJointManager) IsSubSnapshot

func (manager *SInstanceSnapshotJointManager) IsSubSnapshot(snapshotId string) (bool, error)

type SInstanceSnapshotManager

var InstanceSnapshotManager *SInstanceSnapshotManager

func (*SInstanceSnapshotManager) CreateInstanceSnapshot

func (manager *SInstanceSnapshotManager) CreateInstanceSnapshot(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, name string, autoDelete bool, withMemory bool) (*SInstanceSnapshot, error)

func (*SInstanceSnapshotManager) FetchCustomizeColumns

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

func (*SInstanceSnapshotManager) InitializeData

func (ism *SInstanceSnapshotManager) InitializeData() error

func (*SInstanceSnapshotManager) ListItemExportKeys

func (*SInstanceSnapshotManager) ListItemFilter

主机快照列表

func (*SInstanceSnapshotManager) OrderByExtraFields

func (*SInstanceSnapshotManager) QueryDistinctExtraField

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

type SInstanceSpecQueryParams

type SInstanceSpecQueryParams struct {
	Provider       string
	PublicCloud    bool
	ZoneId         string
	PostpaidStatus string
	PrepaidStatus  string
	IngoreCache    bool
}

func NewInstanceSpecQueryParams

func NewInstanceSpecQueryParams(query jsonutils.JSONObject) *SInstanceSpecQueryParams

func (*SInstanceSpecQueryParams) GetCacheKey

func (self *SInstanceSpecQueryParams) GetCacheKey() string

type SInterVpcNetwork

func (*SInterVpcNetwork) AddVpc

func (self *SInterVpcNetwork) AddVpc(ctx context.Context, vpcId string) error

func (*SInterVpcNetwork) CustomizeDelete

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

func (*SInterVpcNetwork) GetICloudInterVpcNetwork

func (self *SInterVpcNetwork) GetICloudInterVpcNetwork(ctx context.Context) (cloudprovider.ICloudInterVpcNetwork, error)

func (*SInterVpcNetwork) GetInterVpcNetworkRouteSets

func (self *SInterVpcNetwork) GetInterVpcNetworkRouteSets() ([]SInterVpcNetworkRouteSet, error)

func (*SInterVpcNetwork) GetProvider

func (*SInterVpcNetwork) GetVpcs

func (self *SInterVpcNetwork) GetVpcs() ([]SVpc, error)

func (*SInterVpcNetwork) PerformAddvpc

func (*SInterVpcNetwork) PerformRemovevpc

func (*SInterVpcNetwork) PerformSyncstatus

func (*SInterVpcNetwork) PostCreate

func (*SInterVpcNetwork) RealDelete

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

func (*SInterVpcNetwork) RemoveAllVpc

func (self *SInterVpcNetwork) RemoveAllVpc(ctx context.Context) error

func (*SInterVpcNetwork) RemoveVpc

func (self *SInterVpcNetwork) RemoveVpc(ctx context.Context, vpcId string) error

func (*SInterVpcNetwork) StartInterVpcNetworkAddVpcTask

func (self *SInterVpcNetwork) StartInterVpcNetworkAddVpcTask(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc) error

func (*SInterVpcNetwork) StartInterVpcNetworkRemoveVpcTask

func (self *SInterVpcNetwork) StartInterVpcNetworkRemoveVpcTask(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc) error

func (*SInterVpcNetwork) StartInterVpcNetworkUpdateRoutesetTask

func (self *SInterVpcNetwork) StartInterVpcNetworkUpdateRoutesetTask(ctx context.Context, userCred mcclient.TokenCredential, routeSet *SInterVpcNetworkRouteSet, routeSetAction string) error

func (*SInterVpcNetwork) SyncInterVpcNetworkRouteSets

func (self *SInterVpcNetwork) SyncInterVpcNetworkRouteSets(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudInterVpcNetwork) compare.SyncResult

func (*SInterVpcNetwork) SyncWithCloudInterVpcNetwork

func (self *SInterVpcNetwork) SyncWithCloudInterVpcNetwork(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudInterVpcNetwork) error

type SInterVpcNetworkManager

var InterVpcNetworkManager *SInterVpcNetworkManager

func (*SInterVpcNetworkManager) FetchCustomizeColumns

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

func (*SInterVpcNetworkManager) ListItemExportKeys

func (*SInterVpcNetworkManager) ListItemFilter

列表

func (*SInterVpcNetworkManager) OrderByExtraFields

func (*SInterVpcNetworkManager) QueryDistinctExtraField

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

func (*SInterVpcNetworkManager) ValidateCreateData

type SInterVpcNetworkResourceBase

type SInterVpcNetworkResourceBase struct {
	InterVpcNetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"inter_vpc_network_id"`
}

type SInterVpcNetworkResourceBaseManager

type SInterVpcNetworkResourceBaseManager struct{}

func (*SInterVpcNetworkResourceBaseManager) ListItemFilter

type SInterVpcNetworkRouteSet

type SInterVpcNetworkRouteSet struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SVpcResourceBase
	InterVpcNetworkId string

	Cidr                string `width:"36" charset:"ascii" nullable:"true" list:"domain"`
	ExtInstanceId       string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
	ExtInstanceType     string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
	ExtInstanceRegionId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
}

func (*SInterVpcNetworkRouteSet) GetInterVpcNetwork

func (self *SInterVpcNetworkRouteSet) GetInterVpcNetwork() (*SInterVpcNetwork, error)

func (*SInterVpcNetworkRouteSet) PerformDisable

func (*SInterVpcNetworkRouteSet) PerformEnable

func (*SInterVpcNetworkRouteSet) RealDelete

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

type SInterVpcNetworkRouteSetManager

var InterVpcNetworkRouteSetManager *SInterVpcNetworkRouteSetManager

func (*SInterVpcNetworkRouteSetManager) FetchCustomizeColumns

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

func (*SInterVpcNetworkRouteSetManager) ListItemExportKeys

func (*SInterVpcNetworkRouteSetManager) ListItemFilter

func (*SInterVpcNetworkRouteSetManager) OrderByExtraFields

func (*SInterVpcNetworkRouteSetManager) QueryDistinctExtraField

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

type SInterVpcNetworkVpc

type SInterVpcNetworkVpc struct {
	db.SJointResourceBase
	SInterVpcNetworkResourceBase

	VpcId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SInterVpcNetworkVpc) Detach

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

type SInterVpcNetworkVpcManager

type SInterVpcNetworkVpcManager struct {
	db.SJointResourceBaseManager
	SInterVpcNetworkResourceBaseManager
}
var InterVpcNetworkVpcManager *SInterVpcNetworkVpcManager

func (*SInterVpcNetworkVpcManager) GetMasterFieldName

func (manager *SInterVpcNetworkVpcManager) GetMasterFieldName() string

func (*SInterVpcNetworkVpcManager) GetSlaveFieldName

func (manager *SInterVpcNetworkVpcManager) GetSlaveFieldName() string

type SIsolatedDevice

type SIsolatedDevice struct {
	db.SStandaloneResourceBase
	SHostResourceBase `width:"36" charset:"ascii" nullable:"false" default:"" index:"true" list:"domain" create:"domain_required"`

	// # PCI / GPU-HPC / GPU-VGA / USB / NIC
	// 设备类型
	DevType string `width:"16" charset:"ascii" nullable:"false" default:"" index:"true" list:"domain" create:"domain_required" update:"domain"`

	// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
	Model string `width:"512" charset:"ascii" nullable:"false" default:"" index:"true" list:"domain" create:"domain_required" update:"domain"`

	// 云主机Id
	GuestId string `width:"36" charset:"ascii" nullable:"true" index:"true" list:"domain"`

	// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
	Addr string `width:"16" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`

	VendorDeviceId string `width:"16" charset:"ascii" nullable:"true" list:"domain" create:"domain_optional"`

	// reserved memory size for isolated device
	ReservedMemory int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`

	// reserved cpu count for isolated device
	ReservedCpu int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`

	// reserved storage size for isolated device
	ReservedStorage int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`
}

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) GetOwnerId

func (model *SIsolatedDevice) GetOwnerId() mcclient.IIdentityProvider

func (*SIsolatedDevice) GetShortDesc

func (self *SIsolatedDevice) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SIsolatedDevice) GetSpec

func (self *SIsolatedDevice) GetSpec(statusCheck bool) *jsonutils.JSONDict

func (*SIsolatedDevice) GetUniqValues

func (self *SIsolatedDevice) GetUniqValues() jsonutils.JSONObject

func (*SIsolatedDevice) IsGPU

func (self *SIsolatedDevice) IsGPU() bool

func (*SIsolatedDevice) PerformPurge

func (*SIsolatedDevice) PostUpdate

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

func (*SIsolatedDevice) RealDelete

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

func (*SIsolatedDevice) ValidateDeleteCondition

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

func (*SIsolatedDevice) ValidateUpdateData

type SIsolatedDeviceManager

type SIsolatedDeviceManager struct {
	db.SStandaloneResourceBaseManager
	SHostResourceBaseManager
}
var IsolatedDeviceManager *SIsolatedDeviceManager

func (*SIsolatedDeviceManager) DeleteDevicesByHost

func (manager *SIsolatedDeviceManager) DeleteDevicesByHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost)

func (*SIsolatedDeviceManager) ExtraSearchConditions

func (manager *SIsolatedDeviceManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition

func (*SIsolatedDeviceManager) FetchCustomizeColumns

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

func (*SIsolatedDeviceManager) FetchOwnerId

func (*SIsolatedDeviceManager) FetchUniqValues

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

func (*SIsolatedDeviceManager) FilterByOwner

func (*SIsolatedDeviceManager) FilterByUniqValues

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

func (*SIsolatedDeviceManager) FindByHost

func (manager *SIsolatedDeviceManager) FindByHost(id string) []SIsolatedDevice

func (*SIsolatedDeviceManager) FindByHosts

func (manager *SIsolatedDeviceManager) FindByHosts(ids []string) []SIsolatedDevice

func (*SIsolatedDeviceManager) FindUnusedByModels

func (manager *SIsolatedDeviceManager) FindUnusedByModels(models []string) ([]SIsolatedDevice, error)

func (*SIsolatedDeviceManager) FindUnusedGpusOnHost

func (manager *SIsolatedDeviceManager) FindUnusedGpusOnHost(hostId string) ([]SIsolatedDevice, error)

func (*SIsolatedDeviceManager) GetDevsOnHost

func (manager *SIsolatedDeviceManager) GetDevsOnHost(hostId string, model string, count int) ([]SIsolatedDevice, error)

func (*SIsolatedDeviceManager) GetExportExtraKeys

func (manager *SIsolatedDeviceManager) GetExportExtraKeys(ctx context.Context, keys stringutils2.SSortedStrings, rowMap map[string]string) *jsonutils.JSONDict

func (*SIsolatedDeviceManager) GetSpecIdent

func (man *SIsolatedDeviceManager) GetSpecIdent(spec *jsonutils.JSONDict) []string

func (*SIsolatedDeviceManager) GetSpecShouldCheckStatus

func (man *SIsolatedDeviceManager) GetSpecShouldCheckStatus(query *jsonutils.JSONDict) (bool, error)

func (*SIsolatedDeviceManager) ListItemExportKeys

func (*SIsolatedDeviceManager) ListItemFilter

直通设备(GPU等)列表

func (*SIsolatedDeviceManager) NamespaceScope

func (manager *SIsolatedDeviceManager) NamespaceScope() rbacutils.TRbacScope

func (*SIsolatedDeviceManager) OrderByExtraFields

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

func (*SIsolatedDeviceManager) QueryDistinctExtraField

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

func (*SIsolatedDeviceManager) ReleaseDevicesOfGuest

func (manager *SIsolatedDeviceManager) ReleaseDevicesOfGuest(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential) error

func (*SIsolatedDeviceManager) ResourceScope

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

func (*SIsolatedDeviceManager) TotalCount

func (manager *SIsolatedDeviceManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	hostType []string,
	resourceTypes []string,
	providers []string,
	brands []string,
	cloudEnv string,
	rangeObjs []db.IStandaloneModel,
	policyResult rbacutils.SPolicyResult,
) (IsolatedDeviceCountStat, error)

func (*SIsolatedDeviceManager) UnusedGpuQuery

func (manager *SIsolatedDeviceManager) UnusedGpuQuery() *sqlchemy.SQuery

func (*SIsolatedDeviceManager) ValidateCreateData

type SKafka

type SKafka struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase

	SCloudregionResourceBase
	SDeletePreventableResourceBase

	// 版本
	Version string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`

	// 套餐名称
	// example: elasticsearch.sn2ne.xlarge
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`

	// 存储类型
	// example: local_ssd
	StorageType string `nullable:"true" list:"user" create:"required"`
	// 存储大小
	// example: 1024
	DiskSizeGb int `nullable:"false" list:"user" create:"required"`

	// 带宽峰值
	// example: 1024
	BandwidthMb int `nullable:"false" list:"user" create:"required"`

	// 消息保留时长
	MsgRetentionMinute int `nullable:"false" list:"user" create:"required"`

	// 连接端点
	Endpoint string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"optional"`

	VpcId     string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"vpc_id"`
	NetworkId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"network_id"`

	// 可用区Id
	ZoneId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"zone_id"`
	// 是否是多可用区部署
	IsMultiAz bool `nullable:"false" default:"false" list:"user" update:"user" create:"optional"`
}

func (*SKafka) CustomizeDelete

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

func (*SKafka) Delete

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

func (*SKafka) GetDetailsTopics

func (self *SKafka) GetDetailsTopics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) ([]cloudprovider.SKafkaTopic, error)

获取Kafka Topic列表

func (*SKafka) GetIKafka

func (self *SKafka) GetIKafka(ctx context.Context) (cloudprovider.ICloudKafka, error)

func (*SKafka) GetIRegion

func (self *SKafka) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SKafka) PerformSyncstatus

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

同步Kafka实例状态

func (*SKafka) RealDelete

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

func (*SKafka) StartDeleteTask

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

func (*SKafka) SyncWithCloudKafka

func (self *SKafka) SyncWithCloudKafka(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKafka) error

同步资源属性

func (*SKafka) ValidateDeleteCondition

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

判断资源是否可以删除

type SKafkaCountStat

type SKafkaCountStat struct {
	TotalKafkaCount int
	TotalDiskSizeGb int
}

type SKafkaManager

var KafkaManager *SKafkaManager

func (*SKafkaManager) FetchCustomizeColumns

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

func (*SKafkaManager) GetContextManagers

func (manager *SKafkaManager) GetContextManagers() [][]db.IModelManager

func (*SKafkaManager) ListItemExportKeys

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

func (*SKafkaManager) ListItemFilter

func (man *SKafkaManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.KafkaListInput,
) (*sqlchemy.SQuery, error)

Kafka实例列表

func (*SKafkaManager) OrderByExtraFields

func (man *SKafkaManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.KafkaListInput,
) (*sqlchemy.SQuery, error)

func (*SKafkaManager) QueryDistinctExtraField

func (man *SKafkaManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SKafkaManager) TotalCount

func (man *SKafkaManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (SKafkaCountStat, error)

func (*SKafkaManager) ValidateCreateData

type SKeypair

type SKeypair struct {
	db.SUserResourceBase

	// 加密类型
	// example: RSA
	Scheme string `width:"12" charset:"ascii" nullable:"true" list:"user" create:"required"`
	// 指纹信息
	// example: 1d:3a:83:4a:a1:f3:75:97:ec:d1:ef:f8:3f:a7:5d:9e
	Fingerprint string `width:"48" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 私钥
	PrivateKey string `width:"2048" charset:"ascii" nullable:"true" create:"optional"`
	// 公钥
	PublicKey string `width:"1024" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SKeypair) GetDetailsPrivatekey

func (keypair *SKeypair) GetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SKeypair) GetLinkedGuestsCount

func (self *SKeypair) GetLinkedGuestsCount() (int, error)

func (*SKeypair) ValidateDeleteCondition

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

type SKeypairManager

type SKeypairManager struct {
	db.SUserResourceBaseManager
}
var KeypairManager *SKeypairManager

func (*SKeypairManager) FetchCustomizeColumns

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

func (*SKeypairManager) FilterByOwner

func (manager *SKeypairManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SKeypairManager) ListItemFilter

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

列出ssh密钥对

func (*SKeypairManager) OrderByExtraFields

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

func (*SKeypairManager) QueryDistinctExtraField

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

func (*SKeypairManager) ValidateCreateData

type SKubeCluster

type SKubeCluster struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"domain_required" default:"default"`
	// 本地KubeserverId
	ExternalClusterId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
}

func (*SKubeCluster) CustomizeDelete

func (self *SKubeCluster) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.KubeClusterDeleteInput) error

func (*SKubeCluster) Delete

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

func (*SKubeCluster) GetChangeOwnerCandidateDomainIds

func (self *SKubeCluster) GetChangeOwnerCandidateDomainIds() []string

func (*SKubeCluster) GetDetailsKubeconfig

func (self *SKubeCluster) GetDetailsKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, input api.GetKubeConfigInput) (*cloudprovider.SKubeconfig, error)

func (*SKubeCluster) GetIKubeCluster

func (self *SKubeCluster) GetIKubeCluster(ctx context.Context) (cloudprovider.ICloudKubeCluster, error)

func (*SKubeCluster) GetIRegion

func (self *SKubeCluster) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SKubeCluster) GetNodePoolIdByExternalId

func (self *SKubeCluster) GetNodePoolIdByExternalId(id string) (*SKubeNodePool, error)

func (*SKubeCluster) GetNodePools

func (self *SKubeCluster) GetNodePools() ([]SKubeNodePool, error)

func (*SKubeCluster) GetNodes

func (self *SKubeCluster) GetNodes() ([]SKubeNode, error)

func (*SKubeCluster) GetQuotaKeys

func (cluster *SKubeCluster) GetQuotaKeys() quotas.SDomainRegionalCloudResourceKeys

func (*SKubeCluster) GetRegion

func (self *SKubeCluster) GetRegion() (*SCloudregion, error)

func (*SKubeCluster) GetUsages

func (self *SKubeCluster) GetUsages() []db.IUsage

func (*SKubeCluster) ImportOrUpdate

func (self *SKubeCluster) ImportOrUpdate(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKubeCluster) error

func (*SKubeCluster) PerformSyncstatus

func (self *SKubeCluster) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.SyncstatusInput) (jsonutils.JSONObject, error)

同步Kube Cluster状态

func (*SKubeCluster) RealDelete

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

func (*SKubeCluster) StartDeleteKubeClusterTask

func (self *SKubeCluster) StartDeleteKubeClusterTask(ctx context.Context, userCred mcclient.TokenCredential, isRetail bool) error

func (*SKubeCluster) SyncAllWithCloudKubeCluster

func (self *SKubeCluster) SyncAllWithCloudKubeCluster(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKubeCluster, provider *SCloudprovider) error

func (*SKubeCluster) SyncKubeNodePools

func (*SKubeCluster) SyncKubeNodes

func (*SKubeCluster) SyncWithCloudKubeCluster

func (self *SKubeCluster) SyncWithCloudKubeCluster(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKubeCluster, provider *SCloudprovider) error

func (*SKubeCluster) ValidateDeleteCondition

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

func (*SKubeCluster) ValidateUpdateData

type SKubeClusterManager

var KubeClusterManager *SKubeClusterManager

func (*SKubeClusterManager) FetchCustomizeColumns

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

func (*SKubeClusterManager) GetContextManagers

func (manager *SKubeClusterManager) GetContextManagers() [][]db.IModelManager

func (*SKubeClusterManager) ListItemExportKeys

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

func (*SKubeClusterManager) ListItemFilter

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

列出Kube Cluster

func (*SKubeClusterManager) OrderByExtraFields

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

func (*SKubeClusterManager) QueryDistinctExtraField

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

func (*SKubeClusterManager) ValidateCreateData

type SKubeNode

type SKubeNode struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	CloudKubeNodePoolId string `width:"36" charset:"ascii" name:"cloud_kube_node_pool_id" nullable:"false" list:"user" create:"required" index:"true"`
	CloudKubeClusterId  string `width:"36" charset:"ascii" name:"cloud_kube_cluster_id" nullable:"false" list:"user" create:"required" index:"true"`
}

func (*SKubeNode) CustomizeDelete

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

func (*SKubeNode) Delete

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

func (*SKubeNode) GetCloudproviderId

func (self *SKubeNode) GetCloudproviderId() string

func (*SKubeNode) GetKubeCluster

func (self *SKubeNode) GetKubeCluster() (*SKubeCluster, error)

func (*SKubeNode) GetOwnerId

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

func (*SKubeNode) GetUniqValues

func (self *SKubeNode) GetUniqValues() jsonutils.JSONObject

func (*SKubeNode) RealDelete

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

func (*SKubeNode) StartKubeNodeDeleteTask

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

func (*SKubeNode) SyncWithCloudKubeNode

func (self *SKubeNode) SyncWithCloudKubeNode(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKubeNode) error

func (*SKubeNode) ValidateUpdateData

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

type SKubeNodeManager

var KubeNodeManager *SKubeNodeManager

func (*SKubeNodeManager) FetchCustomizeColumns

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

func (*SKubeNodeManager) FetchOwnerId

func (*SKubeNodeManager) FetchUniqValues

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

func (*SKubeNodeManager) FilterByOwner

func (manager *SKubeNodeManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SKubeNodeManager) FilterByUniqValues

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

func (*SKubeNodeManager) GetContextManagers

func (manager *SKubeNodeManager) GetContextManagers() [][]db.IModelManager

func (*SKubeNodeManager) ListItemExportKeys

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

func (*SKubeNodeManager) ListItemFilter

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

Kube Node列表

func (*SKubeNodeManager) OrderByExtraFields

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

func (*SKubeNodeManager) QueryDistinctExtraField

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

func (*SKubeNodeManager) ResourceScope

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

func (*SKubeNodeManager) ValidateCreateData

type SKubeNodePool

type SKubeNodePool struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	CloudKubeClusterId string `width:"36" charset:"ascii" name:"cloud_kube_cluster_id" nullable:"false" list:"user" create:"required" index:"true"`
}

func (*SKubeNodePool) CustomizeDelete

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

func (*SKubeNodePool) Delete

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

func (*SKubeNodePool) GetCloudproviderId

func (self *SKubeNodePool) GetCloudproviderId() string

func (*SKubeNodePool) GetKubeCluster

func (self *SKubeNodePool) GetKubeCluster() (*SKubeCluster, error)

func (*SKubeNodePool) GetOwnerId

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

func (*SKubeNodePool) GetUniqValues

func (self *SKubeNodePool) GetUniqValues() jsonutils.JSONObject

func (*SKubeNodePool) RealDelete

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

func (*SKubeNodePool) StartKubeNodePoolDeleteTask

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

func (*SKubeNodePool) SyncWithCloudKubeNodePool

func (self *SKubeNodePool) SyncWithCloudKubeNodePool(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudKubeNodePool) error

func (*SKubeNodePool) ValidateUpdateData

type SKubeNodePoolManager

var KubeNodePoolManager *SKubeNodePoolManager

func (*SKubeNodePoolManager) FetchCustomizeColumns

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

func (*SKubeNodePoolManager) FetchOwnerId

func (*SKubeNodePoolManager) FetchUniqValues

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

func (*SKubeNodePoolManager) FilterByOwner

func (manager *SKubeNodePoolManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SKubeNodePoolManager) FilterByUniqValues

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

func (*SKubeNodePoolManager) GetContextManagers

func (manager *SKubeNodePoolManager) GetContextManagers() [][]db.IModelManager

func (*SKubeNodePoolManager) ListItemExportKeys

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

func (*SKubeNodePoolManager) ListItemFilter

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

Kube Node Pool列表

func (*SKubeNodePoolManager) OrderByExtraFields

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

func (*SKubeNodePoolManager) QueryDistinctExtraField

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

func (*SKubeNodePoolManager) ResourceScope

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

func (*SKubeNodePoolManager) ValidateCreateData

type SLoadbalancer

type SLoadbalancer struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase

	// LB might optionally be in a VPC, vpc_id, manager_id, cloudregion_id
	SVpcResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	// zone_id
	SZoneResourceBase
	// optional network_id
	SNetworkResourceBase `width:"147" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	SLoadbalancerRateLimiter

	// 备可用区
	Zone1 string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user" json:"zone_1"`

	// IP地址
	Address string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"address"`
	// 地址类型
	AddressType string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"address_type"`
	// 网络类型
	NetworkType string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"network_type"`

	SLoadbalancerClusterResourceBase

	// 计费类型
	ChargeType string `list:"user" get:"user" create:"optional" update:"user" json:"charge_type"`

	// 套餐名称
	LoadbalancerSpec string `list:"user" get:"user" list:"user" create:"optional" json:"loadbalancer_spec"`

	// 默认后端服务器组Id
	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" json:"backend_group_id"`

	// LB的其他配置信息
	LBInfo jsonutils.JSONObject `charset:"utf8" length:"medium" nullable:"true" list:"user" update:"admin" create:"admin_optional" json:"lb_info"`
}

TODO build errors on pkg/httperrors/errors.go NewGetManagerError NewMissingArgumentError NewInvalidArgumentError

TODO ZoneId or RegionId bandwidth scheduler

TODO update backendgroupid

func (*SLoadbalancer) CustomizeDelete

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

func (*SLoadbalancer) Delete

func (lb *SLoadbalancer) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancer) DeleteEip

func (self *SLoadbalancer) DeleteEip(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancer) GetChangeOwnerCandidateDomainIds

func (self *SLoadbalancer) GetChangeOwnerCandidateDomainIds() []string

func (*SLoadbalancer) GetCloudprovider

func (lb *SLoadbalancer) GetCloudprovider() *SCloudprovider

func (*SLoadbalancer) GetCloudproviderId

func (lb *SLoadbalancer) GetCloudproviderId() string

func (*SLoadbalancer) GetCreateLoadbalancerParams

func (lb *SLoadbalancer) GetCreateLoadbalancerParams(ctx context.Context, iRegion cloudprovider.ICloudRegion) (*cloudprovider.SLoadbalancer, error)

func (*SLoadbalancer) GetEip

func (self *SLoadbalancer) GetEip() (*SElasticip, error)

func (*SLoadbalancer) GetILoadbalancer

func (lb *SLoadbalancer) GetILoadbalancer(ctx context.Context) (cloudprovider.ICloudLoadbalancer, error)

func (*SLoadbalancer) GetIRegion

func (*SLoadbalancer) GetLoadbalancerBackendgroups

func (lb *SLoadbalancer) GetLoadbalancerBackendgroups() ([]SLoadbalancerBackendGroup, error)

func (*SLoadbalancer) GetLoadbalancerListeners

func (lb *SLoadbalancer) GetLoadbalancerListeners() ([]SLoadbalancerListener, error)

func (*SLoadbalancer) GetNetworks

func (lb *SLoadbalancer) GetNetworks() ([]SNetwork, error)

func (*SLoadbalancer) GetQuotaKeys

func (lb *SLoadbalancer) GetQuotaKeys() quotas.IQuotaKeys

func (*SLoadbalancer) GetRegion

func (lb *SLoadbalancer) GetRegion() (*SCloudregion, error)

func (*SLoadbalancer) GetUsages

func (lb *SLoadbalancer) GetUsages() []db.IUsage

func (*SLoadbalancer) GetVpc

func (lb *SLoadbalancer) GetVpc() (*SVpc, error)

func (*SLoadbalancer) GetZone

func (lb *SLoadbalancer) GetZone() (*SZone, error)

func (*SLoadbalancer) LBPendingDelete

func (lb *SLoadbalancer) LBPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancer) OnMetadataUpdated

func (self *SLoadbalancer) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancer) PerformPurge

func (*SLoadbalancer) PerformRemoteUpdate

func (*SLoadbalancer) PerformStatus

func (*SLoadbalancer) PerformSyncstatus

func (*SLoadbalancer) PostCreate

func (*SLoadbalancer) StartLoadBalancerCreateTask

func (lb *SLoadbalancer) StartLoadBalancerCreateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancer) StartLoadBalancerDeleteTask

func (lb *SLoadbalancer) StartLoadBalancerDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancer) StartLoadBalancerStartTask

func (lb *SLoadbalancer) StartLoadBalancerStartTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancer) StartLoadBalancerStopTask

func (lb *SLoadbalancer) StartLoadBalancerStopTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancer) StartRemoteUpdateTask

func (self *SLoadbalancer) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SLoadbalancer) SyncLoadbalancerEip

func (self *SLoadbalancer) SyncLoadbalancerEip(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extEip cloudprovider.ICloudEIP) compare.SyncResult

func (*SLoadbalancer) SyncWithCloudLoadbalancer

func (lb *SLoadbalancer) SyncWithCloudLoadbalancer(ctx context.Context, userCred mcclient.TokenCredential, extLb cloudprovider.ICloudLoadbalancer, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider, region *SCloudregion) error

func (*SLoadbalancer) ValidateDeleteCondition

func (lb *SLoadbalancer) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancer) ValidateUpdateData

func (lb *SLoadbalancer) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAcl

type SLoadbalancerAcl struct {
	db.SSharableVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	AclEntries  *SLoadbalancerAclEntries `list:"user" update:"user" create:"required"`
	Fingerprint string                   `name:"fingerprint" width:"64" charset:"ascii" nullable:"false" index:"true" list:"user" update:"user" create:"required"`
}

func (*SLoadbalancerAcl) CustomizeCreate

func (*SLoadbalancerAcl) Delete

func (lbacl *SLoadbalancerAcl) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerAcl) GetCachedAcls

func (lbacl *SLoadbalancerAcl) GetCachedAcls() ([]SCachedLoadbalancerAcl, error)

func (*SLoadbalancerAcl) PerformPatch

PerformPatch patches acl entries by adding then deleting the specified acls. This is intended mainly for command line operations.

func (*SLoadbalancerAcl) PerformPurge

func (*SLoadbalancerAcl) PostCreate

func (*SLoadbalancerAcl) PostUpdate

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

func (*SLoadbalancerAcl) StartLoadBalancerAclDeleteTask

func (lbacl *SLoadbalancerAcl) StartLoadBalancerAclDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerAcl) StartLoadBalancerAclSyncTask

func (lbacl *SLoadbalancerAcl) StartLoadBalancerAclSyncTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerAcl) ValidateDeleteCondition

func (lbacl *SLoadbalancerAcl) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancerAcl) ValidateUpdateData

func (lbacl *SLoadbalancerAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAclEntries

type SLoadbalancerAclEntries []*SLoadbalancerAclEntry

func (*SLoadbalancerAclEntries) Fingerprint

func (aclEntries *SLoadbalancerAclEntries) Fingerprint() string

func (*SLoadbalancerAclEntries) IsZero

func (aclEntries *SLoadbalancerAclEntries) IsZero() bool

func (*SLoadbalancerAclEntries) String

func (aclEntries *SLoadbalancerAclEntries) String() string

func (*SLoadbalancerAclEntries) Validate

func (aclEntries *SLoadbalancerAclEntries) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAclEntry

type SLoadbalancerAclEntry struct {
	Cidr    string
	Comment string
}

func (*SLoadbalancerAclEntry) Validate

func (aclEntry *SLoadbalancerAclEntry) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAclManager

var LoadbalancerAclManager *SLoadbalancerAclManager

func (*SLoadbalancerAclManager) CountByFingerPrint

func (man *SLoadbalancerAclManager) CountByFingerPrint(projectId string, fingerprint string) int

func (*SLoadbalancerAclManager) FetchByFingerPrint

func (man *SLoadbalancerAclManager) FetchByFingerPrint(projectId string, fingerprint string) (*SLoadbalancerAcl, error)

func (*SLoadbalancerAclManager) FetchCustomizeColumns

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

func (*SLoadbalancerAclManager) GetResourceCount

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

func (*SLoadbalancerAclManager) InitializeData

func (manager *SLoadbalancerAclManager) InitializeData() error

func (*SLoadbalancerAclManager) ListItemExportKeys

func (*SLoadbalancerAclManager) ListItemFilter

负载均衡ACL规则列表

func (*SLoadbalancerAclManager) OrderByExtraFields

func (manager *SLoadbalancerAclManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.LoadbalancerAclListInput,
) (*sqlchemy.SQuery, error)

func (*SLoadbalancerAclManager) QueryDistinctExtraField

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

func (*SLoadbalancerAclManager) SyncLoadbalancerAcls

func (man *SLoadbalancerAclManager) SyncLoadbalancerAcls(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, acls []cloudprovider.ICloudLoadbalancerAcl, syncRange *SSyncRange) compare.SyncResult

func (*SLoadbalancerAclManager) ValidateCreateData

type SLoadbalancerAclResourceBase

type SLoadbalancerAclResourceBase struct {
	// 本地Acl ID
	AclId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
}

func (*SLoadbalancerAclResourceBase) GetAcl

type SLoadbalancerAclResourceBaseManager

type SLoadbalancerAclResourceBaseManager struct{}

func (*SLoadbalancerAclResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerAclResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerAclResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerAclResourceBaseManager) GetOrderByFields

func (*SLoadbalancerAclResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerAclResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerAclResourceBaseManager) ListItemFilter

func (*SLoadbalancerAclResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerAclResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerAgent

type SLoadbalancerAgent struct {
	db.SStandaloneResourceBase
	SLoadbalancerClusterResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`

	Version    string                    `width:"64" nullable:"true" list:"admin" update:"admin"`
	IP         string                    `width:"32" nullable:"true" list:"admin" update:"admin"`
	HaState    string                    `width:"32" nullable:"true" list:"admin" update:"admin" default:"UNKNOWN"` // LB_HA_STATE_UNKNOWN
	HbLastSeen time.Time                 `nullable:"true" list:"admin" update:"admin"`
	HbTimeout  int                       `nullable:"true" list:"admin" update:"admin" create:"optional" default:"3600"`
	Params     *SLoadbalancerAgentParams `create:"optional" list:"admin" get:"admin"`

	Loadbalancers             time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerListeners     time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerListenerRules time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerBackendGroups time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerBackends      time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerAcls          time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerCertificates  time.Time `nullable:"true" list:"admin" update:"admin"`

	Deployment *SLoadbalancerAgentDeployment `create:"optional" list:"admin" get:"admin"`
}

TODO

  • scrub stale backends: Guests with deleted=1
  • agent configuration params

func (*SLoadbalancerAgent) IsActive

func (lbagent *SLoadbalancerAgent) IsActive() bool

func (*SLoadbalancerAgent) PerformDeploy

func (lbagent *SLoadbalancerAgent) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SLoadbalancerAgent) PerformHb

func (*SLoadbalancerAgent) PerformParamsPatch

func (lbagent *SLoadbalancerAgent) PerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SLoadbalancerAgent) PerformUndeploy

func (lbagent *SLoadbalancerAgent) PerformUndeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SLoadbalancerAgent) ValidateUpdateData

func (lbagent *SLoadbalancerAgent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAgentDeployment

type SLoadbalancerAgentDeployment struct {
	Host                        string
	AnsiblePlaybook             string
	AnsiblePlaybookUndeployment string
}

func (*SLoadbalancerAgentDeployment) IsZero

func (p *SLoadbalancerAgentDeployment) IsZero() bool

func (*SLoadbalancerAgentDeployment) String

type SLoadbalancerAgentManager

var LoadbalancerAgentManager *SLoadbalancerAgentManager

func (*SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers

func (man *SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SLoadbalancerAgentManager) FetchCustomizeColumns

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

func (*SLoadbalancerAgentManager) GetPropertyDefaultParams

func (man *SLoadbalancerAgentManager) GetPropertyDefaultParams(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SLoadbalancerAgentManager) ListItemExportKeys

func (*SLoadbalancerAgentManager) ListItemFilter

负载均衡Agent列表

func (*SLoadbalancerAgentManager) OrderByExtraFields

func (*SLoadbalancerAgentManager) QueryDistinctExtraField

func (man *SLoadbalancerAgentManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerAgentManager) ValidateCreateData

type SLoadbalancerAgentParams

type SLoadbalancerAgentParams struct {
	KeepalivedConfTmpl string
	HaproxyConfTmpl    string
	TelegrafConfTmpl   string
	Vrrp               SLoadbalancerAgentParamsVrrp
	Haproxy            SLoadbalancerAgentParamsHaproxy
	Telegraf           SLoadbalancerAgentParamsTelegraf
}

func (*SLoadbalancerAgentParams) IsZero

func (p *SLoadbalancerAgentParams) IsZero() bool

func (*SLoadbalancerAgentParams) String

func (p *SLoadbalancerAgentParams) String() string

func (*SLoadbalancerAgentParams) Validate

func (p *SLoadbalancerAgentParams) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAgentParamsHaproxy

type SLoadbalancerAgentParamsHaproxy struct {
	GlobalLog      string
	GlobalNbthread int `json:",omitzero"`
	LogHttp        bool
	LogTcp         bool
	LogNormal      bool
	TuneHttpMaxhdr int `json:",omitzero"`
}

func (*SLoadbalancerAgentParamsHaproxy) Validate

type SLoadbalancerAgentParamsTelegraf

type SLoadbalancerAgentParamsTelegraf struct {
	InfluxDbOutputUrl       string
	InfluxDbOutputName      string
	InfluxDbOutputUnsafeSsl bool
	HaproxyInputInterval    int `json:",omitzero"`
}

func (*SLoadbalancerAgentParamsTelegraf) Validate

type SLoadbalancerAgentParamsVrrp

type SLoadbalancerAgentParamsVrrp struct {
	Priority          int `json:",omitzero"`
	VirtualRouterId   int `json:",omitzero"`
	GarpMasterRefresh int `json:",omitzero"`
	Preempt           bool
	Interface         string
	AdvertInt         int `json:",omitzero"`
	Pass              string
}

func (*SLoadbalancerAgentParamsVrrp) Validate

type SLoadbalancerBackend

type SLoadbalancerBackend struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	//SManagedResourceBase
	//SCloudregionResourceBase
	SLoadbalancerBackendgroupResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendId   string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendType string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendRole string `width:"36" charset:"ascii" nullable:"false" list:"user" default:"default" create:"optional"`
	Weight      int    `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	Address     string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	Port        int    `nullable:"false" list:"user" create:"required" update:"user"`

	SendProxy string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user" default:"off"`
	Ssl       string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user" default:"off"`
}

func (*SLoadbalancerBackend) CustomizeDelete

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

func (*SLoadbalancerBackend) Delete

func (*SLoadbalancerBackend) GetAwsCachedlbb

func (lbb *SLoadbalancerBackend) GetAwsCachedlbb() ([]SAwsCachedLb, error)

func (*SLoadbalancerBackend) GetCloudproviderId

func (lbb *SLoadbalancerBackend) GetCloudproviderId() string

func (*SLoadbalancerBackend) GetGuest

func (lbb *SLoadbalancerBackend) GetGuest() *SGuest

func (*SLoadbalancerBackend) GetHuaweiCachedlbb

func (lbb *SLoadbalancerBackend) GetHuaweiCachedlbb() ([]SHuaweiCachedLb, error)

func (*SLoadbalancerBackend) GetIRegion

func (*SLoadbalancerBackend) GetLoadbalancerBackendGroup

func (lbb *SLoadbalancerBackend) GetLoadbalancerBackendGroup() (*SLoadbalancerBackendGroup, error)

func (*SLoadbalancerBackend) GetRegion

func (lbb *SLoadbalancerBackend) GetRegion() (*SCloudregion, error)

func (*SLoadbalancerBackend) PerformPurge

func (*SLoadbalancerBackend) PostCreate

func (*SLoadbalancerBackend) PostUpdate

func (*SLoadbalancerBackend) StartLoadBalancerBackendCreateTask

func (lbb *SLoadbalancerBackend) StartLoadBalancerBackendCreateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerBackend) StartLoadBalancerBackendDeleteTask

func (lbb *SLoadbalancerBackend) StartLoadBalancerBackendDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackend) StartLoadBalancerBackendSyncTask

func (lbb *SLoadbalancerBackend) StartLoadBalancerBackendSyncTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerBackend) SyncWithCloudLoadbalancerBackend

func (lbb *SLoadbalancerBackend) SyncWithCloudLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

func (*SLoadbalancerBackend) ValidateDeleteCondition

func (lbb *SLoadbalancerBackend) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancerBackend) ValidateUpdateData

func (lbb *SLoadbalancerBackend) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerBackendGroup

type SLoadbalancerBackendGroup struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SLoadbalancerResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	Type string `width:"36" charset:"ascii" nullable:"false" list:"user" default:"normal" create:"optional"`
}

func (*SLoadbalancerBackendGroup) AllBackendsUnique

func (lbbg *SLoadbalancerBackendGroup) AllBackendsUnique() error

腾讯云要求四层监听IP+port唯一

func (*SLoadbalancerBackendGroup) CustomizeDelete

func (*SLoadbalancerBackendGroup) Delete

func (*SLoadbalancerBackendGroup) GetAwsBackendGroupParams

func (*SLoadbalancerBackendGroup) GetAwsCachedlbbg

func (lbbg *SLoadbalancerBackendGroup) GetAwsCachedlbbg() ([]SAwsCachedLbbg, error)

func (*SLoadbalancerBackendGroup) GetBackendGroupParams

func (lbbg *SLoadbalancerBackendGroup) GetBackendGroupParams() (*cloudprovider.SLoadbalancerBackendGroup, error)

func (*SLoadbalancerBackendGroup) GetBackends

func (lbbg *SLoadbalancerBackendGroup) GetBackends() ([]SLoadbalancerBackend, error)

func (*SLoadbalancerBackendGroup) GetBackendsParams

func (lbbg *SLoadbalancerBackendGroup) GetBackendsParams() ([]cloudprovider.SLoadbalancerBackend, error)

func (*SLoadbalancerBackendGroup) GetHuaweiBackendGroupParams

func (*SLoadbalancerBackendGroup) GetHuaweiCachedlbbg

func (lbbg *SLoadbalancerBackendGroup) GetHuaweiCachedlbbg() ([]SHuaweiCachedLbbg, error)

func (*SLoadbalancerBackendGroup) GetICloudLoadbalancerBackendGroup

func (lbbg *SLoadbalancerBackendGroup) GetICloudLoadbalancerBackendGroup(ctx context.Context) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SLoadbalancerBackendGroup) GetIRegion

func (*SLoadbalancerBackendGroup) GetListener

func (lbbg *SLoadbalancerBackendGroup) GetListener() *SLoadbalancerListener

func (*SLoadbalancerBackendGroup) GetLoadbalancer

func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancer() (*SLoadbalancer, error)

func (*SLoadbalancerBackendGroup) GetLoadbalancerListenerRules

func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancerListenerRules() ([]SLoadbalancerListenerRule, error)

func (*SLoadbalancerBackendGroup) GetLoadbalancerListeners

func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancerListeners() ([]SLoadbalancerListener, error)

func (*SLoadbalancerBackendGroup) GetOpenstackBackendGroupParams

func (*SLoadbalancerBackendGroup) GetQcloudBackendGroupParams

func (*SLoadbalancerBackendGroup) GetQcloudCachedlbbg

func (lbbg *SLoadbalancerBackendGroup) GetQcloudCachedlbbg() ([]SQcloudCachedLbbg, error)

func (*SLoadbalancerBackendGroup) GetRegion

func (llbg *SLoadbalancerBackendGroup) GetRegion() (*SCloudregion, error)

func (*SLoadbalancerBackendGroup) LBPendingDelete

func (lbbg *SLoadbalancerBackendGroup) LBPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerBackendGroup) PerformPurge

func (*SLoadbalancerBackendGroup) PostCreate

func (*SLoadbalancerBackendGroup) RefCount

func (lbbg *SLoadbalancerBackendGroup) RefCount() (int, error)

返回值 TotalRef

func (*SLoadbalancerBackendGroup) StartAwsLoadBalancerBackendGroupCreateTask

func (lbbg *SLoadbalancerBackendGroup) StartAwsLoadBalancerBackendGroupCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackendGroup) StartHuaweiLoadBalancerBackendGroupCreateTask

func (lbbg *SLoadbalancerBackendGroup) StartHuaweiLoadBalancerBackendGroupCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackendGroup) StartLoadBalancerBackendGroupCreateTask

func (lbbg *SLoadbalancerBackendGroup) StartLoadBalancerBackendGroupCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackendGroup) StartLoadBalancerBackendGroupDeleteTask

func (lbbg *SLoadbalancerBackendGroup) StartLoadBalancerBackendGroupDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackendGroup) StartOpenstackLoadBalancerBackendGroupCreateTask

func (lbbg *SLoadbalancerBackendGroup) StartOpenstackLoadBalancerBackendGroupCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerBackendGroup) SyncWithCloudLoadbalancerBackendgroup

func (lbbg *SLoadbalancerBackendGroup) SyncWithCloudLoadbalancerBackendgroup(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	lb *SLoadbalancer,
	extLoadbalancerBackendgroup cloudprovider.ICloudLoadbalancerBackendGroup,
	syncOwnerId mcclient.IIdentityProvider,
	provider *SCloudprovider,
) error

func (*SLoadbalancerBackendGroup) ValidateDeleteCondition

func (lbbg *SLoadbalancerBackendGroup) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancerBackendGroup) ValidatePurgeCondition

func (lbbg *SLoadbalancerBackendGroup) ValidatePurgeCondition(ctx context.Context) error

type SLoadbalancerBackendGroupManager

var LoadbalancerBackendGroupManager *SLoadbalancerBackendGroupManager

func (*SLoadbalancerBackendGroupManager) FetchCustomizeColumns

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

func (*SLoadbalancerBackendGroupManager) FetchOwnerId

func (*SLoadbalancerBackendGroupManager) FilterByOwner

func (*SLoadbalancerBackendGroupManager) FilterZeroRefBackendGroup

func (man *SLoadbalancerBackendGroupManager) FilterZeroRefBackendGroup(q *sqlchemy.SQuery) (*sqlchemy.SQuery, error)

func (*SLoadbalancerBackendGroupManager) GetResourceCount

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

func (*SLoadbalancerBackendGroupManager) InitializeData

func (man *SLoadbalancerBackendGroupManager) InitializeData() error

func (*SLoadbalancerBackendGroupManager) ListItemExportKeys

func (*SLoadbalancerBackendGroupManager) ListItemFilter

负载均衡后端服务器组列表

func (*SLoadbalancerBackendGroupManager) OrderByExtraFields

func (*SLoadbalancerBackendGroupManager) QueryDistinctExtraField

func (man *SLoadbalancerBackendGroupManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerBackendGroupManager) ValidateCreateData

type SLoadbalancerBackendManager

var LoadbalancerBackendManager *SLoadbalancerBackendManager

func (*SLoadbalancerBackendManager) FetchCustomizeColumns

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

func (*SLoadbalancerBackendManager) FetchOwnerId

func (*SLoadbalancerBackendManager) GetGuestAddress

func (man *SLoadbalancerBackendManager) GetGuestAddress(guest *SGuest) (string, error)

func (*SLoadbalancerBackendManager) GetResourceCount

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

func (*SLoadbalancerBackendManager) InitializeData

func (manager *SLoadbalancerBackendManager) InitializeData() error

func (*SLoadbalancerBackendManager) ListItemExportKeys

func (*SLoadbalancerBackendManager) ListItemFilter

负载均衡后端列表

func (*SLoadbalancerBackendManager) OrderByExtraFields

func (*SLoadbalancerBackendManager) QueryDistinctExtraField

func (man *SLoadbalancerBackendManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerBackendManager) SyncLoadbalancerBackends

func (man *SLoadbalancerBackendManager) SyncLoadbalancerBackends(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, loadbalancerBackendgroup *SLoadbalancerBackendGroup, lbbs []cloudprovider.ICloudLoadbalancerBackend, syncRange *SSyncRange) compare.SyncResult

func (*SLoadbalancerBackendManager) ValidateBackendVpc

func (man *SLoadbalancerBackendManager) ValidateBackendVpc(lb *SLoadbalancer, guest *SGuest, backendgroup *SLoadbalancerBackendGroup) error

func (*SLoadbalancerBackendManager) ValidateCreateData

type SLoadbalancerBackendgroupResourceBase

type SLoadbalancerBackendgroupResourceBase struct {
	// 负载均衡后端组ID
	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"backend_group_id"`
}

func (*SLoadbalancerBackendgroupResourceBase) GetCloudprovider

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

func (*SLoadbalancerBackendgroupResourceBase) GetLoadbalancer

func (self *SLoadbalancerBackendgroupResourceBase) GetLoadbalancer() (*SLoadbalancer, error)

func (*SLoadbalancerBackendgroupResourceBase) GetLoadbalancerBackendGroup

func (self *SLoadbalancerBackendgroupResourceBase) GetLoadbalancerBackendGroup() (*SLoadbalancerBackendGroup, error)

func (*SLoadbalancerBackendgroupResourceBase) GetProviderName

func (self *SLoadbalancerBackendgroupResourceBase) GetProviderName() string

func (*SLoadbalancerBackendgroupResourceBase) GetRegion

func (*SLoadbalancerBackendgroupResourceBase) GetVpc

func (*SLoadbalancerBackendgroupResourceBase) GetZone

type SLoadbalancerBackendgroupResourceBaseManager

type SLoadbalancerBackendgroupResourceBaseManager struct {
	SLoadbalancerResourceBaseManager
}

func (*SLoadbalancerBackendgroupResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerBackendgroupResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerBackendgroupResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerBackendgroupResourceBaseManager) GetOrderByFields

func (*SLoadbalancerBackendgroupResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerBackendgroupResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerBackendgroupResourceBaseManager) ListItemFilter

func (*SLoadbalancerBackendgroupResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerBackendgroupResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerCertificate

TODO

  • notify users of cert expiration
  • ca info: self-signed, public ca

func (*SLoadbalancerCertificate) CustomizeCreate

func (*SLoadbalancerCertificate) Delete

func (lbcert *SLoadbalancerCertificate) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerCertificate) GetCachedCerts

func (lbcert *SLoadbalancerCertificate) GetCachedCerts() ([]SCachedLoadbalancerCertificate, error)

func (*SLoadbalancerCertificate) IsComplete

func (lbcert *SLoadbalancerCertificate) IsComplete() bool

func (*SLoadbalancerCertificate) PerformPurge

func (*SLoadbalancerCertificate) PostCreate

func (*SLoadbalancerCertificate) ValidateDeleteCondition

func (lbcert *SLoadbalancerCertificate) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancerCertificate) ValidateUpdateData

func (lbcert *SLoadbalancerCertificate) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerCertificateManager

var LoadbalancerCertificateManager *SLoadbalancerCertificateManager

func (*SLoadbalancerCertificateManager) CreateCertificate

func (*SLoadbalancerCertificateManager) FetchCustomizeColumns

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

func (*SLoadbalancerCertificateManager) GetLbCertByFingerprint

func (manager *SLoadbalancerCertificateManager) GetLbCertByFingerprint(tenantId, fingerprint string) (*SLoadbalancerCertificate, error)

func (*SLoadbalancerCertificateManager) GetResourceCount

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

func (*SLoadbalancerCertificateManager) InitializeData

func (man *SLoadbalancerCertificateManager) InitializeData() error

func (*SLoadbalancerCertificateManager) ListItemFilter

func (*SLoadbalancerCertificateManager) OrderByExtraFields

func (*SLoadbalancerCertificateManager) QueryDistinctExtraField

func (man *SLoadbalancerCertificateManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerCertificateManager) ValidateCreateData

type SLoadbalancerCertificateResourceBase

type SLoadbalancerCertificateResourceBase struct {
	// 本地负载均衡证书ID
	CertificateId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
}

func (*SLoadbalancerCertificateResourceBase) GetCertificate

type SLoadbalancerCertificateResourceBaseManager

type SLoadbalancerCertificateResourceBaseManager struct{}

func (*SLoadbalancerCertificateResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerCertificateResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerCertificateResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerCertificateResourceBaseManager) GetOrderByFields

func (*SLoadbalancerCertificateResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerCertificateResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerCertificateResourceBaseManager) ListItemFilter

func (*SLoadbalancerCertificateResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerCertificateResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerCluster

type SLoadbalancerCluster struct {
	db.SStandaloneResourceBase
	SZoneResourceBase
	SWireResourceBase `width:"36" charset:"ascii" nullable:"true" list:"admin" create:"optional" update:"admin"`
}

func (*SLoadbalancerCluster) CustomizeDelete

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

func (*SLoadbalancerCluster) ValidateDeleteCondition

func (lbc *SLoadbalancerCluster) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SLoadbalancerCluster) ValidateUpdateData

func (lbc *SLoadbalancerCluster) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerClusterManager

var LoadbalancerClusterManager *SLoadbalancerClusterManager

func (*SLoadbalancerClusterManager) FetchCustomizeColumns

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

func (*SLoadbalancerClusterManager) FindByZoneId

func (man *SLoadbalancerClusterManager) FindByZoneId(zoneId string) []SLoadbalancerCluster

func (*SLoadbalancerClusterManager) InitializeData

func (man *SLoadbalancerClusterManager) InitializeData() error

func (*SLoadbalancerClusterManager) ListItemExportKeys

func (*SLoadbalancerClusterManager) ListItemFilter

负载均衡集群列表

func (*SLoadbalancerClusterManager) OrderByExtraFields

func (*SLoadbalancerClusterManager) QueryDistinctExtraField

func (man *SLoadbalancerClusterManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerClusterManager) ValidateCreateData

type SLoadbalancerClusterResourceBase

type SLoadbalancerClusterResourceBase struct {
	// 归属LB集群
	ClusterId string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional" json:"cluster_id"`
}

func (*SLoadbalancerClusterResourceBase) GetLoadbalancerCluster

func (self *SLoadbalancerClusterResourceBase) GetLoadbalancerCluster() *SLoadbalancerCluster

type SLoadbalancerClusterResourceBaseManager

type SLoadbalancerClusterResourceBaseManager struct {
	SZoneResourceBaseManager
	SWireResourceBaseManager
}

func (*SLoadbalancerClusterResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerClusterResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerClusterResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerClusterResourceBaseManager) GetOrderByFields

func (*SLoadbalancerClusterResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerClusterResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerClusterResourceBaseManager) ListItemFilter

func (*SLoadbalancerClusterResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerClusterResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerHTTPListener

type SLoadbalancerHTTPListener struct {
	StickySession              string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`  // 会话保持开启状态 on|off
	StickySessionType          string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`  // Cookie处理方式 insert(植入cookie)|server(重写cookie)
	StickySessionCookie        string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // Cookie名称
	StickySessionCookieTimeout int    `nullable:"true" list:"user" create:"optional" update:"user"`                             // 会话超时时间

	XForwardedFor bool `nullable:"true" list:"user" create:"optional" update:"user"` // 获取客户端真实IP
	Gzip          bool `nullable:"true" list:"user" create:"optional" update:"user"` // Gzip数据压缩
}

TODO sensible default for knobs

type SLoadbalancerHTTPRateLimiter

type SLoadbalancerHTTPRateLimiter struct {
	HTTPRequestRate       int `nullable:"true" list:"user" create:"optional" update:"user"` // 限定监听接收请示速率
	HTTPRequestRatePerSrc int `nullable:"true" list:"user" create:"optional" update:"user"` // 源IP监听请求最大速率
}

type SLoadbalancerHTTPRedirect

type SLoadbalancerHTTPRedirect struct {
	Redirect       string `width:"16" nullable:"true" list:"user" create:"optional" update:"user" default:"off"` // 跳转类型
	RedirectCode   int    `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转HTTP code
	RedirectScheme string `width:"16" nullable:"true" list:"user" create:"optional" update:"user"`               // 跳转uri scheme
	RedirectHost   string `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转时变更Host
	RedirectPath   string `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转时变更Path
}

type SLoadbalancerHTTPSListener

type SLoadbalancerHTTPSListener struct {
	SLoadbalancerCertificateResourceBase

	CachedCertificateId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	TLSCipherPolicy     string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	EnableHttp2         bool   `create:"optional" list:"user" update:"user"`
}

TODO

  • CACertificate string
  • Certificate2Id // multiple certificates for rsa, ecdsa
  • Use certificate for tcp listener
  • Customize ciphers?

type SLoadbalancerHealthCheck

type SLoadbalancerHealthCheck struct {
	HealthCheck     string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查开启状态 on|off
	HealthCheckType string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查协议 HTTP|TCP

	HealthCheckDomain   string `charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查域名 yunion.cn
	HealthCheckURI      string `charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查路径 /
	HealthCheckHttpCode string `charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"` // HTTP正常状态码 http_2xx,http_3xx

	HealthCheckRise     int `nullable:"true" list:"user" create:"optional" update:"user"` //  健康检查健康阈值 3秒
	HealthCheckFall     int `nullable:"true" list:"user" create:"optional" update:"user"` //  健康检查不健康阈值 15秒
	HealthCheckTimeout  int `nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查超时时间 10秒
	HealthCheckInterval int `nullable:"true" list:"user" create:"optional" update:"user"` // 健康检查间隔时间 5秒

	HealthCheckReq string `list:"user" create:"optional" update:"user"` // UDP监听健康检查的请求串
	HealthCheckExp string `list:"user" create:"optional" update:"user"` // UDP监听健康检查的响应串
}

type SLoadbalancerListener

type SLoadbalancerListener struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SLoadbalancerResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	ListenerType      string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	ListenerPort      int    `nullable:"false" list:"user" create:"required"`
	BackendGroupId    string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	BackendServerPort int    `nullable:"false" get:"user" list:"user" default:"0" create:"optional"`

	Scheduler string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	SendProxy string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user" default:"off"`

	ClientRequestTimeout  int `nullable:"true" list:"user" create:"optional" update:"user"` // 连接请求超时时间
	ClientIdleTimeout     int `nullable:"true" list:"user" create:"optional" update:"user"` // 连接空闲超时时间
	BackendConnectTimeout int `nullable:"true" list:"user" create:"optional" update:"user"` // 后端连接超时时间
	BackendIdleTimeout    int `nullable:"true" list:"user" create:"optional" update:"user"` // 后端连接空闲时间

	AclStatus                    string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	AclType                      string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`
	SLoadbalancerAclResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	CachedAclId                  string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`

	SLoadbalancerRateLimiter

	SLoadbalancerTCPListener
	SLoadbalancerUDPListener
	SLoadbalancerHTTPListener
	SLoadbalancerHTTPSListener

	SLoadbalancerHealthCheck
	SLoadbalancerHTTPRateLimiter
	SLoadbalancerHTTPRedirect
}

func (*SLoadbalancerListener) CustomizeDelete

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

func (*SLoadbalancerListener) Delete

func (lblis *SLoadbalancerListener) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerListener) GetAwsLoadbalancerListenerParams

func (lblis *SLoadbalancerListener) GetAwsLoadbalancerListenerParams() (*cloudprovider.SLoadbalancerListener, error)

func (*SLoadbalancerListener) GetCachedLoadbalancerAcl

func (lblis *SLoadbalancerListener) GetCachedLoadbalancerAcl() *SCachedLoadbalancerAcl

func (*SLoadbalancerListener) GetDefaultRule

func (lblis *SLoadbalancerListener) GetDefaultRule() (*SLoadbalancerListenerRule, error)

func (*SLoadbalancerListener) GetDetailsBackendStatus

func (lblis *SLoadbalancerListener) GetDetailsBackendStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SLoadbalancerListener) GetHuaweiLoadbalancerListenerParams

func (lblis *SLoadbalancerListener) GetHuaweiLoadbalancerListenerParams() (*cloudprovider.SLoadbalancerListener, error)

func (*SLoadbalancerListener) GetIRegion

func (*SLoadbalancerListener) GetLoadbalancer

func (lblis *SLoadbalancerListener) GetLoadbalancer() (*SLoadbalancer, error)

func (*SLoadbalancerListener) GetLoadbalancerAcl

func (lblis *SLoadbalancerListener) GetLoadbalancerAcl() *SLoadbalancerAcl

func (*SLoadbalancerListener) GetLoadbalancerBackendGroup

func (lblis *SLoadbalancerListener) GetLoadbalancerBackendGroup() *SLoadbalancerBackendGroup

func (*SLoadbalancerListener) GetLoadbalancerCertificate

func (lblis *SLoadbalancerListener) GetLoadbalancerCertificate() (*SCachedLoadbalancerCertificate, error)

func (*SLoadbalancerListener) GetLoadbalancerListenerParams

func (lblis *SLoadbalancerListener) GetLoadbalancerListenerParams() (*cloudprovider.SLoadbalancerListener, error)

func (*SLoadbalancerListener) GetLoadbalancerListenerRules

func (lblis *SLoadbalancerListener) GetLoadbalancerListenerRules() ([]SLoadbalancerListenerRule, error)

func (*SLoadbalancerListener) GetOpenstackLoadbalancerListenerParams

func (lblis *SLoadbalancerListener) GetOpenstackLoadbalancerListenerParams() (*cloudprovider.SLoadbalancerListener, error)

func (*SLoadbalancerListener) GetQcloudLoadbalancerListenerParams

func (lblis *SLoadbalancerListener) GetQcloudLoadbalancerListenerParams() (*cloudprovider.SLoadbalancerListener, error)

func (*SLoadbalancerListener) GetRegion

func (lblis *SLoadbalancerListener) GetRegion() (*SCloudregion, error)

func (*SLoadbalancerListener) LBPendingDelete

func (lblis *SLoadbalancerListener) LBPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerListener) PerformPurge

func (*SLoadbalancerListener) PerformStatus

func (*SLoadbalancerListener) PerformSync

func (*SLoadbalancerListener) PerformSyncstatus

func (*SLoadbalancerListener) PostCreate

func (*SLoadbalancerListener) PostUpdate

func (*SLoadbalancerListener) StartLoadBalancerListenerCreateTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerCreateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerListener) StartLoadBalancerListenerDeleteTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerListener) StartLoadBalancerListenerStartTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerStartTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerListener) StartLoadBalancerListenerStopTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerStopTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerListener) StartLoadBalancerListenerSyncTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerSyncTask(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject, parentTaskId string) error

func (*SLoadbalancerListener) StartLoadBalancerListenerSyncstatusTask

func (lblis *SLoadbalancerListener) StartLoadBalancerListenerSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerListener) SyncWithCloudLoadbalancerListener

func (lblis *SLoadbalancerListener) SyncWithCloudLoadbalancerListener(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, extListener cloudprovider.ICloudLoadbalancerListener, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

func (*SLoadbalancerListener) ValidateUpdateData

func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerListenerManager

var LoadbalancerListenerManager *SLoadbalancerListenerManager

func (*SLoadbalancerListenerManager) CheckAwsListenerUniqueness

func (man *SLoadbalancerListenerManager) CheckAwsListenerUniqueness(ctx context.Context, lb *SLoadbalancer, lblis *SLoadbalancerListener, listenerType string, listenerPort int64) error

func (*SLoadbalancerListenerManager) CheckListenerUniqueness

func (man *SLoadbalancerListenerManager) CheckListenerUniqueness(ctx context.Context, lb *SLoadbalancer, listenerType string, listenerPort int64) error

func (*SLoadbalancerListenerManager) CheckTypeV

func (man *SLoadbalancerListenerManager) CheckTypeV(listenerType string) validators.IValidator

func (*SLoadbalancerListenerManager) FetchCustomizeColumns

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

func (*SLoadbalancerListenerManager) FetchOwnerId

func (*SLoadbalancerListenerManager) FilterByOwner

func (*SLoadbalancerListenerManager) GetResourceCount

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

func (*SLoadbalancerListenerManager) InitializeData

func (manager *SLoadbalancerListenerManager) InitializeData() error

func (*SLoadbalancerListenerManager) ListItemExportKeys

func (*SLoadbalancerListenerManager) ListItemFilter

负载均衡监听器Listener列表

func (*SLoadbalancerListenerManager) OrderByExtraFields

func (*SLoadbalancerListenerManager) QueryDistinctExtraField

func (man *SLoadbalancerListenerManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerListenerManager) ValidateAcl

func (*SLoadbalancerListenerManager) ValidateCreateData

type SLoadbalancerListenerResourceBase

type SLoadbalancerListenerResourceBase struct {
	// 负载均衡监听器ID
	ListenerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"listener_id"`
}

func (*SLoadbalancerListenerResourceBase) GetCloudprovider

func (self *SLoadbalancerListenerResourceBase) GetCloudprovider() *SCloudprovider

func (*SLoadbalancerListenerResourceBase) GetCloudproviderId

func (self *SLoadbalancerListenerResourceBase) GetCloudproviderId() string

func (*SLoadbalancerListenerResourceBase) GetLoadbalancerListener

func (self *SLoadbalancerListenerResourceBase) GetLoadbalancerListener() (*SLoadbalancerListener, error)

func (*SLoadbalancerListenerResourceBase) GetProviderName

func (self *SLoadbalancerListenerResourceBase) GetProviderName() string

type SLoadbalancerListenerResourceBaseManager

type SLoadbalancerListenerResourceBaseManager struct {
	SLoadbalancerResourceBaseManager
}

func (*SLoadbalancerListenerResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerListenerResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerListenerResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerListenerResourceBaseManager) GetOrderByFields

func (*SLoadbalancerListenerResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerListenerResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerListenerResourceBaseManager) ListItemFilter

func (*SLoadbalancerListenerResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerListenerResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerListenerRule

type SLoadbalancerListenerRule struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SLoadbalancerListenerResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 默认转发策略,目前只有aws用到其它云都是false
	IsDefault bool `default:"false" nullable:"true" list:"user" create:"optional"`

	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user"`

	Domain    string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	Path      string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	Condition string `charset:"ascii" nullable:"true" list:"user" create:"optional"`

	SLoadbalancerHealthCheck // 目前只有腾讯云HTTP、HTTPS类型的健康检查是和规则绑定的。
	SLoadbalancerHTTPRateLimiter
	SLoadbalancerHTTPRedirect
}

func (*SLoadbalancerListenerRule) CustomizeDelete

func (*SLoadbalancerListenerRule) Delete

func (*SLoadbalancerListenerRule) GetDetailsBackendStatus

func (lbr *SLoadbalancerListenerRule) GetDetailsBackendStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SLoadbalancerListenerRule) GetLoadbalancerBackendGroup

func (lbr *SLoadbalancerListenerRule) GetLoadbalancerBackendGroup() *SLoadbalancerBackendGroup

func (*SLoadbalancerListenerRule) GetRegion

func (lbr *SLoadbalancerListenerRule) GetRegion() (*SCloudregion, error)

func (*SLoadbalancerListenerRule) PerformPurge

func (*SLoadbalancerListenerRule) PostCreate

func (*SLoadbalancerListenerRule) StartLoadBalancerListenerRuleCreateTask

func (lbr *SLoadbalancerListenerRule) StartLoadBalancerListenerRuleCreateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SLoadbalancerListenerRule) StartLoadBalancerListenerRuleDeleteTask

func (lbr *SLoadbalancerListenerRule) StartLoadBalancerListenerRuleDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SLoadbalancerListenerRule) SyncWithCloudLoadbalancerListenerRule

func (lbr *SLoadbalancerListenerRule) SyncWithCloudLoadbalancerListenerRule(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	extRule cloudprovider.ICloudLoadbalancerListenerRule,
	syncOwnerId mcclient.IIdentityProvider,
	provider *SCloudprovider,
) error

func (*SLoadbalancerListenerRule) ValidateUpdateData

type SLoadbalancerListenerRuleManager

var LoadbalancerListenerRuleManager *SLoadbalancerListenerRuleManager

func (*SLoadbalancerListenerRuleManager) FetchCustomizeColumns

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

func (*SLoadbalancerListenerRuleManager) FetchOwnerId

func (*SLoadbalancerListenerRuleManager) GetResourceCount

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

func (*SLoadbalancerListenerRuleManager) ListItemExportKeys

func (*SLoadbalancerListenerRuleManager) ListItemFilter

负载均衡监听器规则列表

func (*SLoadbalancerListenerRuleManager) OrderByExtraFields

func (*SLoadbalancerListenerRuleManager) QueryDistinctExtraField

func (man *SLoadbalancerListenerRuleManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerListenerRuleManager) SyncLoadbalancerListenerRules

func (*SLoadbalancerListenerRuleManager) ValidateCreateData

type SLoadbalancerLogSkipper

type SLoadbalancerLogSkipper struct{}

func (SLoadbalancerLogSkipper) GetSkipLog

func (SLoadbalancerLogSkipper) ListSkipLog

type SLoadbalancerManager

var LoadbalancerManager *SLoadbalancerManager

func (*SLoadbalancerManager) BatchCreateValidateCreateData

func (man *SLoadbalancerManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SLoadbalancerManager) FetchByExternalId

func (manager *SLoadbalancerManager) FetchByExternalId(providerId string, extId string) (*SLoadbalancer, error)

func (*SLoadbalancerManager) FetchCustomizeColumns

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

func (*SLoadbalancerManager) FetchZone1ResourceInfos

func (lb *SLoadbalancerManager) FetchZone1ResourceInfos(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{}) []api.Zone1ResourceInfoBase

func (*SLoadbalancerManager) GetLbDefaultBackendGroupIds

func (manager *SLoadbalancerManager) GetLbDefaultBackendGroupIds() ([]string, error)

func (*SLoadbalancerManager) GetResourceCount

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

func (*SLoadbalancerManager) InitializeData

func (man *SLoadbalancerManager) InitializeData() error

func (*SLoadbalancerManager) ListItemExportKeys

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

func (*SLoadbalancerManager) ListItemFilter

负载均衡实例列表

func (*SLoadbalancerManager) OrderByExtraFields

func (man *SLoadbalancerManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.LoadbalancerListInput,
) (*sqlchemy.SQuery, error)

func (*SLoadbalancerManager) QueryDistinctExtraField

func (man *SLoadbalancerManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SLoadbalancerManager) SyncLoadbalancers

func (*SLoadbalancerManager) TotalCount

func (man *SLoadbalancerManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (int, error)

func (*SLoadbalancerManager) ValidateCreateData

type SLoadbalancerNetwork

type SLoadbalancerNetwork struct {
	db.SVirtualJointResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	NetworkId      string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	IpAddr         string `width:"16" charset:"ascii" list:"user"`
}

func (*SLoadbalancerNetwork) Delete

func (*SLoadbalancerNetwork) Detach

Detach implements db.IJointModel interface

func (*SLoadbalancerNetwork) Network

func (ln *SLoadbalancerNetwork) Network() *SNetwork

type SLoadbalancerNetworkDeleteData

type SLoadbalancerNetworkDeleteData struct {
	// contains filtered or unexported fields
}

type SLoadbalancerNetworkRequestData

type SLoadbalancerNetworkRequestData struct {
	Loadbalancer *SLoadbalancer
	NetworkId    string

	Address string // the address user intends to use
	// contains filtered or unexported fields
}

type SLoadbalancerNotifier

type SLoadbalancerNotifier struct{}

TODO notify on post create/update/delete

func (*SLoadbalancerNotifier) PostCreate

type SLoadbalancerRateLimiter

type SLoadbalancerRateLimiter struct {
	EgressMbps int `nullable:"true" list:"user" get:"user" create:"optional" update:"user" json:"egress_mbps"`
}

type SLoadbalancerResourceBase

type SLoadbalancerResourceBase struct {
	// 负载均衡ID
	LoadbalancerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SLoadbalancerResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SLoadbalancerResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SLoadbalancerResourceBase) GetCloudaccount

func (self *SLoadbalancerResourceBase) GetCloudaccount() *SCloudaccount

func (*SLoadbalancerResourceBase) GetCloudprovider

func (self *SLoadbalancerResourceBase) GetCloudprovider() *SCloudprovider

func (*SLoadbalancerResourceBase) GetCloudproviderId

func (self *SLoadbalancerResourceBase) GetCloudproviderId() string

func (*SLoadbalancerResourceBase) GetLoadbalancer

func (self *SLoadbalancerResourceBase) GetLoadbalancer() (*SLoadbalancer, error)

func (*SLoadbalancerResourceBase) GetProviderName

func (self *SLoadbalancerResourceBase) GetProviderName() string

func (*SLoadbalancerResourceBase) GetRegion

func (self *SLoadbalancerResourceBase) GetRegion() (*SCloudregion, error)

func (*SLoadbalancerResourceBase) GetRegionId

func (self *SLoadbalancerResourceBase) GetRegionId() string

func (*SLoadbalancerResourceBase) GetVpc

func (self *SLoadbalancerResourceBase) GetVpc() (*SVpc, error)

func (*SLoadbalancerResourceBase) GetZone

func (self *SLoadbalancerResourceBase) GetZone() (*SZone, error)

type SLoadbalancerResourceBaseManager

type SLoadbalancerResourceBaseManager struct {
	SVpcResourceBaseManager
	SZoneResourceBaseManager
}

func (*SLoadbalancerResourceBaseManager) FetchCustomizeColumns

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

func (*SLoadbalancerResourceBaseManager) GetExportKeys

func (manager *SLoadbalancerResourceBaseManager) GetExportKeys() []string

func (*SLoadbalancerResourceBaseManager) GetOrderByFields

func (manager *SLoadbalancerResourceBaseManager) GetOrderByFields(query api.LoadbalancerFilterListInput) []string

func (*SLoadbalancerResourceBaseManager) GetOrderBySubQuery

func (*SLoadbalancerResourceBaseManager) ListItemExportKeys

func (*SLoadbalancerResourceBaseManager) ListItemFilter

func (*SLoadbalancerResourceBaseManager) OrderByExtraFields

func (*SLoadbalancerResourceBaseManager) QueryDistinctExtraField

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

type SLoadbalancerStatus

type SLoadbalancerStatus struct {
	RuntimeStatus string `width:"36" charset:"ascii" nullable:"false" default:"init" list:"user"`
}

type SLoadbalancerTCPListener

type SLoadbalancerTCPListener struct{}

type SLoadbalancerUDPListener

type SLoadbalancerUDPListener struct{}

type SLoadbalancernetworkManager

var LoadbalancernetworkManager *SLoadbalancernetworkManager

func (*SLoadbalancernetworkManager) DeleteLoadbalancerNetwork

func (*SLoadbalancernetworkManager) FetchCustomizeColumns

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

func (*SLoadbalancernetworkManager) GetMasterFieldName

func (manager *SLoadbalancernetworkManager) GetMasterFieldName() string

func (*SLoadbalancernetworkManager) GetSlaveFieldName

func (manager *SLoadbalancernetworkManager) GetSlaveFieldName() string

func (*SLoadbalancernetworkManager) ListItemExportKeys

func (*SLoadbalancernetworkManager) ListItemFilter

func (*SLoadbalancernetworkManager) NewLoadbalancerNetwork

func (*SLoadbalancernetworkManager) OrderByExtraFields

func (*SLoadbalancernetworkManager) QueryDistinctExtraField

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

type SManagedResourceBase

type SManagedResourceBase struct {
	// 云订阅ID
	ManagerId string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SManagedResourceBase) CanShareToDomain

func (self *SManagedResourceBase) CanShareToDomain(domainId string) bool

func (*SManagedResourceBase) GetBrand

func (self *SManagedResourceBase) GetBrand() string

func (*SManagedResourceBase) GetChangeOwnerCandidateDomainIds

func (model *SManagedResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SManagedResourceBase) GetCloudaccount

func (self *SManagedResourceBase) GetCloudaccount() *SCloudaccount

func (*SManagedResourceBase) GetCloudprovider

func (self *SManagedResourceBase) GetCloudprovider() *SCloudprovider

func (*SManagedResourceBase) GetCloudproviderId

func (self *SManagedResourceBase) GetCloudproviderId() string

func (*SManagedResourceBase) GetDriver

func (*SManagedResourceBase) GetProviderFactory

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

func (*SManagedResourceBase) GetProviderName

func (self *SManagedResourceBase) GetProviderName() string

func (*SManagedResourceBase) GetRegionDriver

func (self *SManagedResourceBase) GetRegionDriver() (IRegionDriver, error)

func (*SManagedResourceBase) IsManaged

func (self *SManagedResourceBase) IsManaged() bool

type SManagedResourceBaseManager

type SManagedResourceBaseManager struct {
	// contains filtered or unexported fields
}

func (*SManagedResourceBaseManager) FetchCustomizeColumns

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

func (*SManagedResourceBaseManager) GetExportKeys

func (manager *SManagedResourceBaseManager) GetExportKeys() []string

func (*SManagedResourceBaseManager) GetOrderByFields

func (manager *SManagedResourceBaseManager) GetOrderByFields(query api.ManagedResourceListInput) []string

func (*SManagedResourceBaseManager) GetOrderBySubQuery

func (*SManagedResourceBaseManager) ListItemExportKeys

func (*SManagedResourceBaseManager) ListItemFilter

func (*SManagedResourceBaseManager) OrderByExtraFields

func (*SManagedResourceBaseManager) QueryDistinctExtraField

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

type SModelartsPool

type SModelartsPool struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase

	SCloudregionResourceBase
	SDeletePreventableResourceBase

	InstanceType string `width:"72" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	NodeCount    int    `list:"user" create:"required"`
	WorkType     string `width:"72" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	// CPU 架构 x86|xarm
	CpuArch string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	Cidr    string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
}

func (*SModelartsPool) CustomizeDelete

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

进入删除任务

func (*SModelartsPool) Delete

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

func (*SModelartsPool) GetCloudproviderId

func (self *SModelartsPool) GetCloudproviderId() string

func (*SModelartsPool) GetIModelartsPool

func (self *SModelartsPool) GetIModelartsPool() (cloudprovider.ICloudModelartsPool, error)

获取云上对应的资源

func (*SModelartsPool) GetIRegion

func (self *SModelartsPool) GetIRegion() (cloudprovider.ICloudRegion, error)

func (*SModelartsPool) PerformChangeConfig

func (*SModelartsPool) PerformSyncstatus

func (modelarts *SModelartsPool) PerformSyncstatus(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	input api.ModelartsPoolSyncstatusInput,
) (jsonutils.JSONObject, error)

func (*SModelartsPool) PostCreate

func (*SModelartsPool) RealDelete

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

func (*SModelartsPool) StartChangeConfigTask

func (self *SModelartsPool) StartChangeConfigTask(ctx context.Context, userCred mcclient.TokenCredential, input api.ModelartsPoolChangeConfigInput) error

func (*SModelartsPool) StartCreateTask

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

func (*SModelartsPool) StartDeleteTask

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

func (*SModelartsPool) StartSyncstatus

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

func (*SModelartsPool) SyncWithCloudModelartsPool

func (self *SModelartsPool) SyncWithCloudModelartsPool(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudModelartsPool) error

同步资源属性

func (*SModelartsPool) ValidateDeleteCondition

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

判断资源是否可以删除

type SModelartsPoolManager

type SModelartsPoolManager struct {
	// 由于资源是用户资源,因此定义为Virtual资源
	db.SVirtualResourceBaseManager
	db.SExternalizedResourceBaseManager
	SDeletePreventableResourceBaseManager

	SCloudregionResourceBaseManager
	SManagedResourceBaseManager
}
var ModelartsPoolManager *SModelartsPoolManager

func (*SModelartsPoolManager) FetchCustomizeColumns

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

func (*SModelartsPoolManager) GetContextManagers

func (manager *SModelartsPoolManager) GetContextManagers() [][]db.IModelManager

func (*SModelartsPoolManager) ListItemExportKeys

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

func (*SModelartsPoolManager) ListItemFilter

Pool实例列表

func (*SModelartsPoolManager) OrderByExtraFields

func (*SModelartsPoolManager) QueryDistinctExtraField

func (man *SModelartsPoolManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SModelartsPoolSku

type SModelartsPoolSku struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase

	Type string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"` // 资源规格类型
	// CPU 架构 x86|xarm
	CpuArch string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	//CPU核心数量
	CpuCount int `list:"user" create:"admin_optional" update:"admin"`
	// GPU卡类型
	GpuType string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	// GPU卡数量
	GpuSize int `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	// NPU卡类型
	NpuType string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	// NPU卡数量
	NpuSize int `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	// 内存
	Memory int `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	// 处理器类型
	ProcessorType string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
}

type SModelartsPoolSkuManager

var ModelartsPoolSkuManager *SModelartsPoolSkuManager

func (*SModelartsPoolSkuManager) FetchCustomizeColumns

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

func (*SModelartsPoolSkuManager) GetContextManagers

func (manager *SModelartsPoolSkuManager) GetContextManagers() [][]db.IModelManager

func (*SModelartsPoolSkuManager) ListItemExportKeys

func (*SModelartsPoolSkuManager) ListItemFilter

func (*SModelartsPoolSkuManager) OrderByExtraFields

func (*SModelartsPoolSkuManager) QueryDistinctExtraField

func (man *SModelartsPoolSkuManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SMongoDB

type SMongoDB struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase

	SCloudregionResourceBase
	SZoneResourceBase
	SDeletePreventableResourceBase

	// CPU数量
	// example: 1
	VcpuCount int `nullable:"false" default:"1" list:"user" create:"optional"`
	// 内存大小
	// example: 1024
	VmemSizeMb int `nullable:"false" list:"user" create:"required"`
	// 存储大小, 单位Mb
	// example: 10240
	DiskSizeMb int `nullable:"false" list:"user" create:"required"`
	// 端口
	// example: 3306
	Port int `nullable:"false" list:"user" create:"optional"`
	// 实例类型
	// example: ha
	Category string `nullable:"false" list:"user" create:"optional"`

	// 分片数量
	// example: 3
	ReplicationNum int `nullable:"false" default:"0" list:"user" create:"optional"`

	// 最大连接数
	MaxConnections int `nullable:"true" list:"user" create:"optional"`
	Iops           int `nullable:"true" list:"user" create:"optional"`

	// 实例IP地址
	IpAddr string `nullable:"false" list:"user"`

	// 引擎
	// example: MySQL
	Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 引擎版本
	// example: 5.7
	EngineVersion string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	// 套餐名称
	// example: mysql.x4.large.2c
	InstanceType string `width:"64" charset:"utf8" nullable:"true" list:"user" create:"optional"`

	// 维护时间
	MaintainTime string `width:"64" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 虚拟私有网络Id
	// example: ed20d84e-3158-41b1-870c-1725e412e8b6
	VpcId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`

	// 所属网络ID
	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"network_id"`

	// 连接地址
	NetworkAddress string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SMongoDB) CancelExpireTime

func (self *SMongoDB) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SMongoDB) CustomizeDelete

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

func (*SMongoDB) Delete

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

func (*SMongoDB) GetDetailsBackups

func (self *SMongoDB) GetDetailsBackups(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*cloudprovider.SMongoDBBackups, error)

获取备份列表

func (*SMongoDB) GetIMongoDB

func (self *SMongoDB) GetIMongoDB(ctx context.Context) (cloudprovider.ICloudMongoDB, error)

func (*SMongoDB) GetIRegion

func (self *SMongoDB) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SMongoDB) GetQuotaKeys

func (self *SMongoDB) GetQuotaKeys() quotas.IQuotaKeys

func (*SMongoDB) GetUsages

func (self *SMongoDB) GetUsages() []db.IUsage

func (*SMongoDB) OnMetadataUpdated

func (self *SMongoDB) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SMongoDB) PerformCancelExpire

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

func (*SMongoDB) PerformPostpaidExpire

func (self *SMongoDB) PerformPostpaidExpire(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PostpaidExpireInput) (jsonutils.JSONObject, error)

func (*SMongoDB) PerformRemoteUpdate

func (self *SMongoDB) PerformRemoteUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.MongoDBRemoteUpdateInput) (jsonutils.JSONObject, error)

func (*SMongoDB) PerformSyncstatus

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

同步MongoDB实例状态

func (*SMongoDB) RealDelete

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

func (*SMongoDB) SaveRenewInfo

func (self *SMongoDB) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bc *billing.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SMongoDB) SetAutoRenew

func (self *SMongoDB) SetAutoRenew(autoRenew bool) error

func (*SMongoDB) StartDeleteTask

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

func (*SMongoDB) StartRemoteUpdateTask

func (self *SMongoDB) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SMongoDB) SyncAllWithCloudMongoDB

func (self *SMongoDB) SyncAllWithCloudMongoDB(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, ext cloudprovider.ICloudMongoDB) error

func (*SMongoDB) SyncWithCloudMongoDB

func (self *SMongoDB) SyncWithCloudMongoDB(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudMongoDB) error

func (*SMongoDB) ValidateDeleteCondition

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

type SMongoDBCountStat

type SMongoDBCountStat struct {
	TotalMongodbCount int
	TotalCpuCount     int
	TotalMemSizeMb    int
}

type SMongoDBManager

var MongoDBManager *SMongoDBManager

func (*SMongoDBManager) BatchCreateValidateCreateData

func (manager *SMongoDBManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.MongoDBCreateInput) (*api.MongoDBCreateInput, error)

func (*SMongoDBManager) FetchCustomizeColumns

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

func (*SMongoDBManager) GetContextManagers

func (manager *SMongoDBManager) GetContextManagers() [][]db.IModelManager

func (*SMongoDBManager) ListItemExportKeys

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

func (*SMongoDBManager) ListItemFilter

func (man *SMongoDBManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.MongoDBListInput,
) (*sqlchemy.SQuery, error)

MongoDB实例列表

func (*SMongoDBManager) OrderByExtraFields

func (man *SMongoDBManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.MongoDBListInput,
) (*sqlchemy.SQuery, error)

func (*SMongoDBManager) QueryDistinctExtraField

func (man *SMongoDBManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SMongoDBManager) TotalCount

func (man *SMongoDBManager) TotalCount(
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	rangeObjs []db.IStandaloneModel,
	providers []string, brands []string, cloudEnv string,
	policyResult rbacutils.SPolicyResult,
) (SMongoDBCountStat, error)

func (*SMongoDBManager) ValidateCreateData

type SMountTarget

type SMountTarget struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SVpcResourceBase
	SNetworkResourceBase
	SAccessGroupResourceBase

	NetworkType  string `width:"8" charset:"ascii" nullable:"false" create:"required" index:"true" list:"user" default:"vpc"`
	DomainName   string `charset:"utf8" nullable:"true" create:"optional" list:"user"`
	FileSystemId string `width:"36" charset:"ascii" nullable:"false" create:"required" index:"true" list:"user"`
}

func (*SMountTarget) CustomizeDelete

func (self *SMountTarget) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query api.ServerDeleteInput, input api.NatgatewayDeleteInput) error

删除挂载点

func (*SMountTarget) Delete

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

func (*SMountTarget) GetFileSystem

func (self *SMountTarget) GetFileSystem() (*SFileSystem, error)

func (*SMountTarget) GetNetwork

func (self *SMountTarget) GetNetwork() (*SNetwork, error)

func (*SMountTarget) GetOwnerId

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

func (*SMountTarget) GetVpc

func (self *SMountTarget) GetVpc() (*SVpc, error)

func (*SMountTarget) PerformSyncstatus

同步挂载点状态

func (*SMountTarget) PostCreate

func (*SMountTarget) RealDelete

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

func (*SMountTarget) StartCreateTask

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

func (*SMountTarget) StartDeleteTask

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

func (*SMountTarget) StartSyncstatus

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

func (*SMountTarget) SyncWithMountTarget

func (self *SMountTarget) SyncWithMountTarget(ctx context.Context, userCred mcclient.TokenCredential, managerId string, m cloudprovider.ICloudMountTarget) error

func (*SMountTarget) ValidateDeleteCondition

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

type SMountTargetManager

var MountTargetManager *SMountTargetManager

func (*SMountTargetManager) FetchCustomizeColumns

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

func (*SMountTargetManager) FilterByOwner

func (manager *SMountTargetManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SMountTargetManager) ListItemExportKeys

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

func (*SMountTargetManager) ListItemFilter

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

func (*SMountTargetManager) OrderByExtraFields

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

func (*SMountTargetManager) QueryDistinctExtraField

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

func (*SMountTargetManager) ResourceScope

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

func (*SMountTargetManager) ValidateCreateData

type SNasSku

type SNasSku struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase

	PrepaidStatus  string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"` // 预付费资源状态   available|soldout
	PostpaidStatus string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"` // 按需付费资源状态  available|soldout

	StorageType   string `width:"32" index:"true" list:"user" create:"optional"`
	DiskSizeStep  int    `list:"user" default:"-1" create:"optional"` //步长
	MaxDiskSizeGb int    `list:"user" create:"optional"`
	MinDiskSizeGb int    `list:"user" create:"optional"`

	NetworkTypes   string `list:"user" create:"optional"`
	FileSystemType string `list:"user" create:"optional"`
	Protocol       string `list:"user" create:"optional"`

	Provider string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"admin_required" update:"admin"`
	ZoneIds  string `charset:"utf8" nullable:"true" list:"user" update:"admin" create:"admin_optional" json:"zone_ids"`
}

func (SNasSku) GetGlobalId

func (self SNasSku) GetGlobalId() string

type SNasSkuManager

var NasSkuManager *SNasSkuManager

func (*SNasSkuManager) FetchCustomizeColumns

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

func (*SNasSkuManager) GetPropertySyncTasks

func (manager *SNasSkuManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SNasSkuManager) ListItemExportKeys

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

func (*SNasSkuManager) ListItemFilter

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

func (*SNasSkuManager) OrderByExtraFields

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

func (*SNasSkuManager) PerformSyncSkus

func (manager *SNasSkuManager) PerformSyncSkus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SkuSyncInput) (jsonutils.JSONObject, error)

func (*SNasSkuManager) QueryDistinctExtraField

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

type SNatDEntry

type SNatDEntry struct {
	SNatEntry

	ExternalIP   string `width:"17" charset:"ascii" list:"user" create:"required"`
	ExternalPort int    `list:"user" create:"required"`

	InternalIP   string `width:"17" charset:"ascii" list:"user" create:"required"`
	InternalPort int    `list:"user" create:"required"`
	IpProtocol   string `width:"8" charset:"ascii" list:"user" create:"required"`
}

func (*SNatDEntry) CustomizeDelete

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

func (*SNatDEntry) GetCloudproviderId

func (self *SNatDEntry) GetCloudproviderId() string

func (*SNatDEntry) GetEip

func (self *SNatDEntry) GetEip() (*SElasticip, error)

func (*SNatDEntry) GetUniqValues

func (self *SNatDEntry) GetUniqValues() jsonutils.JSONObject

func (*SNatDEntry) PostCreate

func (*SNatDEntry) Purge

func (dn *SNatDEntry) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNatDEntry) StartDeleteDNatTask

func (self *SNatDEntry) StartDeleteDNatTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNatDEntry) SyncWithCloudNatDTable

func (self *SNatDEntry) SyncWithCloudNatDTable(ctx context.Context, userCred mcclient.TokenCredential, extEntry cloudprovider.ICloudNatDEntry, syncOwnerId mcclient.IIdentityProvider) error

type SNatDEntryManager

type SNatDEntryManager struct {
	SNatEntryManager
}
var NatDEntryManager *SNatDEntryManager

func (*SNatDEntryManager) FetchCustomizeColumns

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

func (*SNatDEntryManager) FetchUniqValues

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

func (*SNatDEntryManager) FilterByUniqValues

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

func (*SNatDEntryManager) ListItemFilter

func (man *SNatDEntryManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NatDEntryListInput,
) (*sqlchemy.SQuery, error)

NAT网关的目的地址转换规则列表

func (*SNatDEntryManager) OrderByExtraFields

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

func (*SNatDEntryManager) QueryDistinctExtraField

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

func (*SNatDEntryManager) SyncNatDTable

func (manager *SNatDEntryManager) SyncNatDTable(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, nat *SNatGateway, extDTable []cloudprovider.ICloudNatDEntry) compare.SyncResult

func (*SNatDEntryManager) ValidateCreateData

type SNatEntry

type SNatEntry struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SNatgatewayResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SNatEntry) Delete

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

func (*SNatEntry) GetINatGateway

func (self *SNatEntry) GetINatGateway(ctx context.Context) (cloudprovider.ICloudNatGateway, error)

func (*SNatEntry) RealDelete

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

type SNatEntryManager

func NewNatEntryManager

func NewNatEntryManager(dt interface{}, tableName string, keyword string, keywordPlural string) SNatEntryManager

func (*SNatEntryManager) FetchCustomizeColumns

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

func (*SNatEntryManager) GetContextManagers

func (manager *SNatEntryManager) GetContextManagers() [][]db.IModelManager

func (*SNatEntryManager) ListItemFilter

func (man *SNatEntryManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NatEntryListInput,
) (*sqlchemy.SQuery, error)

NAT网关转发规则列表

func (*SNatEntryManager) OrderByExtraFields

func (man *SNatEntryManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NatEntryListInput,
) (*sqlchemy.SQuery, error)

func (*SNatEntryManager) QueryDistinctExtraField

func (man *SNatEntryManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SNatGateway

type SNatGateway struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SBillingResourceBase
	SVpcResourceBase

	SDeletePreventableResourceBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	IpAddr    string `width:"16" charset:"ascii" nullable:"false" list:"user"`

	BandwidthMb int    `nullable:"false" list:"user"`
	NatSpec     string `list:"user" create:"optional"` // NAT规格
}

func (*SNatGateway) CancelExpireTime

func (self *SNatGateway) CancelExpireTime(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNatGateway) CustomizeDelete

func (self *SNatGateway) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query api.ServerDeleteInput, input api.NatgatewayDeleteInput) error

删除NAT

func (*SNatGateway) Delete

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

func (*SNatGateway) GetDTable

func (self *SNatGateway) GetDTable() ([]SNatDEntry, error)

func (*SNatGateway) GetDTableSize

func (self *SNatGateway) GetDTableSize(filter func(q *sqlchemy.SQuery) *sqlchemy.SQuery) (int, error)

func (*SNatGateway) GetEips

func (self *SNatGateway) GetEips() ([]SElasticip, error)

func (*SNatGateway) GetINatGateway

func (self *SNatGateway) GetINatGateway(ctx context.Context) (cloudprovider.ICloudNatGateway, error)

func (*SNatGateway) GetSTable

func (self *SNatGateway) GetSTable() ([]SNatSEntry, error)

func (*SNatGateway) GetSTableSize

func (self *SNatGateway) GetSTableSize(filter func(q *sqlchemy.SQuery) *sqlchemy.SQuery) (int, error)

func (*SNatGateway) GetVpc

func (self *SNatGateway) GetVpc() (*SVpc, error)

func (*SNatGateway) OnMetadataUpdated

func (self *SNatGateway) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SNatGateway) PerformCancelExpire

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

func (*SNatGateway) PerformDnatResources

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

func (*SNatGateway) PerformPostpaidExpire

func (self *SNatGateway) PerformPostpaidExpire(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PostpaidExpireInput) (jsonutils.JSONObject, error)

func (*SNatGateway) PerformRemoteUpdate

func (*SNatGateway) PerformRenew

func (self *SNatGateway) PerformRenew(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.RenewInput) (jsonutils.JSONObject, error)

func (*SNatGateway) PerformSetAutoRenew

func (self *SNatGateway) PerformSetAutoRenew(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.AutoRenewInput) (jsonutils.JSONObject, error)

设置自动续费 要求NAT状态为available 要求NAT计费类型为包年包月(预付费)

func (*SNatGateway) PerformSnatResources

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

func (*SNatGateway) PerformSyncstatus

同步NAT网关状态

func (*SNatGateway) PostCreate

func (self *SNatGateway) PostCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
)

func (*SNatGateway) RealDelete

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

func (*SNatGateway) SaveRenewInfo

func (self *SNatGateway) SaveRenewInfo(
	ctx context.Context, userCred mcclient.TokenCredential,
	bc *billing.SBillingCycle, expireAt *time.Time, billingType string,
) error

func (*SNatGateway) SetAutoRenew

func (self *SNatGateway) SetAutoRenew(autoRenew bool) error

func (*SNatGateway) StartNatGatewayCreateTask

func (self *SNatGateway) StartNatGatewayCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error

func (*SNatGateway) StartNatGatewayDeleteTask

func (self *SNatGateway) StartNatGatewayDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error

func (*SNatGateway) StartRemoteUpdateTask

func (self *SNatGateway) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SNatGateway) StartRenewTask

func (self *SNatGateway) StartRenewTask(ctx context.Context, userCred mcclient.TokenCredential, duration string, parentTaskId string) error

func (*SNatGateway) StartSetAutoRenewTask

func (self *SNatGateway) StartSetAutoRenewTask(ctx context.Context, userCred mcclient.TokenCredential, autoRenew bool, parentTaskId string) error

func (*SNatGateway) StartSyncstatus

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

func (*SNatGateway) SyncNatGatewayEips

func (self *SNatGateway) SyncNatGatewayEips(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extEips []cloudprovider.ICloudEIP) compare.SyncResult

func (*SNatGateway) SyncWithCloudNatGateway

func (self *SNatGateway) SyncWithCloudNatGateway(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, extNat cloudprovider.ICloudNatGateway) error

func (*SNatGateway) ValidateDeleteCondition

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

type SNatGatewayManager

var NatGatewayManager *SNatGatewayManager

func (*SNatGatewayManager) DeleteExpiredPostpaids

func (manager *SNatGatewayManager) DeleteExpiredPostpaids(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SNatGatewayManager) FetchCustomizeColumns

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

func (*SNatGatewayManager) GetContextManagers

func (manager *SNatGatewayManager) GetContextManagers() [][]db.IModelManager

func (*SNatGatewayManager) ListItemFilter

NAT网关列表

func (*SNatGatewayManager) OrderByExtraFields

func (man *SNatGatewayManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NatGetewayListInput,
) (*sqlchemy.SQuery, error)

NAT网关列表

func (*SNatGatewayManager) QueryDistinctExtraField

func (man *SNatGatewayManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SNatGatewayManager) SyncNatGateways

func (*SNatGatewayManager) ValidateCreateData

type SNatSEntry

type SNatSEntry struct {
	SNatEntry
	SNetworkResourceBase

	IP         string `charset:"ascii" list:"user" create:"required"`
	SourceCIDR string `width:"22" charset:"ascii" list:"user" create:"optional"`
}

func (*SNatSEntry) CustomizeDelete

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

func (*SNatSEntry) GetCloudproviderId

func (self *SNatSEntry) GetCloudproviderId() string

func (*SNatSEntry) GetEip

func (self *SNatSEntry) GetEip() (*SElasticip, error)

func (*SNatSEntry) GetNetwork

func (self *SNatSEntry) GetNetwork() (*SNetwork, error)

func (*SNatSEntry) GetUniqValues

func (self *SNatSEntry) GetUniqValues() jsonutils.JSONObject

func (*SNatSEntry) PostCreate

func (*SNatSEntry) Purge

func (sn *SNatSEntry) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNatSEntry) StartDeleteSNatTask

func (self *SNatSEntry) StartDeleteSNatTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNatSEntry) SyncWithCloudNatSTable

func (self *SNatSEntry) SyncWithCloudNatSTable(ctx context.Context, userCred mcclient.TokenCredential, extEntry cloudprovider.ICloudNatSEntry, syncOwnerId mcclient.IIdentityProvider, managerId string) error

type SNatSEntryManager

type SNatSEntryManager struct {
	SNatEntryManager
	SNetworkResourceBaseManager
}
var NatSEntryManager *SNatSEntryManager

func (*SNatSEntryManager) FetchCustomizeColumns

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

func (*SNatSEntryManager) FetchUniqValues

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

func (*SNatSEntryManager) FilterByUniqValues

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

func (*SNatSEntryManager) ListItemFilter

func (man *SNatSEntryManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NatSEntryListInput,
) (*sqlchemy.SQuery, error)

NAT网关的源地址转换规则列表

func (*SNatSEntryManager) OrderByExtraFields

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

func (*SNatSEntryManager) QueryDistinctExtraField

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

func (*SNatSEntryManager) SyncNatSTable

func (manager *SNatSEntryManager) SyncNatSTable(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, nat *SNatGateway, extTable []cloudprovider.ICloudNatSEntry) compare.SyncResult

func (*SNatSEntryManager) ValidateCreateData

type SNatSku

type SNatSku struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase

	PrepaidStatus  string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"` // 预付费资源状态   available|soldout
	PostpaidStatus string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"admin_optional" update:"admin" default:"available"` // 按需付费资源状态  available|soldout

	Provider string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"admin_required" update:"admin"`
	ZoneIds  string `charset:"utf8" nullable:"true" list:"user" update:"admin" create:"admin_optional" json:"zone_ids"`
}

func (SNatSku) GetGlobalId

func (self SNatSku) GetGlobalId() string

type SNatSkuManager

var NatSkuManager *SNatSkuManager

func (*SNatSkuManager) FetchCustomizeColumns

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

func (*SNatSkuManager) GetPropertySyncTasks

func (manager *SNatSkuManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SNatSkuManager) ListItemExportKeys

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

func (*SNatSkuManager) ListItemFilter

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

func (*SNatSkuManager) OrderByExtraFields

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

func (*SNatSkuManager) PerformSyncSkus

func (manager *SNatSkuManager) PerformSyncSkus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SkuSyncInput) (jsonutils.JSONObject, error)

func (*SNatSkuManager) QueryDistinctExtraField

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

type SNatgatewayResourceBase

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

func (*SNatgatewayResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SNatgatewayResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SNatgatewayResourceBase) GetNatgateway

func (self *SNatgatewayResourceBase) GetNatgateway() (*SNatGateway, error)

func (*SNatgatewayResourceBase) GetVpc

func (self *SNatgatewayResourceBase) GetVpc() (*SVpc, error)

type SNatgatewayResourceBaseManager

type SNatgatewayResourceBaseManager struct {
	SVpcResourceBaseManager
}

func (*SNatgatewayResourceBaseManager) FetchCustomizeColumns

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

func (*SNatgatewayResourceBaseManager) GetOrderByFields

func (manager *SNatgatewayResourceBaseManager) GetOrderByFields(query api.NatGatewayFilterListInput) []string

func (*SNatgatewayResourceBaseManager) GetOrderBySubQuery

func (*SNatgatewayResourceBaseManager) ListItemFilter

func (*SNatgatewayResourceBaseManager) OrderByExtraFields

func (*SNatgatewayResourceBaseManager) QueryDistinctExtraField

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

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)
}

+onecloud:swagger-gen-ignore

func (*SNetInterface) GetBaremetal

func (netif *SNetInterface) GetBaremetal() *SHost

func (*SNetInterface) GetBaremetalNetwork

func (netif *SNetInterface) GetBaremetalNetwork() *SHostnetwork

func (*SNetInterface) GetCandidateNetworkForIp

func (self *SNetInterface) GetCandidateNetworkForIp(ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope, ipAddr string) (*SNetwork, error)

func (*SNetInterface) GetId

func (netif *SNetInterface) GetId() string

func (*SNetInterface) GetWire

func (netif *SNetInterface) GetWire() *SWire

func (*SNetInterface) IsUsableServernic

func (self *SNetInterface) IsUsableServernic() bool

func (*SNetInterface) Remove

func (self *SNetInterface) Remove(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetInterface) UnsetWire

func (netif *SNetInterface) UnsetWire() error

type SNetInterfaceManager

type SNetInterfaceManager struct {
	db.SModelBaseManager
}

+onecloud:swagger-gen-ignore

var NetInterfaceManager *SNetInterfaceManager

func (*SNetInterfaceManager) FetchByMac

func (manager *SNetInterfaceManager) FetchByMac(mac string) (*SNetInterface, error)

type SNetTapFlow

type SNetTapFlow struct {
	db.SEnabledStatusStandaloneResourceBase

	TapId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`

	Type string `width:"10" charset:"ascii" list:"admin" create:"admin_required"`

	SourceId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`

	NetId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`

	MacAddr string `width:"18" charset:"ascii" list:"admin" create:"admin_optional"`

	VlanId int `nullable:"true" list:"admin" create:"admin_optional"`

	Direction string `width:"6" charset:"ascii" list:"admin" create:"admin_required" default:"BOTH"`

	FlowId uint16 `nullable:"false" list:"admin"`
}

func (*SNetTapFlow) CustomizeCreate

func (tap *SNetTapFlow) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) error

type SNetTapFlowManager

type SNetTapFlowManager struct {
	db.SEnabledStatusStandaloneResourceBaseManager
}
var NetTapFlowManager *SNetTapFlowManager

func (*SNetTapFlowManager) FetchCustomizeColumns

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

func (*SNetTapFlowManager) ListItemFilter

func (*SNetTapFlowManager) OrderByExtraFields

func (man *SNetTapFlowManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NetTapFlowListInput,
) (*sqlchemy.SQuery, error)

func (*SNetTapFlowManager) QueryDistinctExtraField

func (man *SNetTapFlowManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SNetTapFlowManager) ValidateCreateData

type SNetTapService

type SNetTapService struct {
	db.SEnabledStatusStandaloneResourceBase

	// 流量采集端类型,虚拟机(guest)还是宿主机(host)
	Type string `width:"10" charset:"ascii" list:"admin" create:"admin_required"`
	// 接受流量的目标ID,如果type=host,是hostId,如果type=guest,是guestId
	TargetId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`
	// 接受流量的Mac地址
	MacAddr string `width:"18" charset:"ascii" list:"admin" create:"admin_optional"`
	// 网卡名称
	Ifname string `width:"16" charset:"ascii" nullable:"true" list:"admin"`
}

func (*SNetTapService) CustomizeCreate

func (tap *SNetTapService) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) error

func (*SNetTapService) PerformDisable

func (*SNetTapService) PerformEnable

func (*SNetTapService) ValidateDeleteCondition

func (srv *SNetTapService) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SNetTapServiceManager

type SNetTapServiceManager struct {
	db.SEnabledStatusStandaloneResourceBaseManager
}
var NetTapServiceManager *SNetTapServiceManager

func (*SNetTapServiceManager) FetchCustomizeColumns

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

func (*SNetTapServiceManager) FilterByMac

func (manager *SNetTapServiceManager) FilterByMac(mac string) *sqlchemy.SQuery

func (*SNetTapServiceManager) GenerateMac

func (manager *SNetTapServiceManager) GenerateMac(suggestion string) (string, error)

func (*SNetTapServiceManager) ListItemFilter

func (*SNetTapServiceManager) OrderByExtraFields

func (*SNetTapServiceManager) QueryDistinctExtraField

func (man *SNetTapServiceManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SNetTapServiceManager) ValidateCreateData

type SNetwork

type SNetwork struct {
	db.SSharableVirtualResourceBase
	db.SExternalizedResourceBase
	SWireResourceBase

	IfnameHint string `width:"9" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// 起始IP地址
	GuestIpStart string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`
	// 结束IP地址
	GuestIpEnd string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`
	// 掩码
	GuestIpMask int8 `nullable:"false" list:"user" update:"user" create:"required"`
	// 网关地址
	GuestGateway string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	// DNS, allow multiple dns, seperated by ","
	GuestDns string `width:"64" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	// allow multiple dhcp, seperated by ","
	GuestDhcp string `width:"64" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
	// allow mutiple ntp, seperated by ","
	GuestNtp string `width:"64" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	GuestDomain string `width:"128" charset:"ascii" nullable:"true" get:"user" update:"user"`

	GuestIp6Start string `width:"64" charset:"ascii" nullable:"true"`
	GuestIp6End   string `width:"64" charset:"ascii" nullable:"true"`
	GuestIp6Mask  int8   `nullable:"true"`
	GuestGateway6 string `width:"64" charset:"ascii" nullable:"true"`
	GuestDns6     string `width:"64" charset:"ascii" nullable:"true"`

	GuestDomain6 string `width:"128" charset:"ascii" nullable:"true"`

	VlanId int `nullable:"false" default:"1" list:"user" update:"user" create:"optional"`

	// 服务器类型
	// example: server
	ServerType string `width:"16" charset:"ascii" default:"guest" nullable:"true" list:"user" create:"optional"`

	// 分配策略
	AllocPolicy string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"`

	AllocTimoutSeconds int `default:"0" nullable:"true" get:"admin"`

	// 该网段是否用于自动分配IP地址,如果为false,则用户需要明确选择该网段,才会使用该网段分配IP,
	// 如果为true,则用户不指定网段时,则自动从该值为true的网络中选择一个分配地址
	IsAutoAlloc tristate.TriState `list:"user" get:"user" update:"user" create:"optional"`

	// 线路类型
	BgpType string `width:"64" charset:"utf8" nullable:"false" list:"user" get:"user" update:"user" create:"optional"`
}

func ChooseCandidateNetworks

func ChooseCandidateNetworks(nets []SNetwork, isExit bool, serverTypes []string) *SNetwork

func (*SNetwork) CheckInvalidToMerge

func (self *SNetwork) CheckInvalidToMerge(ctx context.Context, net *SNetwork, allNets []*SNetwork) (string, string, error)

func (*SNetwork) ClearSchedDescCache

func (network *SNetwork) ClearSchedDescCache() error

func (*SNetwork) Contains

func (self *SNetwork) Contains(ip string) bool

func (*SNetwork) CustomizeCreate

func (self *SNetwork) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, 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) Delete

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

func (*SNetwork) GetChangeOwnerCandidateDomainIds

func (net *SNetwork) GetChangeOwnerCandidateDomainIds() []string

func (*SNetwork) GetDBInstanceNetworks

func (self *SNetwork) GetDBInstanceNetworks() ([]SDBInstanceNetwork, error)

func (*SNetwork) GetDNS

func (self *SNetwork) GetDNS() string

func (*SNetwork) GetDetailsAddresses

func (network *SNetwork) GetDetailsAddresses(ctx context.Context, userCred mcclient.TokenCredential, input api.GetNetworkAddressesInput) (api.GetNetworkAddressesOutput, error)

func (*SNetwork) GetDetailsReservedIps

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

func (*SNetwork) GetDomain

func (self *SNetwork) GetDomain() string

func (*SNetwork) GetDynamicConditionInput

func (network *SNetwork) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SNetwork) GetFreeAddressCount

func (self *SNetwork) GetFreeAddressCount() (int, error)

func (*SNetwork) GetFreeIP

func (self *SNetwork) GetFreeIP(ctx context.Context, userCred mcclient.TokenCredential, addrTable map[string]bool, recentUsedAddrTable map[string]bool, candidate string, allocDir api.IPAllocationDirection, reserved bool) (string, error)

func (*SNetwork) GetFreeIPWithLock

func (self *SNetwork) GetFreeIPWithLock(ctx context.Context, userCred mcclient.TokenCredential, addrTable map[string]bool, recentUsedAddrTable map[string]bool, candidate string, allocDir api.IPAllocationDirection, reserved bool) (string, error)

func (*SNetwork) GetGuestIpv4StartAddress

func (self *SNetwork) GetGuestIpv4StartAddress() netutils.IPV4Addr

func (*SNetwork) GetGuestnetworks

func (self *SNetwork) GetGuestnetworks() ([]SGuestnetwork, error)

func (*SNetwork) GetINetwork

func (self *SNetwork) GetINetwork(ctx context.Context) (cloudprovider.ICloudNetwork, error)

func (*SNetwork) GetIPRange

func (self *SNetwork) GetIPRange() netutils.IPV4AddrRange

func (*SNetwork) GetNTP

func (self *SNetwork) GetNTP() string

func (*SNetwork) GetNetAddr

func (self *SNetwork) GetNetAddr() netutils.IPV4Addr

func (*SNetwork) GetNetworkInterfaces

func (self *SNetwork) GetNetworkInterfaces() ([]SNetworkInterface, error)

func (*SNetwork) GetPorts

func (self *SNetwork) GetPorts() int

func (*SNetwork) GetPrefix

func (self *SNetwork) GetPrefix() (netutils.IPV4Prefix, error)

func (*SNetwork) GetRegionalQuotaKeys

func (net *SNetwork) GetRegionalQuotaKeys(ownerId mcclient.IIdentityProvider) (quotas.IQuotaKeys, error)

func (*SNetwork) GetRoutes

func (self *SNetwork) GetRoutes() [][]string

func (*SNetwork) GetSchedtagJointManager

func (network *SNetwork) GetSchedtagJointManager() ISchedtagJointManager

func (*SNetwork) GetSchedtags

func (network *SNetwork) GetSchedtags() []SSchedtag

func (*SNetwork) GetTotalAddressCount

func (self *SNetwork) GetTotalAddressCount() int

func (*SNetwork) GetUsedAddresses

func (self *SNetwork) GetUsedAddresses() map[string]bool

func (*SNetwork) IsAddressInRange

func (self *SNetwork) IsAddressInRange(address netutils.IPV4Addr) bool

func (*SNetwork) IsClassic

func (net *SNetwork) IsClassic() bool

func (*SNetwork) IsExitNetwork

func (self *SNetwork) IsExitNetwork() bool

func (*SNetwork) IsManaged

func (self *SNetwork) IsManaged() bool

func (*SNetwork) MergeToNetworkAfterCheck

func (self *SNetwork) MergeToNetworkAfterCheck(ctx context.Context, userCred mcclient.TokenCredential, net *SNetwork, startIp string, endIp string) error

func (*SNetwork) PerformChangeOwner

func (*SNetwork) PerformMerge

func (self *SNetwork) PerformMerge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkMergeInput) (jsonutils.JSONObject, error)

合并IP子网 将两个相连的IP子网合并成一个IP子网

func (*SNetwork) PerformPurge

func (self *SNetwork) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkPurgeInput) (jsonutils.JSONObject, error)

清除IP子网数据 要求IP子网内没有被分配IP,若清除接入云,要求接入云账号处于禁用状态

func (*SNetwork) PerformReleaseReservedIp

func (self *SNetwork) PerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkReleaseReservedIpInput) (jsonutils.JSONObject, error)

释放预留IP

func (*SNetwork) PerformReserveIp

func (self *SNetwork) PerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkReserveIpInput) (jsonutils.JSONObject, error)

预留IP 预留的IP不会被调度使用

func (*SNetwork) PerformSetBgpType

func (self *SNetwork) PerformSetBgpType(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkSetBgpTypeInput) (jsonutils.JSONObject, error)

func (*SNetwork) PerformSetSchedtag

func (network *SNetwork) PerformSetSchedtag(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNetwork) PerformSplit

func (self *SNetwork) PerformSplit(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkSplitInput) (jsonutils.JSONObject, error)

分割IP子网 将一个IP子网分割成两个子网,仅本地IDC支持此操作

func (*SNetwork) PerformStatus

更改IP子网状态

func (*SNetwork) PerformSync

同步接入云IP子网状态 本地IDC不支持此操作

func (*SNetwork) PerformSyncstatus

func (net *SNetwork) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkSyncInput) (jsonutils.JSONObject, error)

同步接入云IP子网状态 本地IDC不支持此操作

func (*SNetwork) PostCreate

func (self *SNetwork) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SNetwork) PostUpdate

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

func (*SNetwork) RealDelete

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

func (*SNetwork) StartDeleteNetworkTask

func (self *SNetwork) StartDeleteNetworkTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetwork) SyncWithCloudNetwork

func (self *SNetwork) SyncWithCloudNetwork(ctx context.Context, userCred mcclient.TokenCredential, extNet cloudprovider.ICloudNetwork, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

func (*SNetwork) UpdateBaremetalNetmap

func (self *SNetwork) UpdateBaremetalNetmap(nic *SHostnetwork, name string)

func (*SNetwork) UpdateNetmap

func (self *SNetwork) UpdateNetmap(ip, project, name string)

func (*SNetwork) ValidateDeleteCondition

func (self *SNetwork) ValidateDeleteCondition(ctx context.Context, data *api.NetworkDetails) error

func (*SNetwork) ValidateElbNetwork

func (self *SNetwork) ValidateElbNetwork(ipAddr net.IP) (*SCloudregion, *SZone, *SVpc, *SWire, error)

验证elb network可用,并返回关联的region, zone,vpc, wire

func (*SNetwork) ValidateUpdateCondition

func (self *SNetwork) ValidateUpdateCondition(ctx context.Context) error

func (*SNetwork) ValidateUpdateData

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

type SNetworkAddress

type SNetworkAddress struct {
	db.SStandaloneAnonResourceBase

	Type       string `width:"16" charset:"ascii" list:"user" create:"required"`
	ParentType string `width:"16" charset:"ascii" list:"user" create:"required"`
	ParentId   string `width:"16" charset:"ascii" list:"user" create:"optional"`
	SNetworkResourceBase
	IpAddr string `width:"16" charset:"ascii" list:"user" create:"optional"`

	SubCtrVid int `create:"optional"`
}

func (*SNetworkAddress) CustomizeCreate

func (*SNetworkAddress) CustomizeDelete

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

type SNetworkAddressManager

type SNetworkAddressManager struct {
	db.SStandaloneAnonResourceBaseManager
	SNetworkResourceBaseManager
	// contains filtered or unexported fields
}
var NetworkAddressManager *SNetworkAddressManager

func (*SNetworkAddressManager) BatchPreValidate

func (man *SNetworkAddressManager) BatchPreValidate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict, count int) error

func (*SNetworkAddressManager) FetchCustomizeColumns

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

func (*SNetworkAddressManager) FilterByOwner

func (*SNetworkAddressManager) InitializeData

func (man *SNetworkAddressManager) InitializeData() error

func (*SNetworkAddressManager) ListItemExportKeys

func (*SNetworkAddressManager) ListItemFilter

func (*SNetworkAddressManager) OrderByExtraFields

func (man *SNetworkAddressManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.NetworkAddressListInput,
) (retq *sqlchemy.SQuery, err error)

func (*SNetworkAddressManager) QueryDistinctExtraField

func (man *SNetworkAddressManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SNetworkInterface

type SNetworkInterface struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase

	// MAC地址
	Mac string `width:"36" charset:"ascii" list:"user"`
	// 绑定资源类型
	AssociateType string `width:"36" charset:"ascii" list:"user" nullable:"true" create:"optional"`
	// 绑定资源Id
	AssociateId string `width:"36" charset:"ascii" list:"user"`
}

func (*SNetworkInterface) Associate

func (self *SNetworkInterface) Associate(associateId string) error

func (*SNetworkInterface) GetNetworks

func (self *SNetworkInterface) GetNetworks() ([]SNetworkinterfacenetwork, error)

func (*SNetworkInterface) SyncWithCloudNetworkInterface

func (self *SNetworkInterface) SyncWithCloudNetworkInterface(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, ext cloudprovider.ICloudNetworkInterface) error

type SNetworkInterfaceManager

var NetworkInterfaceManager *SNetworkInterfaceManager

func (*SNetworkInterfaceManager) FetchCustomizeColumns

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

func (*SNetworkInterfaceManager) GetContextManagers

func (manager *SNetworkInterfaceManager) GetContextManagers() [][]db.IModelManager

func (*SNetworkInterfaceManager) ListItemExportKeys

func (*SNetworkInterfaceManager) ListItemFilter

虚拟网卡列表

func (*SNetworkInterfaceManager) OrderByExtraFields

func (*SNetworkInterfaceManager) QueryDistinctExtraField

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

type SNetworkManager

var NetworkManager *SNetworkManager

func GetNetworkManager

func GetNetworkManager() *SNetworkManager

func (*SNetworkManager) AllowScope

func (manager *SNetworkManager) AllowScope(userCred mcclient.TokenCredential) rbacutils.TRbacScope

func (*SNetworkManager) FetchCustomizeColumns

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

func (*SNetworkManager) GetContextManagers

func (manager *SNetworkManager) GetContextManagers() [][]db.IModelManager

func (*SNetworkManager) GetOnPremiseNetworkOfIP

func (manager *SNetworkManager) GetOnPremiseNetworkOfIP(ipAddr string, serverType string, isPublic tristate.TriState) (*SNetwork, error)

func (*SNetworkManager) GetOrCreateClassicNetwork

func (manager *SNetworkManager) GetOrCreateClassicNetwork(ctx context.Context, wire *SWire) (*SNetwork, error)

func (*SNetworkManager) GetTotalNicCount

func (manager *SNetworkManager) GetTotalNicCount(netIds []string) (map[string]int, error)

func (*SNetworkManager) InitializeData

func (manager *SNetworkManager) InitializeData() error

func (*SNetworkManager) ListItemExportKeys

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

func (*SNetworkManager) ListItemFilter

func (manager *SNetworkManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.NetworkListInput,
) (*sqlchemy.SQuery, error)

IP子网列表

func (*SNetworkManager) NewIfnameHint

func (manager *SNetworkManager) NewIfnameHint(hint string) (string, error)

func (*SNetworkManager) OrderByExtraFields

func (manager *SNetworkManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.NetworkListInput,
) (*sqlchemy.SQuery, error)

func (*SNetworkManager) PerformTryCreateNetwork

func (manager *SNetworkManager) PerformTryCreateNetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.NetworkTryCreateNetworkInput) (jsonutils.JSONObject, error)

func (*SNetworkManager) QueryDistinctExtraField

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

func (*SNetworkManager) SyncNetworks

func (*SNetworkManager) TotalNicCount

func (nm *SNetworkManager) TotalNicCount(netIds []string) (map[string]api.SNetworkNics, error)

func (*SNetworkManager) TotalPortCount

func (manager *SNetworkManager) TotalPortCount(
	scope rbacutils.TRbacScope,
	userCred mcclient.IIdentityProvider,
	providers []string, brands []string, cloudEnv string,
	rangeObjs []db.IStandaloneModel,
	policyResult rbacutils.SPolicyResult,
) map[string]NetworkPortStat

func (*SNetworkManager) ValidateCreateData

type SNetworkNics

type SNetworkNics struct {
	Id string
	api.SNetworkNics
}

type SNetworkResourceBase

type SNetworkResourceBase struct {
	NetworkId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"network_id"`
}

func (*SNetworkResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SNetworkResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SNetworkResourceBase) GetNetwork

func (self *SNetworkResourceBase) GetNetwork() (*SNetwork, error)

func (*SNetworkResourceBase) GetRegion

func (self *SNetworkResourceBase) GetRegion() (*SCloudregion, error)

func (*SNetworkResourceBase) GetVpc

func (self *SNetworkResourceBase) GetVpc() (*SVpc, error)

func (*SNetworkResourceBase) GetWire

func (self *SNetworkResourceBase) GetWire() (*SWire, error)

func (*SNetworkResourceBase) GetZone

func (self *SNetworkResourceBase) GetZone() (*SZone, error)

type SNetworkResourceBaseManager

type SNetworkResourceBaseManager struct {
	SWireResourceBaseManager
}

func (*SNetworkResourceBaseManager) FetchCustomizeColumns

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

func (*SNetworkResourceBaseManager) GetExportKeys

func (manager *SNetworkResourceBaseManager) GetExportKeys() []string

func (*SNetworkResourceBaseManager) GetOrderByFields

func (manager *SNetworkResourceBaseManager) GetOrderByFields(query api.NetworkFilterListInput) []string

func (*SNetworkResourceBaseManager) GetOrderBySubQuery

func (manager *SNetworkResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.NetworkFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SNetworkResourceBaseManager) ListItemExportKeys

func (*SNetworkResourceBaseManager) ListItemFilter

func (*SNetworkResourceBaseManager) OrderByExtraFields

func (*SNetworkResourceBaseManager) QueryDistinctExtraField

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

type SNetworkUsedAddressList

type SNetworkUsedAddressList []api.SNetworkUsedAddress

func (SNetworkUsedAddressList) Len

func (a SNetworkUsedAddressList) Len() int

func (SNetworkUsedAddressList) Less

func (a SNetworkUsedAddressList) Less(i, j int) bool

func (SNetworkUsedAddressList) Swap

func (a SNetworkUsedAddressList) Swap(i, j int)

type SNetworkinterfacenetwork

type SNetworkinterfacenetwork struct {
	db.SJointResourceBase

	Primary            bool   `nullable:"false" list:"user"`
	IpAddr             string `width:"16" charset:"ascii" nullable:"false" list:"user"`
	NetworkinterfaceId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	NetworkId          string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SNetworkinterfacenetwork) Delete

func (*SNetworkinterfacenetwork) Detach

func (*SNetworkinterfacenetwork) GetDetailJson

func (self *SNetworkinterfacenetwork) GetDetailJson() (jsonutils.JSONObject, error)

func (*SNetworkinterfacenetwork) GetNetwork

func (self *SNetworkinterfacenetwork) GetNetwork() (*SNetwork, error)

func (*SNetworkinterfacenetwork) SyncWithCloudkInterfaceAddress

func (self *SNetworkinterfacenetwork) SyncWithCloudkInterfaceAddress(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudInterfaceAddress) error

type SNetworkinterfacenetworkManager

type SNetworkinterfacenetworkManager struct {
	db.SJointResourceBaseManager
}
var NetworkinterfacenetworkManager *SNetworkinterfacenetworkManager

func (*SNetworkinterfacenetworkManager) GetMasterFieldName

func (manager *SNetworkinterfacenetworkManager) GetMasterFieldName() string

func (*SNetworkinterfacenetworkManager) GetSlaveFieldName

func (manager *SNetworkinterfacenetworkManager) GetSlaveFieldName() string

func (*SNetworkinterfacenetworkManager) InitializeData

func (manager *SNetworkinterfacenetworkManager) InitializeData() error

func (*SNetworkinterfacenetworkManager) SyncInterfaceAddresses

func (manager *SNetworkinterfacenetworkManager) SyncInterfaceAddresses(ctx context.Context, userCred mcclient.TokenCredential, networkinterface *SNetworkInterface, exts []cloudprovider.ICloudInterfaceAddress) compare.SyncResult

type SNetworkschedtag

type SNetworkschedtag struct {
	SSchedtagJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SNetworkschedtag) Delete

func (s *SNetworkschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetworkschedtag) Detach

func (s *SNetworkschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetworkschedtag) GetDetails

func (s *SNetworkschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SNetworkschedtag) GetResourceId

func (s *SNetworkschedtag) GetResourceId() string

type SNetworkschedtagManager

type SNetworkschedtagManager struct {
	*SSchedtagJointsManager
	// contains filtered or unexported fields
}
var (
	NetworkschedtagManager *SNetworkschedtagManager
)

func (*SNetworkschedtagManager) GetMasterFieldName

func (manager *SNetworkschedtagManager) GetMasterFieldName() string

func (*SNetworkschedtagManager) ListItemFilter

func (*SNetworkschedtagManager) OrderByExtraFields

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

type SNicConfig

type SNicConfig struct {
	Mac    string
	Index  int8
	Ifname string
}

type SOpenstackCachedLb

type SOpenstackCachedLb struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	BackendServerId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 后端服务器 实例ID
	BackendId            string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 本地loadbalancebackend id
	CachedBackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SOpenstackCachedLb) GetCachedBackendGroup

func (lbb *SOpenstackCachedLb) GetCachedBackendGroup() (*SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLb) SyncWithCloudLoadbalancerBackend

func (lbb *SOpenstackCachedLb) SyncWithCloudLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) error

type SOpenstackCachedLbManager

type SOpenstackCachedLbManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var OpenstackCachedLbManager *SOpenstackCachedLbManager

func (*SOpenstackCachedLbManager) CreateOpenstackCachedLb

func (*SOpenstackCachedLbManager) GetBackendsByLocalBackendId

func (man *SOpenstackCachedLbManager) GetBackendsByLocalBackendId(backendId string) ([]SOpenstackCachedLb, error)

func (*SOpenstackCachedLbManager) GetResourceCount

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

func (*SOpenstackCachedLbManager) SyncLoadbalancerBackends

func (man *SOpenstackCachedLbManager) SyncLoadbalancerBackends(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, loadbalancerBackendgroup *SOpenstackCachedLbbg, lbbs []cloudprovider.ICloudLoadbalancerBackend, syncRange *SSyncRange) compare.SyncResult

type SOpenstackCachedLbbg

type SOpenstackCachedLbbg struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	AssociatedId   string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`  // 关联ID
	AssociatedType string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`  // 关联类型, listener || rule
	ProtocolType   string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"` // 监听协议类型
}

func (*SOpenstackCachedLbbg) GetCachedBackends

func (lbbg *SOpenstackCachedLbbg) GetCachedBackends() ([]SOpenstackCachedLb, error)

func (*SOpenstackCachedLbbg) GetICloudLoadbalancerBackendGroup

func (lbbg *SOpenstackCachedLbbg) GetICloudLoadbalancerBackendGroup(ctx context.Context) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SOpenstackCachedLbbg) GetLoadbalancer

func (lbbg *SOpenstackCachedLbbg) GetLoadbalancer() (*SLoadbalancer, error)

func (*SOpenstackCachedLbbg) GetLocalBackendGroup

func (lbbg *SOpenstackCachedLbbg) GetLocalBackendGroup(ctx context.Context, userCred mcclient.TokenCredential) (*SLoadbalancerBackendGroup, error)

func (*SOpenstackCachedLbbg) SyncWithCloudLoadbalancerBackendgroup

func (lbbg *SOpenstackCachedLbbg) SyncWithCloudLoadbalancerBackendgroup(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, extLoadbalancerBackendgroup cloudprovider.ICloudLoadbalancerBackendGroup, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

type SOpenstackCachedLbbgManager

type SOpenstackCachedLbbgManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var OpenstackCachedLbbgManager *SOpenstackCachedLbbgManager

func (*SOpenstackCachedLbbgManager) GetCachedBackendGroupByAssociateId

func (man *SOpenstackCachedLbbgManager) GetCachedBackendGroupByAssociateId(associateId string) (*SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLbbgManager) GetCachedBackendGroups

func (man *SOpenstackCachedLbbgManager) GetCachedBackendGroups(backendGroupId string) ([]SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLbbgManager) GetListenerCachedBackendGroups

func (man *SOpenstackCachedLbbgManager) GetListenerCachedBackendGroups(listenerId string) ([]SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLbbgManager) GetListenerRuleCachedBackendGroups

func (man *SOpenstackCachedLbbgManager) GetListenerRuleCachedBackendGroups(listenerRuleId string) ([]SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLbbgManager) GetResourceCount

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

func (*SOpenstackCachedLbbgManager) GetUsableCachedBackendGroup

func (man *SOpenstackCachedLbbgManager) GetUsableCachedBackendGroup(backendGroupId string, protocolType string) (*SOpenstackCachedLbbg, error)

func (*SOpenstackCachedLbbgManager) GetUsableCachedBackendGroups

func (man *SOpenstackCachedLbbgManager) GetUsableCachedBackendGroups(backendGroupId string, protocolType string) ([]SOpenstackCachedLbbg, error)

type SPolicyAssignmentManager

var PolicyAssignmentManager *SPolicyAssignmentManager

func (*SPolicyAssignmentManager) FetchCustomizeColumns

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

func (*SPolicyAssignmentManager) ListItemFilter

策略分配列表

func (*SPolicyAssignmentManager) OrderByExtraFields

func (*SPolicyAssignmentManager) QueryDistinctExtraField

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

type SPolicyDefinition

type SPolicyDefinition struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	// 参数
	Parameters *jsonutils.JSONDict `get:"domain" list:"domain" create:"admin_optional"`

	// 条件
	Condition string `width:"32" charset:"ascii" nullable:"false" get:"domain" list:"domain" create:"required"`
	// 类别
	Category string `width:"16" charset:"ascii" nullable:"false" get:"domain" list:"domain" create:"required"`
}

func (*SPolicyDefinition) GetPolicyAssignments

func (self *SPolicyDefinition) GetPolicyAssignments() ([]SPolicyAssignment, error)

type SPolicyDefinitionManager

var PolicyDefinitionManager *SPolicyDefinitionManager

func (*SPolicyDefinitionManager) FetchCustomizeColumns

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

func (*SPolicyDefinitionManager) GetAvailablePolicyDefinitions

func (manager *SPolicyDefinitionManager) GetAvailablePolicyDefinitions(ctx context.Context, userCred mcclient.TokenCredential) ([]SPolicyDefinition, error)

func (*SPolicyDefinitionManager) ListItemFilter

策略列表

func (*SPolicyDefinitionManager) OrderByExtraFields

func (*SPolicyDefinitionManager) QueryDistinctExtraField

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

type SPolicyDefinitionResourceBase

type SPolicyDefinitionResourceBase struct {
	// 策略Id
	PolicydefinitionId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

type SPolicyDefinitionResourceBaseManager

type SPolicyDefinitionResourceBaseManager struct {
}

func (*SPolicyDefinitionResourceBaseManager) FetchCustomizeColumns

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

func (*SPolicyDefinitionResourceBaseManager) ListItemFilter

type SProjectMapping

type SProjectMapping struct {
	db.SEnabledStatusInfrasResourceBase

	Rules *api.MappingRules `list:"domain" update:"domain" create:"required"`
}

func GetRuleMapping

func GetRuleMapping(id string) (*SProjectMapping, error)

func (*SProjectMapping) Delete

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

func (*SProjectMapping) GetCloudaccounts

func (self *SProjectMapping) GetCloudaccounts() ([]SCloudaccount, error)

func (*SProjectMapping) GetCloudproviders

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

func (*SProjectMapping) PerformDisable

禁用资源映射

func (*SProjectMapping) PerformEnable

启用资源映射

func (*SProjectMapping) PostCreate

func (*SProjectMapping) PostUpdate

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

func (*SProjectMapping) ValidateDeleteCondition

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

func (*SProjectMapping) ValidateUpdateData

type SProjectMappingManager

type SProjectMappingManager struct {
	db.SEnabledStatusInfrasResourceBaseManager
}
var ProjectMappingManager *SProjectMappingManager

func (*SProjectMappingManager) FetchCustomizeColumns

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

func (*SProjectMappingManager) ListItemExportKeys

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

func (*SProjectMappingManager) ListItemFilter

列出项目映射表

func (*SProjectMappingManager) OrderByExtraFields

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

func (*SProjectMappingManager) QueryDistinctExtraField

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

func (*SProjectMappingManager) ValidateCreateData

type SProjectMappingResourceBase

type SProjectMappingResourceBase struct {
	ProjectMappingId string `width:"36" charset:"ascii" nullable:"false" create:"optional" index:"true" list:"user" json:"project_mapping_id"`
}

func (*SProjectMappingResourceBase) GetProjectMapping

func (self *SProjectMappingResourceBase) GetProjectMapping() (*SProjectMapping, error)

type SProjectMappingResourceBaseManager

type SProjectMappingResourceBaseManager struct{}

func (*SProjectMappingResourceBaseManager) FetchCustomizeColumns

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

func (*SProjectMappingResourceBaseManager) GetExportKeys

func (manager *SProjectMappingResourceBaseManager) GetExportKeys() []string

func (*SProjectMappingResourceBaseManager) GetOrderByFields

func (*SProjectMappingResourceBaseManager) GetOrderBySubQuery

func (*SProjectMappingResourceBaseManager) ListItemExportKeys

func (*SProjectMappingResourceBaseManager) ListItemFilter

func (*SProjectMappingResourceBaseManager) OrderByExtraFields

func (*SProjectMappingResourceBaseManager) QueryDistinctExtraField

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

type SProjectQuota

type SProjectQuota struct {
	quotas.SQuotaBase

	quotas.SBaseProjectQuotaKeys

	Secgroup int `default:"-1" allow_zero:"true" json:"secgroup"`
}

func (*SProjectQuota) Add

func (self *SProjectQuota) Add(quota quotas.IQuota)

func (*SProjectQuota) Allocable

func (self *SProjectQuota) Allocable(request quotas.IQuota) int

func (*SProjectQuota) Exceed

func (used *SProjectQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SProjectQuota) FetchSystemQuota

func (self *SProjectQuota) FetchSystemQuota()

func (*SProjectQuota) FetchUsage

func (self *SProjectQuota) FetchUsage(ctx context.Context) error

func (*SProjectQuota) GetKeys

func (self *SProjectQuota) GetKeys() quotas.IQuotaKeys

func (*SProjectQuota) IsEmpty

func (self *SProjectQuota) IsEmpty() bool

func (*SProjectQuota) ResetNegative

func (self *SProjectQuota) ResetNegative()

func (*SProjectQuota) SetKeys

func (self *SProjectQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SProjectQuota) Sub

func (self *SProjectQuota) Sub(quota quotas.IQuota)

func (*SProjectQuota) ToJSON

func (self *SProjectQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SProjectQuota) Update

func (self *SProjectQuota) Update(quota quotas.IQuota)

type SProjectQuotaDetail

type SProjectQuotaDetail struct {
	SProjectQuota

	quotas.SBaseProjectQuotaDetailKeys
}

项目配额详情

func GetProjectQuota

func GetProjectQuota(query quotas.SBaseQuotaQueryInput) *SProjectQuotaDetail

获取指定项目或者域的项目配额

func ListProjectQuotas

func ListProjectQuotas(query quotas.SBaseQuotaQueryInput) *SProjectQuotaDetail

获取所有项目或者域的项目配额

func SetProjectQuotas

func SetProjectQuotas(input SetProjectQuotaInput) *SProjectQuotaDetail

设置指定项目或者域的项目配额

type SQcloudCachedLb

type SQcloudCachedLb struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	BackendServerId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 后端服务器 实例ID
	BackendId            string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 本地loadbalancebackend id
	CachedBackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SQcloudCachedLb) GetCachedBackendGroup

func (lbb *SQcloudCachedLb) GetCachedBackendGroup() (*SQcloudCachedLbbg, error)

func (*SQcloudCachedLb) SyncWithCloudLoadbalancerBackend

func (lbb *SQcloudCachedLb) SyncWithCloudLoadbalancerBackend(ctx context.Context, userCred mcclient.TokenCredential, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) error

type SQcloudCachedLbManager

type SQcloudCachedLbManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var QcloudCachedLbManager *SQcloudCachedLbManager

func (*SQcloudCachedLbManager) CreateQcloudCachedLb

func (man *SQcloudCachedLbManager) CreateQcloudCachedLb(ctx context.Context, userCred mcclient.TokenCredential, lbb *SLoadbalancerBackend, cachedLbbg *SQcloudCachedLbbg, extLoadbalancerBackend cloudprovider.ICloudLoadbalancerBackend, syncOwnerId mcclient.IIdentityProvider) (*SQcloudCachedLb, error)

func (*SQcloudCachedLbManager) GetBackendsByLocalBackendId

func (man *SQcloudCachedLbManager) GetBackendsByLocalBackendId(backendId string) ([]SQcloudCachedLb, error)

func (*SQcloudCachedLbManager) GetResourceCount

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

func (*SQcloudCachedLbManager) SyncLoadbalancerBackends

func (man *SQcloudCachedLbManager) SyncLoadbalancerBackends(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, loadbalancerBackendgroup *SQcloudCachedLbbg, lbbs []cloudprovider.ICloudLoadbalancerBackend, syncRange *SSyncRange) compare.SyncResult

type SQcloudCachedLbbg

type SQcloudCachedLbbg struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	BackendGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	AssociatedId   string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 关联ID
	AssociatedType string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // 关联类型, listener || rule
}

func (*SQcloudCachedLbbg) GetCachedBackends

func (lbbg *SQcloudCachedLbbg) GetCachedBackends() ([]SQcloudCachedLb, error)

func (*SQcloudCachedLbbg) GetCustomizeColumns

func (*SQcloudCachedLbbg) GetICloudLoadbalancerBackendGroup

func (lbbg *SQcloudCachedLbbg) GetICloudLoadbalancerBackendGroup(ctx context.Context) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SQcloudCachedLbbg) GetLoadbalancer

func (lbbg *SQcloudCachedLbbg) GetLoadbalancer() *SLoadbalancer

func (*SQcloudCachedLbbg) GetLocalBackendGroup

func (lbbg *SQcloudCachedLbbg) GetLocalBackendGroup(ctx context.Context, userCred mcclient.TokenCredential) (*SLoadbalancerBackendGroup, error)

func (*SQcloudCachedLbbg) SyncWithCloudLoadbalancerBackendgroup

func (lbbg *SQcloudCachedLbbg) SyncWithCloudLoadbalancerBackendgroup(ctx context.Context, userCred mcclient.TokenCredential, lb *SLoadbalancer, extLoadbalancerBackendgroup cloudprovider.ICloudLoadbalancerBackendGroup, syncOwnerId mcclient.IIdentityProvider, provider *SCloudprovider) error

type SQcloudCachedLbbgManager

type SQcloudCachedLbbgManager struct {
	SLoadbalancerLogSkipper
	db.SVirtualResourceBaseManager
}

+onecloud:swagger-gen-ignore

var QcloudCachedLbbgManager *SQcloudCachedLbbgManager

func (*SQcloudCachedLbbgManager) GetCachedBackendGroupByAssociateId

func (man *SQcloudCachedLbbgManager) GetCachedBackendGroupByAssociateId(associateId string) (*SQcloudCachedLbbg, error)

func (*SQcloudCachedLbbgManager) GetCachedBackendGroups

func (man *SQcloudCachedLbbgManager) GetCachedBackendGroups(backendGroupId string) ([]SQcloudCachedLbbg, error)

func (*SQcloudCachedLbbgManager) GetResourceCount

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

type SQuota

type SQuota struct {
	quotas.SQuotaBase

	SComputeResourceKeys

	// 主机数量配额
	Count int `default:"-1" allow_zero:"true" json:"count"`
	// 主机CPU核数量配额
	Cpu int `default:"-1" allow_zero:"true" json:"cpu"`
	// 主机内存容量配额
	Memory int `default:"-1" allow_zero:"true" json:"memory"`
	// 主机存储容量配额
	Storage int `default:"-1" allow_zero:"true" json:"storage"`

	// 主机组配额
	Group int `default:"-1" allow_zero:"true" json:"group"`
	// 直通设备(GPU)配额
	IsolatedDevice int `default:"-1" allow_zero:"true" json:"isolated_device"`
}

func (*SQuota) Add

func (self *SQuota) Add(quota quotas.IQuota)

func (*SQuota) Allocable

func (self *SQuota) Allocable(request quotas.IQuota) int

func (*SQuota) Exceed

func (used *SQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SQuota) FetchSystemQuota

func (self *SQuota) FetchSystemQuota()

func (*SQuota) FetchUsage

func (self *SQuota) FetchUsage(ctx context.Context) error

func (*SQuota) GetKeys

func (self *SQuota) GetKeys() quotas.IQuotaKeys

func (*SQuota) IsEmpty

func (self *SQuota) IsEmpty() bool

func (*SQuota) ResetNegative

func (self *SQuota) ResetNegative()

func (*SQuota) SetKeys

func (self *SQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SQuota) Sub

func (self *SQuota) Sub(quota quotas.IQuota)

func (*SQuota) ToJSON

func (self *SQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SQuota) Update

func (self *SQuota) Update(quota quotas.IQuota)

type SQuotaDetail

type SQuotaDetail struct {
	SQuota

	quotas.SZonalCloudResourceDetailKeys
}

主机配额详情

func GetQuota

func GetQuota(query quotas.SBaseQuotaQueryInput) *SQuotaDetail

获取指定项目或者域的主机配额

func ListQuotas

func ListQuotas(query quotas.SBaseQuotaQueryInput) *SQuotaDetail

获取所有项目或者域的主机配额

func SetQuotas

func SetQuotas(input SetQuotaInput) *SQuotaDetail

设置指定项目或者域的主机配额

type SQuotaManager

type SQuotaManager struct {
	quotas.SQuotaBaseManager
}

func (*SQuotaManager) FetchIdNames

func (manager *SQuotaManager) FetchIdNames(ctx context.Context, idMap map[string]map[string]string) (map[string]map[string]string, error)

type SRdsCountStat

type SRdsCountStat struct {
	TotalRdsCount       int
	TotalCpuCount       int
	TotalMemSizeMb      int
	TotalDiskSizeGb     int
	TotalDiskSizeUsedMb int
	DiskUsedRate        float64
}

type SRegionQuota

type SRegionQuota struct {
	quotas.SQuotaBase

	quotas.SRegionalCloudResourceKeys

	Eip   int `default:"-1" allow_zero:"true" json:"eip"`
	Port  int `default:"-1" allow_zero:"true" json:"port"`
	Eport int `default:"-1" allow_zero:"true" json:"eport"`

	Snapshot         int `default:"-1" allow_zero:"true" json:"snapshot"`
	InstanceSnapshot int `default:"-1" allow_zero:"true" json:"instance_snapshot"`

	Bucket    int `default:"-1" allow_zero:"true" json:"bucket"`
	ObjectGB  int `default:"-1" allow_zero:"true" json:"object_gb"`
	ObjectCnt int `default:"-1" allow_zero:"true" json:"object_cnt"`

	Rds     int `default:"-1" allow_zero:"true" json:"rds"`
	Cache   int `default:"-1" allow_zero:"true" json:"cache"`
	Mongodb int `default:"-1" allow_zero:"true" json:"mongodb"`

	Loadbalancer int `default:"-1" allow_zero:"true" json:"loadbalancer"`
}

func (*SRegionQuota) Add

func (self *SRegionQuota) Add(quota quotas.IQuota)

func (*SRegionQuota) Allocable

func (self *SRegionQuota) Allocable(request quotas.IQuota) int

func (*SRegionQuota) Exceed

func (used *SRegionQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SRegionQuota) FetchSystemQuota

func (self *SRegionQuota) FetchSystemQuota()

func (*SRegionQuota) FetchUsage

func (self *SRegionQuota) FetchUsage(ctx context.Context) error

func (*SRegionQuota) GetKeys

func (self *SRegionQuota) GetKeys() quotas.IQuotaKeys

func (*SRegionQuota) IsEmpty

func (self *SRegionQuota) IsEmpty() bool

func (*SRegionQuota) ResetNegative

func (self *SRegionQuota) ResetNegative()

func (*SRegionQuota) SetKeys

func (self *SRegionQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SRegionQuota) Sub

func (self *SRegionQuota) Sub(quota quotas.IQuota)

func (*SRegionQuota) ToJSON

func (self *SRegionQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SRegionQuota) Update

func (self *SRegionQuota) Update(quota quotas.IQuota)

type SRegionQuotaDetail

type SRegionQuotaDetail struct {
	SRegionQuota

	quotas.SRegionalCloudResourceDetailKeys
}

区域配额详情

func GetRegionQuota

func GetRegionQuota(query quotas.SBaseQuotaQueryInput) *SRegionQuotaDetail

获取指定项目或者域的区域配额

func ListRegionQuotas

func ListRegionQuotas(query quotas.SBaseQuotaQueryInput) *SRegionQuotaDetail

获取所有项目或者域的区域配额

func SetRegionQuotas

func SetRegionQuotas(input SetRegionQuotaInput) *SRegionQuotaDetail

设置指定项目或者域的区域配额

type SReservedip

type SReservedip struct {
	db.SResourceBase
	SNetworkResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user"`

	// 自增Id
	Id int64 `primary:"true" auto_increment:"true" list:"user"`

	// IP地址
	IpAddr string `width:"16" charset:"ascii" list:"user"`

	// 预留原因或描述
	Notes string `width:"512" charset:"utf8" nullable:"true" list:"user" update:"user"`

	// 过期时间
	ExpiredAt time.Time `nullable:"true" list:"user"`

	// 状态
	Status string `width:"12" charset:"ascii" nullable:"false" default:"unknown" list:"user" create:"optional" update:"user"`
}

func (*SReservedip) GetId

func (rip *SReservedip) GetId() string

func (*SReservedip) GetName

func (rip *SReservedip) GetName() string

func (*SReservedip) GetNetwork

func (self *SReservedip) GetNetwork() *SNetwork

func (*SReservedip) GetOwnerId

func (rip *SReservedip) GetOwnerId() mcclient.IIdentityProvider

func (*SReservedip) GetUniqValues

func (self *SReservedip) GetUniqValues() jsonutils.JSONObject

func (*SReservedip) IsExpired

func (rip *SReservedip) IsExpired() bool

func (*SReservedip) Release

func (self *SReservedip) Release(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork) error

type SReservedipManager

type SReservedipManager struct {
	db.SResourceBaseManager
	SNetworkResourceBaseManager
}
var ReservedipManager *SReservedipManager

func (*SReservedipManager) CreateByInsertOrUpdate

func (manager *SReservedipManager) CreateByInsertOrUpdate() bool

func (*SReservedipManager) FetchCustomizeColumns

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

func (*SReservedipManager) FetchOwnerId

func (*SReservedipManager) FetchUniqValues

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

func (*SReservedipManager) FilterById

func (manager *SReservedipManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery

func (*SReservedipManager) FilterByName

func (manager *SReservedipManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery

func (*SReservedipManager) FilterByOwner

func (*SReservedipManager) FilterByUniqValues

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

func (*SReservedipManager) GetReservedIP

func (manager *SReservedipManager) GetReservedIP(network *SNetwork, ip string) *SReservedip

func (*SReservedipManager) GetReservedIPs

func (manager *SReservedipManager) GetReservedIPs(network *SNetwork) []SReservedip

func (*SReservedipManager) ListItemExportKeys

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

func (*SReservedipManager) ListItemFilter

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

预留IP地址列表

func (*SReservedipManager) NamespaceScope

func (manager *SReservedipManager) NamespaceScope() rbacutils.TRbacScope

func (*SReservedipManager) OrderByExtraFields

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

func (*SReservedipManager) QueryDistinctExtraField

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

func (*SReservedipManager) ReserveIP

func (manager *SReservedipManager) ReserveIP(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string) error

func (*SReservedipManager) ReserveIPWithDuration

func (manager *SReservedipManager) ReserveIPWithDuration(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string, duration time.Duration) error

func (*SReservedipManager) ReserveIPWithDurationAndStatus

func (manager *SReservedipManager) ReserveIPWithDurationAndStatus(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string, duration time.Duration, status string) error

func (*SReservedipManager) ResourceScope

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

type SRouteTable

type SRouteTable struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase
	SVpcResourceBase `create:"required"`

	Type   string       `width:"16" charset:"ascii" nullable:"false" list:"user"`
	Routes *api.SRoutes `list:"user" update:"user" create:"required"`
}

func (*SRouteTable) GetICloudRouteTable

func (self *SRouteTable) GetICloudRouteTable(ctx context.Context) (cloudprovider.ICloudRouteTable, error)

func (*SRouteTable) GetRouteTableAssociations

func (self *SRouteTable) GetRouteTableAssociations() ([]SRouteTableAssociation, error)

func (*SRouteTable) GetRouteTableRouteSets

func (self *SRouteTable) GetRouteTableRouteSets() ([]SRouteTableRouteSet, error)

func (*SRouteTable) PerformAddRoutes

func (rt *SRouteTable) PerformAddRoutes(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

PerformAddRoutes patches acl entries by adding then deleting the specified acls. This is intended mainly for command line operations.

func (*SRouteTable) PerformDelRoutes

func (rt *SRouteTable) PerformDelRoutes(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SRouteTable) PerformPurge

func (*SRouteTable) PerformSyncstatus

func (self *SRouteTable) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.VpcSyncstatusInput) (jsonutils.JSONObject, error)

func (*SRouteTable) RealDelete

func (rt *SRouteTable) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SRouteTable) StartRouteTableUpdateTask

func (self *SRouteTable) StartRouteTableUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, routeSet *SRouteTableRouteSet, routeSetAction string) error

func (*SRouteTable) SyncRouteTableAssociations

func (self *SRouteTable) SyncRouteTableAssociations(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudRouteTable, provider *SCloudprovider) compare.SyncResult

func (*SRouteTable) SyncRouteTableRouteSets

func (self *SRouteTable) SyncRouteTableRouteSets(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudRouteTable, provider *SCloudprovider) compare.SyncResult

func (*SRouteTable) SyncWithCloudRouteTable

func (self *SRouteTable) SyncWithCloudRouteTable(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc, cloudRouteTable cloudprovider.ICloudRouteTable, provider *SCloudprovider) error

func (*SRouteTable) ValidateUpdateData

type SRouteTableAssociation

type SRouteTableAssociation struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SRouteTableResourceBase
	AssociationType         string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
	AssociatedResourceId    string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"domain" create:"domain_required"`
	ExtAssociatedResourceId string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
}

func (*SRouteTableAssociation) GetRouteTable

func (self *SRouteTableAssociation) GetRouteTable() (*SRouteTable, error)

func (*SRouteTableAssociation) RealDelete

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

type SRouteTableAssociationManager

var RouteTableAssociationManager *SRouteTableAssociationManager

func (*SRouteTableAssociationManager) GetContextManagers

func (manager *SRouteTableAssociationManager) GetContextManagers() [][]db.IModelManager

func (*SRouteTableAssociationManager) ListItemExportKeys

func (*SRouteTableAssociationManager) ListItemFilter

type SRouteTableManager

var RouteTableManager *SRouteTableManager

func (*SRouteTableManager) FetchCustomizeColumns

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

func (*SRouteTableManager) ListItemFilter

VPC虚拟路由表列表

func (*SRouteTableManager) OrderByExtraFields

func (man *SRouteTableManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.RouteTableListInput,
) (*sqlchemy.SQuery, error)

func (*SRouteTableManager) QueryDistinctExtraField

func (man *SRouteTableManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SRouteTableManager) SyncRouteTables

func (*SRouteTableManager) ValidateCreateData

type SRouteTableResourceBase

type SRouteTableResourceBase struct {
	RouteTableId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" json:"route_table_id"`
}

type SRouteTableResourceBaseManager

type SRouteTableResourceBaseManager struct {
	SVpcResourceBaseManager
}

func (*SRouteTableResourceBaseManager) ListItemFilter

type SRouteTableRouteSet

type SRouteTableRouteSet struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SRouteTableResourceBase
	Type         string `width:"36" charset:"ascii" list:"user" update:"domain" create:"optional"`
	Cidr         string `width:"36" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
	NextHopType  string `width:"36" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
	NextHopId    string `width:"36" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
	ExtNextHopId string `width:"36" charset:"ascii" list:"user" update:"domain" create:"optional"`
}

func (*SRouteTableRouteSet) CustomizeDelete

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

func (*SRouteTableRouteSet) GetRouteTable

func (self *SRouteTableRouteSet) GetRouteTable() (*SRouteTable, error)

func (*SRouteTableRouteSet) GetVpc

func (self *SRouteTableRouteSet) GetVpc() (*SVpc, error)

func (*SRouteTableRouteSet) PostCreate

func (*SRouteTableRouteSet) PostUpdate

func (*SRouteTableRouteSet) RealDelete

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

func (*SRouteTableRouteSet) ValidateDeleteCondition

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

func (*SRouteTableRouteSet) ValidateUpdateData

type SRouteTableRouteSetManager

var RouteTableRouteSetManager *SRouteTableRouteSetManager

func (*SRouteTableRouteSetManager) FetchUniqValues

func (*SRouteTableRouteSetManager) FilterByUniqValues

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

func (*SRouteTableRouteSetManager) GetContextManagers

func (manager *SRouteTableRouteSetManager) GetContextManagers() [][]db.IModelManager

func (*SRouteTableRouteSetManager) ListItemExportKeys

func (*SRouteTableRouteSetManager) ListItemFilter

func (*SRouteTableRouteSetManager) ValidateCreateData

type SScalingActivity

type SScalingActivity struct {
	db.SStatusStandaloneResourceBase

	SScalingGroupResourceBase
	InstanceNumber int `list:"user" get:"user" default:"-1"`
	// 起因描述
	TriggerDesc string `width:"256" charset:"ascii" get:"user" list:"user"`
	// 行为描述
	ActionDesc string    `width:"256" charset:"ascii" get:"user" list:"user"`
	StartTime  time.Time `list:"user" get:"user"`
	EndTime    time.Time `list:"user" get:"user"`
	Reason     string    `width:"1024" charset:"ascii" get:"user" list:"user"`
}

func (*SScalingActivity) GetOwnerId

func (sa *SScalingActivity) GetOwnerId() mcclient.IIdentityProvider

func (*SScalingActivity) SetFailed

func (sam *SScalingActivity) SetFailed(actionDesc, reason string) error

func (*SScalingActivity) SetReject

func (sam *SScalingActivity) SetReject(action string, reason string) error

func (*SScalingActivity) SetResult

func (sam *SScalingActivity) SetResult(actionDesc, status, reason string, instanceNum int) error

func (*SScalingActivity) SimpleDelete

func (sa *SScalingActivity) SimpleDelete() error

func (*SScalingActivity) StartToScale

func (sa *SScalingActivity) StartToScale(triggerDesc string) (*SScalingActivity, error)

type SScalingActivityManager

var ScalingActivityManager *SScalingActivityManager

func (*SScalingActivityManager) CreateScalingActivity

func (sam *SScalingActivityManager) CreateScalingActivity(ctx context.Context, sgId, triggerDesc, status string) (*SScalingActivity, error)

func (*SScalingActivityManager) FetchByStatus

func (sam *SScalingActivityManager) FetchByStatus(ctx context.Context, saIds, status []string, action string) (ids []string, err error)

func (*SScalingActivityManager) FetchCustomizeColumns

func (sam *SScalingActivityManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []compute.ScalingActivityDetails

func (*SScalingActivityManager) FetchOwnerId

func (*SScalingActivityManager) FilterByOwner

func (*SScalingActivityManager) ListItemFilter

func (*SScalingActivityManager) NamespaceScope

func (sam *SScalingActivityManager) NamespaceScope() rbacutils.TRbacScope

func (*SScalingActivityManager) OrderByExtraFields

func (*SScalingActivityManager) QueryDistinctExtraField

func (sam *SScalingActivityManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SScalingActivityManager) ResourceScope

func (sam *SScalingActivityManager) ResourceScope() rbacutils.TRbacScope

type SScalingAlarm

type SScalingAlarm struct {
	db.SStandaloneResourceBase

	SScalingPolicyBase

	// ID of alarm config in alarm service
	AlarmId string `width:"128" charset:"ascii"`

	// Trigger when the cumulative count is reached
	Cumulate  int
	Cycle     int
	Indicator string `width:"32" charset:"ascii"`

	// Wrapper instruct how to calculate collective data based on individual data
	Wrapper  string `width:"16" charset:"ascii"`
	Operator string `width:"2" charset:"ascii"`

	Value float64

	// Real-time cumulate number
	RealCumulate int `default:"0"`
	// Last trigger time
	LastTriggerTime time.Time
}

func (*SScalingAlarm) AlarmDetails

func (sa *SScalingAlarm) AlarmDetails() api.ScalingAlarmDetails

func (*SScalingAlarm) IsTrigger

func (sa *SScalingAlarm) IsTrigger() (is bool)

func (*SScalingAlarm) Register

func (sa *SScalingAlarm) Register(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingAlarm) TriggerDescription

func (sa *SScalingAlarm) TriggerDescription() string

func (*SScalingAlarm) TriggerId

func (sa *SScalingAlarm) TriggerId() string

func (*SScalingAlarm) UnRegister

func (sa *SScalingAlarm) UnRegister(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingAlarm) ValidateCreateData

type SScalingAlarmManager

type SScalingAlarmManager struct {
	db.SStandaloneResourceBaseManager
}

type SScalingGroup

type SScalingGroup struct {
	db.SVirtualResourceBase
	SCloudregionResourceBase
	SVpcResourceBase
	SLoadbalancerBackendgroupResourceBase
	// GuestGroupId represent the guest gropu related to this scaling group.
	// Every scaling group will have only one guest group related to itself.
	SGroupResourceBase
	SGuestTemplateResourceBase
	db.SEnabledResourceBase

	Hypervisor        string `width:"16" charset:"ascii" default:"kvm" create:"required" list:"user" get:"user" update:"user"`
	MinInstanceNumber int    `nullable:"false" default:"0" create:"required" list:"user" get:"user" update:"user"`
	MaxInstanceNumber int    `nullable:"false" default:"10" create:"required" list:"user" get:"user" update:"user"`

	// DesireInstanceNumber represent the number of instances that should exist in the scaling group.
	// Scaling controller will monitor and ensure this in real time.
	// Scaling activities triggered by various policies will also modify this value.
	// This value should between MinInstanceNumber and MaxInstanceNumber
	DesireInstanceNumber int `nullable:"false" default:"0" create:"required" list:"user" get:"user" update:"user"`

	// ExpansionPrinciple represent the principle when creating new instance to join in.
	ExpansionPrinciple string `width:"32" charset:"ascii" default:"balanced" create:"optional" list:"user" update:"user" get:"user"`

	// ShrinkPrinciple represent the principle when removing instance from scaling group.
	ShrinkPrinciple string `width:"32" charset:"ascii" default:"earliest" create:"optional" list:"user" update:"user" get:"user"`

	HealthCheckMode  string `width:"32" charset:"ascii" default:"normal" create:"optional" list:"user" update:"user" get:"user"`
	HealthCheckCycle int    `nullable:"false" default:"300" create:"optional" list:"user" update:"user" get:"user"`
	HealthCheckGov   int    `nullable:"false" default:"180" create:"optional" list:"user" update:"user" get:"user"`

	LoadbalancerBackendPort   int `nullable:"false" default:"80" create:"optional" list:"user" get:"user"`
	LoadbalancerBackendWeight int `nillable:"false" default:"1" create:"optional" list:"user" get:"user"`

	// Time to allow scale
	AllowScaleTime time.Time
	// NextCheckTime descripe the next time to check instance's health
	NextCheckTime time.Time
}

func (*SScalingGroup) Activities

func (sg *SScalingGroup) Activities() ([]SScalingActivity, error)

func (*SScalingGroup) AllowScale

func (sg *SScalingGroup) AllowScale() bool

func (*SScalingGroup) CustomizeDelete

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

func (*SScalingGroup) Delete

func (sg *SScalingGroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingGroup) GuestNumber

func (sg *SScalingGroup) GuestNumber() (int, error)

func (*SScalingGroup) Guests

func (sg *SScalingGroup) Guests() ([]SGuest, error)

func (*SScalingGroup) NetworkIds

func (sg *SScalingGroup) NetworkIds() ([]string, error)

func (*SScalingGroup) Networks

func (sg *SScalingGroup) Networks() ([]SNetwork, error)

func (*SScalingGroup) PerformDisable

func (*SScalingGroup) PerformEnable

func (*SScalingGroup) PostCreate

func (*SScalingGroup) RealDelete

func (sg *SScalingGroup) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingGroup) Scale

func (sg *SScalingGroup) Scale(ctx context.Context, triggerDesc IScalingTriggerDesc, action IScalingAction,
	coolingTime int) error

Scale will modify SScalingGroup.DesireInstanceNumber and generate SScalingActivity based on the trigger and its corresponding SScalingPolicy.

func (*SScalingGroup) ScalingGroupGuests

func (sg *SScalingGroup) ScalingGroupGuests(guestIds []string) ([]SScalingGroupGuest, error)

func (*SScalingGroup) ScalingPolicies

func (sg *SScalingGroup) ScalingPolicies() ([]SScalingPolicy, error)

func (*SScalingGroup) ScalingPolicyNumber

func (sg *SScalingGroup) ScalingPolicyNumber() (int, error)

func (*SScalingGroup) SetAllowScaleTime

func (sg *SScalingGroup) SetAllowScaleTime(t time.Time)

func (*SScalingGroup) StartScalingGroupCreateTask

func (sg *SScalingGroup) StartScalingGroupCreateTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingGroup) StartScalingGroupDeleteTask

func (sg *SScalingGroup) StartScalingGroupDeleteTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingGroup) ValidateDeleteCondition

func (sg *SScalingGroup) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SScalingGroupGuest

type SScalingGroupGuest struct {
	SGuestJointsBase

	ScalingGroupId string            `width:"36" charset:"ascii" nullable:"false"`
	GuestStatus    string            `width:"36" charset:"ascii" nullable:"false" index:"true"`
	Manual         tristate.TriState `default:"false"`
}

func (*SScalingGroupGuest) Detach

func (sgg *SScalingGroupGuest) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingGroupGuest) SetGuestStatus

func (sgg *SScalingGroupGuest) SetGuestStatus(status string) error

type SScalingGroupGuestManager

type SScalingGroupGuestManager struct {
	SGuestJointsManager
}
var ScalingGroupGuestManager *SScalingGroupGuestManager

func (*SScalingGroupGuestManager) Attach

func (sggm *SScalingGroupGuestManager) Attach(ctx context.Context, scaligGroupId, guestId string, manual bool) error

func (*SScalingGroupGuestManager) Fetch

func (sggm *SScalingGroupGuestManager) Fetch(scalingGroupId, guestId string) ([]SScalingGroupGuest, error)

func (*SScalingGroupGuestManager) GetSlaveFieldName

func (sggm *SScalingGroupGuestManager) GetSlaveFieldName() string

func (*SScalingGroupGuestManager) Query

func (sggm *SScalingGroupGuestManager) Query(fields ...string) *sqlchemy.SQuery

type SScalingGroupManager

var ScalingGroupManager *SScalingGroupManager

func (*SScalingGroupManager) FetchCustomizeColumns

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

func (*SScalingGroupManager) ListItemExportKeys

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

func (*SScalingGroupManager) ListItemFilter

func (*SScalingGroupManager) OrderByExtraFields

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

func (*SScalingGroupManager) QueryDistinctExtraField

func (sgm *SScalingGroupManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SScalingGroupNetwork

type SScalingGroupNetwork struct {
	db.SVirtualJointResourceBase

	ScalingGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
	NetworkId      string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SScalingGroupNetwork) Detach

type SScalingGroupNetworkManager

type SScalingGroupNetworkManager struct {
	db.SVirtualJointResourceBaseManager
}
var ScalingGroupNetworkManager *SScalingGroupNetworkManager

func (*SScalingGroupNetworkManager) Attach

func (sgnm *SScalingGroupNetworkManager) Attach(ctx context.Context, scalingGroupId, networkId string) error

type SScalingGroupResourceBase

type SScalingGroupResourceBase struct {
	// ScalingGroupId
	ScalingGroupId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

func (*SScalingGroupResourceBase) GetScalingGroup

func (self *SScalingGroupResourceBase) GetScalingGroup() *SScalingGroup

type SScalingGroupResourceBaseManager

type SScalingGroupResourceBaseManager struct{}

func (*SScalingGroupResourceBaseManager) FetchCustomizeColumns

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

func (*SScalingGroupResourceBaseManager) FetchUniqValues

func (*SScalingGroupResourceBaseManager) FilterByUniqValues

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

func (*SScalingGroupResourceBaseManager) ListItemFilter

func (*SScalingGroupResourceBaseManager) QueryDistinctExtraField

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

type SScalingManual

type SScalingManual struct {
	SScalingPolicyBase
}

func (SScalingManual) TriggerDescription

func (sm SScalingManual) TriggerDescription() string

type SScalingPolicy

type SScalingPolicy struct {
	db.SVirtualResourceBase
	SScalingGroupResourceBase
	db.SEnabledResourceBase

	TriggerType string `width:"16" charset:"ascii" default:"timing" create:"required" list:"user"`
	TriggerId   string `width:"128" charset:"ascii"`

	// Action of scaling activity
	Action string `width:"8" charset:"ascii" default:"set" create:"required" list:"user"`
	Number int    `nullable:"false" default:"1" create:"required" list:"user"`

	// Unit of Number
	Unit string `width:"4" charset:"ascii" create:"required" list:"user"`

	// Scaling activity triggered by alarms will be rejected during this period about CoolingTime
	CoolingTime int `nullable:"false" default:"300" create:"required" list:"user"`
}

func (*SScalingPolicy) AllowPerformDisable

func (sp *SScalingPolicy) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, input apis.PerformDisableInput) bool

func (*SScalingPolicy) AllowPerformEnable

func (sp *SScalingPolicy) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, input apis.PerformEnableInput) bool

func (*SScalingPolicy) CheckCoolTime

func (sp *SScalingPolicy) CheckCoolTime() bool

func (*SScalingPolicy) CustomizeCreate

func (*SScalingPolicy) Delete

func (sp *SScalingPolicy) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingPolicy) EventNotify

func (sp *SScalingPolicy) EventNotify(ctx context.Context, userCred mcclient.TokenCredential)

func (*SScalingPolicy) Exec

func (sp *SScalingPolicy) Exec(from int) int

func (*SScalingPolicy) GetUniqValues

func (sgm *SScalingPolicy) GetUniqValues() jsonutils.JSONObject

func (*SScalingPolicy) PerformDisable

func (*SScalingPolicy) PerformEnable

func (*SScalingPolicy) PerformTrigger

func (*SScalingPolicy) PostCreate

func (*SScalingPolicy) PostDelete

func (sp *SScalingPolicy) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SScalingPolicy) RealDelete

func (sp *SScalingPolicy) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingPolicy) ScalingGroup

func (sp *SScalingPolicy) ScalingGroup() (*SScalingGroup, error)

func (*SScalingPolicy) Trigger

type SScalingPolicyBase

type SScalingPolicyBase struct {
	ScalingPolicyId string `width:"36" charset:"ascii"`
}

func (*SScalingPolicyBase) ScalingGroup

func (spb *SScalingPolicyBase) ScalingGroup() (*SScalingGroup, error)

func (*SScalingPolicyBase) ScalingPolicy

func (spb *SScalingPolicyBase) ScalingPolicy() (*SScalingPolicy, error)

type SScalingPolicyManager

var ScalingPolicyManager *SScalingPolicyManager

func (*SScalingPolicyManager) FetchCustomizeColumns

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

func (*SScalingPolicyManager) FetchUniqValues

func (*SScalingPolicyManager) FilterByUniqValues

func (spm *SScalingPolicyManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SScalingPolicyManager) ListItemFilter

func (*SScalingPolicyManager) NotificationID

func (spm *SScalingPolicyManager) NotificationID(session *mcclient.ClientSession) (string, error)

func (*SScalingPolicyManager) OrderByExtraFields

func (*SScalingPolicyManager) QueryDistinctExtraField

func (spm *SScalingPolicyManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SScalingPolicyManager) Trigger

func (*SScalingPolicyManager) ValidateListConditions

func (spm *SScalingPolicyManager) ValidateListConditions(ctx context.Context, userCred mcclient.TokenCredential,
	query *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SScalingTimer

type SScalingTimer struct {
	db.SStandaloneResourceBase

	SScalingPolicyBase

	STimer
}

func (*SScalingTimer) IsTrigger

func (st *SScalingTimer) IsTrigger() bool

func (*SScalingTimer) Register

func (st *SScalingTimer) Register(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingTimer) TriggerDescription

func (st *SScalingTimer) TriggerDescription() string

func (*SScalingTimer) TriggerId

func (st *SScalingTimer) TriggerId() string

func (*SScalingTimer) UnRegister

func (st *SScalingTimer) UnRegister(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SScalingTimer) ValidateCreateData

type SScalingTimerManager

type SScalingTimerManager struct {
	db.SStandaloneResourceBaseManager
}

type SSchedpolicy

type SSchedpolicy struct {
	db.SStandaloneResourceBase
	SSchedtagResourceBase

	Condition string `width:"1024" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
	Strategy  string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`

	Enabled tristate.TriState `default:"true" create:"optional" list:"user" update:"user"`
}

sched policy is called before calling scheduler, add additional preferences for schedtags

func (*SSchedpolicy) PerformEvaluate

func (*SSchedpolicy) ValidateUpdateData

func (self *SSchedpolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSchedpolicyManager

type SSchedpolicyManager struct {
	db.SStandaloneResourceBaseManager
	SSchedtagResourceBaseManager
}
var SchedpolicyManager *SSchedpolicyManager

func (*SSchedpolicyManager) FetchCustomizeColumns

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

func (*SSchedpolicyManager) ListItemFilter

func (manager *SSchedpolicyManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SchedpolicyListInput,
) (*sqlchemy.SQuery, error)

动态调度策略列表

func (*SSchedpolicyManager) OrderByExtraFields

func (manager *SSchedpolicyManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SchedpolicyListInput,
) (*sqlchemy.SQuery, error)

func (*SSchedpolicyManager) QueryDistinctExtraField

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

func (*SSchedpolicyManager) ValidateCreateData

type SSchedtag

type SSchedtag struct {
	db.SStandaloneResourceBase
	db.SScopedResourceBase

	DefaultStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
	ResourceType    string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"required"`                                 // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
}

func GetSchedtags

func GetSchedtags(jointMan ISchedtagJointManager, masterId string) []SSchedtag

func (*SSchedtag) CustomizeCreate

func (self *SSchedtag) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSchedtag) GetJointManager

func (self *SSchedtag) GetJointManager() ISchedtagJointManager

func (*SSchedtag) GetJointResourceTag

func (s *SSchedtag) GetJointResourceTag(resId string) (ISchedtagJointModel, error)

func (*SSchedtag) GetObjectCount

func (self *SSchedtag) GetObjectCount() (int, error)

func (*SSchedtag) GetObjectQuery

func (self *SSchedtag) GetObjectQuery() *sqlchemy.SQuery

func (*SSchedtag) GetResourceManager

func (s *SSchedtag) GetResourceManager() (db.IStandaloneModelManager, error)

func (*SSchedtag) GetResources

func (self *SSchedtag) GetResources() ([]IModelWithSchedtag, error)

func (*SSchedtag) GetShortDesc

func (self *SSchedtag) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SSchedtag) GetShortDescV2

func (self *SSchedtag) GetShortDescV2(ctx context.Context) api.SchedtagShortDescDetails

func (*SSchedtag) PerformSetResource

func (*SSchedtag) PerformSetScope

func (*SSchedtag) ValidateDeleteCondition

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

func (*SSchedtag) ValidateUpdateData

func (self *SSchedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSchedtagJointsBase

type SSchedtagJointsBase struct {
	db.SJointResourceBase

	SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // =Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SSchedtagJointsBase) Delete

func (joint *SSchedtagJointsBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSchedtagJointsBase) Detach

func (joint *SSchedtagJointsBase) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSchedtagJointsBase) GetSchedtagId

func (joint *SSchedtagJointsBase) GetSchedtagId() string

type SSchedtagJointsManager

type SSchedtagJointsManager struct {
	db.SJointResourceBaseManager
	SSchedtagResourceBaseManager
}

func NewSchedtagJointsManager

func NewSchedtagJointsManager(
	dt interface{},
	tableName string,
	keyword string,
	keywordPlural string,
	master db.IStandaloneModelManager,
) *SSchedtagJointsManager

func (*SSchedtagJointsManager) FetchCustomizeColumns

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

func (*SSchedtagJointsManager) FetchSchedtagById

func (man *SSchedtagJointsManager) FetchSchedtagById(id string) *SSchedtag

func (*SSchedtagJointsManager) GetResourceIdKey

func (man *SSchedtagJointsManager) GetResourceIdKey(m db.IJointModelManager) string

func (*SSchedtagJointsManager) GetSlaveFieldName

func (manager *SSchedtagJointsManager) GetSlaveFieldName() string

func (*SSchedtagJointsManager) ListItemFilter

func (*SSchedtagJointsManager) OrderByExtraFields

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

func (*SSchedtagJointsManager) ValidateCreateData

type SSchedtagManager

type SSchedtagManager struct {
	db.SStandaloneResourceBaseManager
	db.SScopedResourceBaseManager
	// contains filtered or unexported fields
}
var SchedtagManager *SSchedtagManager

func (*SSchedtagManager) BindJointManagers

func (manager *SSchedtagManager) BindJointManagers(ms map[db.IModelManager]ISchedtagJointManager)

func (*SSchedtagManager) FetchCustomizeColumns

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

func (*SSchedtagManager) FilterByOwner

func (*SSchedtagManager) GetJointManager

func (manager *SSchedtagManager) GetJointManager(resTypePlural string) ISchedtagJointManager

func (*SSchedtagManager) GetResourceSchedtags

func (manager *SSchedtagManager) GetResourceSchedtags(resType string) ([]SSchedtag, error)

func (*SSchedtagManager) GetResourceTypes

func (manager *SSchedtagManager) GetResourceTypes() []string

func (*SSchedtagManager) InitializeData

func (manager *SSchedtagManager) InitializeData() error

func (*SSchedtagManager) ListItemExportKeys

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

func (*SSchedtagManager) ListItemFilter

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

调度标签列表

func (*SSchedtagManager) NamespaceScope

func (manager *SSchedtagManager) NamespaceScope() rbacutils.TRbacScope

func (*SSchedtagManager) OrderByExtraFields

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

func (*SSchedtagManager) QueryDistinctExtraField

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

func (*SSchedtagManager) ValidateCreateData

func (*SSchedtagManager) ValidateSchedtags

func (manager *SSchedtagManager) ValidateSchedtags(userCred mcclient.TokenCredential, schedtags []*api.SchedtagConfig) ([]*api.SchedtagConfig, error)

type SSchedtagResourceBase

type SSchedtagResourceBase struct {
	// 归属调度标签ID
	SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user" json:"schedtag_id"`
}

func (*SSchedtagResourceBase) GetSchedtag

func (self *SSchedtagResourceBase) GetSchedtag() *SSchedtag

type SSchedtagResourceBaseManager

type SSchedtagResourceBaseManager struct{}

func (*SSchedtagResourceBaseManager) FetchCustomizeColumns

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

func (*SSchedtagResourceBaseManager) GetOrderByFields

func (manager *SSchedtagResourceBaseManager) GetOrderByFields(query api.SchedtagFilterListInput) []string

func (*SSchedtagResourceBaseManager) GetOrderBySubQuery

func (*SSchedtagResourceBaseManager) ListItemFilter

func (*SSchedtagResourceBaseManager) OrderByExtraFields

func (*SSchedtagResourceBaseManager) QueryDistinctExtraField

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

type SSecurityGroup

type SSecurityGroup struct {
	db.SSharableVirtualResourceBase
	IsDirty bool `nullable:"false" default:"false"`
}

func (*SSecurityGroup) ClearRuleDirty

func (self *SSecurityGroup) ClearRuleDirty() error

func (*SSecurityGroup) CustomizeDelete

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

func (*SSecurityGroup) Delete

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

func (*SSecurityGroup) DoSync

func (self *SSecurityGroup) DoSync(ctx context.Context, userCred mcclient.TokenCredential)

func (*SSecurityGroup) GetAllowList

func (*SSecurityGroup) GetDetailsReferences

获取引用信息

func (*SSecurityGroup) GetGuests

func (self *SSecurityGroup) GetGuests() []SGuest

func (*SSecurityGroup) GetGuestsCount

func (self *SSecurityGroup) GetGuestsCount() (int, error)

func (*SSecurityGroup) GetGuestsQuery

func (self *SSecurityGroup) GetGuestsQuery() *sqlchemy.SQuery

func (*SSecurityGroup) GetKvmGuests

func (self *SSecurityGroup) GetKvmGuests() ([]SGuest, error)

func (*SSecurityGroup) GetOldRules

func (self *SSecurityGroup) GetOldRules() ([]SSecurityGroupRule, error)

func (*SSecurityGroup) GetQuotaKeys

func (sg *SSecurityGroup) GetQuotaKeys() quotas.IQuotaKeys

func (*SSecurityGroup) GetSecgroupCacheCount

func (self *SSecurityGroup) GetSecgroupCacheCount() (int, error)

func (*SSecurityGroup) GetSecgroupCacheQuery

func (self *SSecurityGroup) GetSecgroupCacheQuery() *sqlchemy.SQuery

func (*SSecurityGroup) GetSecuritRuleSet

func (self *SSecurityGroup) GetSecuritRuleSet() (cloudprovider.SecurityRuleSet, error)

func (*SSecurityGroup) GetSecurityGroupCaches

func (self *SSecurityGroup) GetSecurityGroupCaches() ([]SSecurityGroupCache, error)

func (*SSecurityGroup) GetSecurityGroupReferences

func (self *SSecurityGroup) GetSecurityGroupReferences() ([]SSecurityGroup, error)

func (*SSecurityGroup) GetUsages

func (sg *SSecurityGroup) GetUsages() []db.IUsage

func (*SSecurityGroup) HasPeerSecgroup

func (sg *SSecurityGroup) HasPeerSecgroup() (bool, error)

func (*SSecurityGroup) PerformAddRule

func (*SSecurityGroup) PerformCacheSecgroup

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

func (*SSecurityGroup) PerformClone

func (*SSecurityGroup) PerformImportRules

func (*SSecurityGroup) PerformMerge

func (*SSecurityGroup) PerformPurge

func (*SSecurityGroup) PerformUncacheSecgroup

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

func (*SSecurityGroup) PostCreate

func (*SSecurityGroup) RealDelete

func (self *SSecurityGroup) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSecurityGroup) StartDeleteSecurityGroupTask

func (self *SSecurityGroup) StartDeleteSecurityGroupTask(ctx context.Context, userCred mcclient.TokenCredential, isPurge bool, parentTaskId string) error

func (*SSecurityGroup) StartSecurityGroupCacheTask

func (self *SSecurityGroup) StartSecurityGroupCacheTask(ctx context.Context, userCred mcclient.TokenCredential, vpcId string, classic bool, parentTaskId string) error

func (*SSecurityGroup) StartSecurityGroupSyncRulesTask

func (self *SSecurityGroup) StartSecurityGroupSyncRulesTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSecurityGroup) SyncSecurityGroupRules

func (*SSecurityGroup) ValidateDeleteCondition

func (self *SSecurityGroup) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SSecurityGroupCache

type SSecurityGroupCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	SSecurityGroupResourceBase

	// 被其他安全组引用的次数
	ReferenceCount int `nullable:"false" list:"user" json:"reference_count"`

	// 虚拟私有网络外部Id
	VpcId             string `width:"128" charset:"ascii" list:"user" create:"required"`
	ExternalProjectId string `width:"128" charset:"ascii" list:"user" create:"optional"`
}

func (*SSecurityGroupCache) CreateISecurityGroup

func (self *SSecurityGroupCache) CreateISecurityGroup(ctx context.Context) (cloudprovider.ICloudSecurityGroup, error)

func (*SSecurityGroupCache) CustomizeDelete

func (self *SSecurityGroupCache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSecurityGroupCache) Delete

func (self *SSecurityGroupCache) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSecurityGroupCache) GetDetailsReferences

获取引用信息

func (*SSecurityGroupCache) GetIRegion

func (*SSecurityGroupCache) GetISecurityGroup

func (*SSecurityGroupCache) GetOldSecuritRuleSet

func (*SSecurityGroupCache) GetOrCreateISecurityGroup

func (self *SSecurityGroupCache) GetOrCreateISecurityGroup(ctx context.Context) (cloudprovider.ICloudSecurityGroup, bool, error)

func (*SSecurityGroupCache) GetOwnerId

func (self *SSecurityGroupCache) GetOwnerId() mcclient.IIdentityProvider

func (*SSecurityGroupCache) GetSecgroup

func (self *SSecurityGroupCache) GetSecgroup() (*SSecurityGroup, error)

func (*SSecurityGroupCache) GetVpc

func (self *SSecurityGroupCache) GetVpc() (*SVpc, error)

func (*SSecurityGroupCache) IsSupportPeerSecgroup

func (sgc *SSecurityGroupCache) IsSupportPeerSecgroup() bool

func (*SSecurityGroupCache) PerformSyncstatus

同步安全组缓存状态

func (*SSecurityGroupCache) RealDelete

func (self *SSecurityGroupCache) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSecurityGroupCache) StartSecurityGroupCacheDeleteTask

func (self *SSecurityGroupCache) StartSecurityGroupCacheDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSecurityGroupCache) StartSyncstatusTask

func (self *SSecurityGroupCache) StartSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSecurityGroupCache) SyncBaseInfo

func (*SSecurityGroupCache) SyncRules

func (self *SSecurityGroupCache) SyncRules(ctx context.Context, skipSyncRule bool) error

func (*SSecurityGroupCache) ValidateDeleteCondition

func (self *SSecurityGroupCache) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SSecurityGroupCacheManager

var SecurityGroupCacheManager *SSecurityGroupCacheManager

func (*SSecurityGroupCacheManager) FetchCustomizeColumns

func (manager *SSecurityGroupCacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SecurityGroupCacheDetails

func (*SSecurityGroupCacheManager) FilterByOwner

func (*SSecurityGroupCacheManager) GetSecgroupCache

func (manager *SSecurityGroupCacheManager) GetSecgroupCache(ctx context.Context, userCred mcclient.TokenCredential, secgroupId, vpcId string, regionId string, providerId string, projectId string) (*SSecurityGroupCache, error)

func (*SSecurityGroupCacheManager) InitializeData

func (manager *SSecurityGroupCacheManager) InitializeData() error

func (*SSecurityGroupCacheManager) ListItemExportKeys

func (*SSecurityGroupCacheManager) ListItemFilter

安全组缓存列表

func (*SSecurityGroupCacheManager) NewCache

func (manager *SSecurityGroupCacheManager) NewCache(ctx context.Context, userCred mcclient.TokenCredential, secgroupId, vpcId, regionId string, providerId string, projectId string) (*SSecurityGroupCache, error)

func (*SSecurityGroupCacheManager) OrderByExtraFields

func (*SSecurityGroupCacheManager) QueryDistinctExtraField

func (manager *SSecurityGroupCacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSecurityGroupCacheManager) Register

func (manager *SSecurityGroupCacheManager) Register(ctx context.Context, userCred mcclient.TokenCredential, secgroupId, vpcId, regionId string, providerId string, projectId string) (*SSecurityGroupCache, error)

func (*SSecurityGroupCacheManager) ResourceScope

func (manager *SSecurityGroupCacheManager) ResourceScope() rbacutils.TRbacScope

func (*SSecurityGroupCacheManager) SyncSecurityGroupCaches

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) error

func (*SSecurityGroupManager) FetchCustomizeColumns

func (manager *SSecurityGroupManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SecgroupDetails

func (*SSecurityGroupManager) FetchSecgroupById

func (manager *SSecurityGroupManager) FetchSecgroupById(secId string) (*SSecurityGroup, error)

func (*SSecurityGroupManager) GetCacheDetails

func (manager *SSecurityGroupManager) GetCacheDetails(ctx context.Context, userCred mcclient.TokenCredential, secgroupIds []string) (map[string][]jsonutils.JSONObject, error)

func (*SSecurityGroupManager) InitializeData

func (manager *SSecurityGroupManager) InitializeData() error

func (*SSecurityGroupManager) ListItemElasticcacheFilter

func (manager *SSecurityGroupManager) ListItemElasticcacheFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SecgroupListInput,
) (*sqlchemy.SQuery, error)

func (*SSecurityGroupManager) ListItemFilter

func (manager *SSecurityGroupManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SecgroupListInput,
) (*sqlchemy.SQuery, error)

安全组列表

func (*SSecurityGroupManager) OrderByExtraFields

func (manager *SSecurityGroupManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SecgroupListInput,
) (*sqlchemy.SQuery, error)

func (*SSecurityGroupManager) QueryDistinctExtraField

func (manager *SSecurityGroupManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSecurityGroupManager) TotalCnt

func (sm *SSecurityGroupManager) TotalCnt(secIds []string) (map[string]api.SSecurityGroupRef, error)

func (*SSecurityGroupManager) ValidateCreateData

type SSecurityGroupResourceBase

type SSecurityGroupResourceBase struct {
	// 本地安全组ID
	SecgroupId string `width:"36" charset:"ascii" nullable:"false" create:"required"  index:"true" list:"user" json:"secgroup_id"`
}

func (*SSecurityGroupResourceBase) GetSecGroup

func (self *SSecurityGroupResourceBase) GetSecGroup() *SSecurityGroup

type SSecurityGroupResourceBaseManager

type SSecurityGroupResourceBaseManager struct{}

func (*SSecurityGroupResourceBaseManager) FetchCustomizeColumns

func (manager *SSecurityGroupResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SecurityGroupResourceInfo

func (*SSecurityGroupResourceBaseManager) GetExportKeys

func (manager *SSecurityGroupResourceBaseManager) GetExportKeys() []string

func (*SSecurityGroupResourceBaseManager) GetOrderByFields

func (manager *SSecurityGroupResourceBaseManager) GetOrderByFields(query api.SecgroupFilterListInput) []string

func (*SSecurityGroupResourceBaseManager) GetOrderBySubQuery

func (*SSecurityGroupResourceBaseManager) ListItemExportKeys

func (*SSecurityGroupResourceBaseManager) ListItemFilter

func (*SSecurityGroupResourceBaseManager) OrderByExtraFields

func (*SSecurityGroupResourceBaseManager) QueryDistinctExtraField

func (manager *SSecurityGroupResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SSecurityGroupRule

type SSecurityGroupRule struct {
	db.SResourceBase
	SSecurityGroupResourceBase `create:"required"`

	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" create:"required"`
	Ports          string `width:"256" charset:"ascii" list:"user" update:"user" create:"optional"`
	Direction      string `width:"3" charset:"ascii" list:"user" create:"required"`
	CIDR           string `width:"256" charset:"ascii" list:"user" update:"user" create:"optional"`
	Action         string `width:"5" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`
	Description    string `width:"256" charset:"utf8" list:"user" update:"user" create:"optional"`
	PeerSecgroupId string `width:"128" charset:"ascii" create:"optional" list:"user" update:"user"`

	IsDirty bool `nullable:"false" default:"false"`
}

func (*SSecurityGroupRule) BeforeInsert

func (self *SSecurityGroupRule) BeforeInsert()

func (*SSecurityGroupRule) Delete

func (self *SSecurityGroupRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSecurityGroupRule) GetId

func (self *SSecurityGroupRule) GetId() string

func (*SSecurityGroupRule) GetOwnerId

func (self *SSecurityGroupRule) GetOwnerId() mcclient.IIdentityProvider

func (*SSecurityGroupRule) PostCreate

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) PreUpdate

func (*SSecurityGroupRule) String

func (self *SSecurityGroupRule) String() string

func (*SSecurityGroupRule) ValidateUpdateData

type SSecurityGroupRuleManager

type SSecurityGroupRuleManager struct {
	db.SResourceBaseManager
	SSecurityGroupResourceBaseManager
}
var SecurityGroupRuleManager *SSecurityGroupRuleManager

func (*SSecurityGroupRuleManager) CreateByInsertOrUpdate

func (manager *SSecurityGroupRuleManager) CreateByInsertOrUpdate() bool

func (*SSecurityGroupRuleManager) FetchCustomizeColumns

func (manager *SSecurityGroupRuleManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SecgroupRuleDetails

func (*SSecurityGroupRuleManager) FetchOwnerId

func (*SSecurityGroupRuleManager) FetchUniqValues

func (*SSecurityGroupRuleManager) FilterById

func (manager *SSecurityGroupRuleManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery

func (*SSecurityGroupRuleManager) FilterByOwner

func (*SSecurityGroupRuleManager) FilterByUniqValues

func (manager *SSecurityGroupRuleManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SSecurityGroupRuleManager) ListItemExportKeys

func (*SSecurityGroupRuleManager) ListItemFilter

安全组规则列表

func (*SSecurityGroupRuleManager) OrderByExtraFields

func (*SSecurityGroupRuleManager) QueryDistinctExtraField

func (manager *SSecurityGroupRuleManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSecurityGroupRuleManager) ResourceScope

func (manager *SSecurityGroupRuleManager) ResourceScope() rbacutils.TRbacScope

func (*SSecurityGroupRuleManager) ValidateCreateData

type SServerSku

type SServerSku struct {
	db.SEnabledStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase
	SZoneResourceBase

	// SkuId       string `width:"64" charset:"ascii" nullable:"false" list:"user" create:"admin_required"`                 // x2.large
	InstanceTypeFamily   string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`           // x2
	InstanceTypeCategory string `width:"32" charset:"utf8" nullable:"true" list:"user" create:"admin_optional" update:"admin"`            // 通用型
	LocalCategory        string `width:"32" charset:"utf8" nullable:"true" list:"user" create:"admin_optional" update:"admin" default:""` // 记录本地分类

	PrepaidStatus  string `width:"32" charset:"utf8" nullable:"true" list:"user" update:"admin" create:"admin_optional" default:"available"` // 预付费资源状态   available|soldout
	PostpaidStatus string `width:"32" charset:"utf8" nullable:"true" list:"user" update:"admin" create:"admin_optional" default:"available"` // 按需付费资源状态  available|soldout

	CpuArch      string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"` // CPU 架构 x86|xarm
	CpuCoreCount int    `nullable:"false" list:"user" create:"admin_required"`
	MemorySizeMB int    `nullable:"false" list:"user" create:"admin_required"`

	OsName string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin" default:"Any"` // Windows|Linux|Any

	SysDiskResizable tristate.TriState `default:"true" list:"user" create:"admin_optional" update:"admin"`
	SysDiskType      string            `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	SysDiskMinSizeGB int               `nullable:"true" list:"user" create:"admin_optional" update:"admin"` // not required。 windows比较新的版本都是50G左右。
	SysDiskMaxSizeGB int               `nullable:"true" list:"user" create:"admin_optional" update:"admin"` // not required

	AttachedDiskType   string `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	AttachedDiskSizeGB int    `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	AttachedDiskCount  int    `nullable:"true" list:"user" create:"admin_optional" update:"admin"`

	DataDiskTypes    string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	DataDiskMaxCount int    `nullable:"true" list:"user" create:"admin_optional" update:"admin"`

	NicType     string `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	NicMaxCount int    `default:"1" nullable:"true" list:"user" create:"admin_optional" update:"admin"`

	GpuAttachable tristate.TriState `default:"true" list:"user" create:"admin_optional" update:"admin"`
	GpuSpec       string            `width:"128" charset:"ascii" nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	GpuCount      int               `nullable:"true" list:"user" create:"admin_optional" update:"admin"`
	GpuMaxCount   int               `nullable:"true" list:"user" create:"admin_optional" update:"admin"`

	Provider string `width:"64" charset:"ascii" nullable:"true" list:"user" default:"OneCloud" create:"admin_optional"`
}

SServerSku 实际对应的是instance type清单. 这里的Sku实际指的是instance type。

func (*SServerSku) CustomizeDelete

func (self *SServerSku) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SServerSku) Delete

func (self *SServerSku) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (SServerSku) GetGlobalId

func (self SServerSku) GetGlobalId() string

func (*SServerSku) GetICloudSku

func (self *SServerSku) GetICloudSku(ctx context.Context) (cloudprovider.ICloudSku, error)

func (*SServerSku) GetPrivateCloudproviders

func (self *SServerSku) GetPrivateCloudproviders() ([]SCloudprovider, error)

func (*SServerSku) GetZoneExternalId

func (self *SServerSku) GetZoneExternalId() (string, error)

func (*SServerSku) MarkAsSoldout

func (self *SServerSku) MarkAsSoldout(ctx context.Context) error

func (*SServerSku) PostCreate

func (*SServerSku) PostUpdate

func (self *SServerSku) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SServerSku) RealDelete

func (self *SServerSku) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SServerSku) StartServerSkuDeleteTask

func (self *SServerSku) StartServerSkuDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, purge bool, parentTaskId string) error

func (*SServerSku) StartSkuCreateTask

func (self *SServerSku) StartSkuCreateTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SServerSku) SyncWithPrivateCloudSku

func (self *SServerSku) SyncWithPrivateCloudSku(ctx context.Context, userCred mcclient.TokenCredential, sku cloudprovider.ICloudSku) error

func (*SServerSku) ValidateDeleteCondition

func (self *SServerSku) ValidateDeleteCondition(ctx context.Context, info *api.ServerSkuDetails) error

func (*SServerSku) ValidateUpdateData

type SServerSkuManager

var ServerSkuManager *SServerSkuManager

func (*SServerSkuManager) ClearSchedDescCache

func (self *SServerSkuManager) ClearSchedDescCache(wait bool) error

func (*SServerSkuManager) FetchAllAvailableSkuIdByZoneId

func (manager *SServerSkuManager) FetchAllAvailableSkuIdByZoneId(zoneId string) ([]string, error)

获取同一个zone下所有Available状态的sku id

func (*SServerSkuManager) FetchByZoneExtId

func (self *SServerSkuManager) FetchByZoneExtId(zoneExtId string, name string) (db.IModel, error)

func (*SServerSkuManager) FetchByZoneId

func (self *SServerSkuManager) FetchByZoneId(zoneId string, name string) (db.IModel, error)

func (*SServerSkuManager) FetchCustomizeColumns

func (manager *SServerSkuManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ServerSkuDetails

func (*SServerSkuManager) FetchSkuByNameAndProvider

func (manager *SServerSkuManager) FetchSkuByNameAndProvider(name string, provider string, checkConsistency bool) (*SServerSku, error)

func (*SServerSkuManager) FetchSkusByRegion

func (manager *SServerSkuManager) FetchSkusByRegion(regionID string) ([]SServerSku, error)

func (*SServerSkuManager) FetchUniqValues

func (manager *SServerSkuManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SServerSkuManager) FilterByUniqValues

func (manager *SServerSkuManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SServerSkuManager) GetMatchedSku

func (manager *SServerSkuManager) GetMatchedSku(regionId string, cpu int64, memMB int64) (*SServerSku, error)

func (*SServerSkuManager) GetOneCloudSkus

func (manager *SServerSkuManager) GetOneCloudSkus() ([]string, error)

func (*SServerSkuManager) GetPropertyInstanceSpecs

func (manager *SServerSkuManager) GetPropertyInstanceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SServerSkuManager) GetPropertySyncTasks

func (manager *SServerSkuManager) GetPropertySyncTasks(ctx context.Context, userCred mcclient.TokenCredential, query api.SkuTaskQueryInput) (jsonutils.JSONObject, error)

func (*SServerSkuManager) GetPublicCloudSkuCount

func (manager *SServerSkuManager) GetPublicCloudSkuCount() (int, error)

func (*SServerSkuManager) GetSkuCountByRegion

func (manager *SServerSkuManager) GetSkuCountByRegion(regionId string) (int, error)

func (*SServerSkuManager) GetSkuCountByZone

func (manager *SServerSkuManager) GetSkuCountByZone(zoneId string) []SServerSku

func (*SServerSkuManager) GetSkus

func (manager *SServerSkuManager) GetSkus(provider string, cpu, memMB int) ([]SServerSku, error)

func (*SServerSkuManager) InitializeData

func (manager *SServerSkuManager) InitializeData() error

func (*SServerSkuManager) ListItemExportKeys

func (manager *SServerSkuManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SServerSkuManager) ListItemFilter

func (manager *SServerSkuManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ServerSkuListInput,
) (*sqlchemy.SQuery, error)

主机套餐规格列表

func (*SServerSkuManager) MarkAllAsSoldout

func (manager *SServerSkuManager) MarkAllAsSoldout(ctx context.Context, ids []string) error

sku标记为soldout状态。

func (*SServerSkuManager) MarkAsSoldout

func (manager *SServerSkuManager) MarkAsSoldout(ctx context.Context, id string) error

sku标记为soldout状态。

func (*SServerSkuManager) OrderByExtraFields

func (manager *SServerSkuManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ServerSkuListInput,
) (*sqlchemy.SQuery, error)

func (*SServerSkuManager) PendingDeleteInvalidSku

func (manager *SServerSkuManager) PendingDeleteInvalidSku() error

删除表中zone not found的记录

func (*SServerSkuManager) PerformSyncSkus

func (manager *SServerSkuManager) PerformSyncSkus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SkuSyncInput) (jsonutils.JSONObject, error)

func (*SServerSkuManager) QueryDistinctExtraField

func (manager *SServerSkuManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SServerSkuManager) SyncPrivateCloudSkus

func (manager *SServerSkuManager) SyncPrivateCloudSkus(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, skus []cloudprovider.ICloudSku) compare.SyncResult

func (*SServerSkuManager) SyncServerSkus

func (manager *SServerSkuManager) SyncServerSkus(ctx context.Context, userCred mcclient.TokenCredential, region *SCloudregion, extSkuMeta *SSkuResourcesMeta) compare.SyncResult

func (*SServerSkuManager) ValidateCreateData

type SServiceCatalog

type SServiceCatalog struct {
	db.SSharableVirtualResourceBase

	IconUrl         string `charset:"ascii" create:"optional" list:"user" get:"user" update:"user"`
	GuestTemplateID string `width:"128" charset:"ascii" create:"optional" list:"user" get:"user" update:"user"`
}

func (*SServiceCatalog) PerformDeploy

func (*SServiceCatalog) ValidateUpdateData

type SServiceCatalogManager

type SServiceCatalogManager struct {
	db.SSharableVirtualResourceBaseManager
}
var ServiceCatalogManager *SServiceCatalogManager

func (*SServiceCatalogManager) FetchCustomizeColumns

func (manager *SServiceCatalogManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []computeapis.ServiceCatalogDetails

func (*SServiceCatalogManager) ListItemFilter

服务目录列表

func (*SServiceCatalogManager) OrderByExtraFields

func (*SServiceCatalogManager) QueryDistinctExtraField

func (manager *SServiceCatalogManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SServiceCatalogManager) ValidateCreateData

type SSkuResourcesMeta

type SSkuResourcesMeta struct {
	DBInstanceBase   string `json:"dbinstance_base"`
	ServerBase       string `json:"server_base"`
	ElasticCacheBase string `json:"elastic_cache_base"`
	ImageBase        string `json:"image_base"`
	NatBase          string `json:"nat_base"`
	NasBase          string `json:"nas_base"`
	WafBase          string `json:"waf_base"`
}

资源套餐下载连接信息 server: 虚拟机 elasticcache: 弹性缓存(redis&memcached)

func FetchSkuResourcesMeta

func FetchSkuResourcesMeta() (*SSkuResourcesMeta, error)

func (*SSkuResourcesMeta) GetCloudimages

func (self *SSkuResourcesMeta) GetCloudimages(regionExternalId string) ([]SCachedimage, error)

func (*SSkuResourcesMeta) GetDBInstanceSkusByRegionExternalId

func (self *SSkuResourcesMeta) GetDBInstanceSkusByRegionExternalId(regionExternalId string) ([]SDBInstanceSku, error)

func (*SSkuResourcesMeta) GetElasticCacheSkusByRegionExternalId

func (self *SSkuResourcesMeta) GetElasticCacheSkusByRegionExternalId(regionExternalId string) ([]SElasticcacheSku, error)

func (*SSkuResourcesMeta) GetNasSkusByRegionExternalId

func (self *SSkuResourcesMeta) GetNasSkusByRegionExternalId(regionExternalId string) ([]SNasSku, error)

func (*SSkuResourcesMeta) GetNatSkusByRegionExternalId

func (self *SSkuResourcesMeta) GetNatSkusByRegionExternalId(regionExternalId string) ([]SNatSku, error)

func (*SSkuResourcesMeta) GetRegionIdAndZoneMaps

func (self *SSkuResourcesMeta) GetRegionIdAndZoneMaps(regionExternalId string) (string, map[string]string, error)

func (*SSkuResourcesMeta) GetServerSkusByRegionExternalId

func (self *SSkuResourcesMeta) GetServerSkusByRegionExternalId(regionExternalId string) ([]SServerSku, error)

func (*SSkuResourcesMeta) GetWafGroups

func (self *SSkuResourcesMeta) GetWafGroups(cloudEnv string) ([]SWafRuleGroup, error)

func (*SSkuResourcesMeta) SyncWafGroups

func (self *SSkuResourcesMeta) SyncWafGroups(ctx context.Context, userCred mcclient.TokenCredential, cloudEnv string, isStart bool) compare.SyncResult

type SSnapshot

type SSnapshot struct {
	db.SVirtualResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	db.SMultiArchResourceBase

	db.SEncryptedResource

	// 磁盘Id
	DiskId string `width:"36" charset:"ascii" nullable:"true" create:"required" list:"user" index:"true"`

	// Only onecloud has StorageId
	StorageId string `width:"36" charset:"ascii" nullable:"true" list:"admin" create:"optional"`

	CreatedBy string `width:"36" charset:"ascii" nullable:"false" default:"manual" list:"user" create:"optional"`
	Location  string `charset:"ascii" nullable:"true" list:"admin" create:"optional"`
	// 快照大小,单位Mb
	Size        int    `nullable:"false" list:"user" create:"required"`
	OutOfChain  bool   `nullable:"false" default:"false" list:"admin" create:"optional"`
	FakeDeleted bool   `nullable:"false" default:"false"`
	DiskType    string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	// 操作系统类型
	OsType string `width:"32" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	// create disk from snapshot, snapshot as disk backing file
	RefCount int `nullable:"false" default:"0" list:"user"`

	BackingDiskId string    `width:"36" charset:"ascii" nullable:"true" default:""`
	ExpiredAt     time.Time `nullable:"true" list:"user" create:"optional"`
}

func (*SSnapshot) CustomizeCreate

func (self *SSnapshot) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	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) Delete

func (self *SSnapshot) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshot) FakeDelete

func (self *SSnapshot) FakeDelete(userCred mcclient.TokenCredential) error

func (*SSnapshot) GetBackingDisks

func (self *SSnapshot) GetBackingDisks() ([]string, error)

func (*SSnapshot) GetDisk

func (self *SSnapshot) GetDisk() (*SDisk, error)

func (*SSnapshot) GetFuseUrl

func (self *SSnapshot) GetFuseUrl() (string, error)

func (*SSnapshot) GetGuest

func (self *SSnapshot) GetGuest() (*SGuest, error)

func (*SSnapshot) GetHost

func (self *SSnapshot) GetHost() (*SHost, error)

func (*SSnapshot) GetISnapshotRegion

func (self *SSnapshot) GetISnapshotRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SSnapshot) GetQuotaKeys

func (self *SSnapshot) GetQuotaKeys() quotas.IQuotaKeys

func (*SSnapshot) GetRegionDriver

func (self *SSnapshot) GetRegionDriver() IRegionDriver

func (*SSnapshot) GetShortDesc

func (self *SSnapshot) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SSnapshot) GetStorage

func (self *SSnapshot) GetStorage() *SStorage

func (*SSnapshot) GetStorageType

func (self *SSnapshot) GetStorageType() string

func (*SSnapshot) GetUsages

func (snapshot *SSnapshot) GetUsages() []db.IUsage

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 (*SSnapshot) PerformSyncstatus

同步快照状态

func (*SSnapshot) PostCreate

func (snapshot *SSnapshot) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SSnapshot) RealDelete

func (self *SSnapshot) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshot) StartSnapshotCreateTask

func (self *SSnapshot) StartSnapshotCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error

func (*SSnapshot) StartSnapshotDeleteTask

func (self *SSnapshot) StartSnapshotDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, reloadDisk bool, parentTaskId string) error

func (*SSnapshot) StartSnapshotsDeleteTask

func (self *SSnapshot) StartSnapshotsDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSnapshot) SyncWithCloudSnapshot

func (self *SSnapshot) SyncWithCloudSnapshot(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudSnapshot, syncOwnerId mcclient.IIdentityProvider, region *SCloudregion) error

Only sync snapshot status

func (*SSnapshot) ValidateDeleteCondition

func (self *SSnapshot) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SSnapshot) ValidatePurgeCondition

func (self *SSnapshot) ValidatePurgeCondition(ctx context.Context) error

type SSnapshotManager

var SnapshotManager *SSnapshotManager

func (*SSnapshotManager) AddRefCount

func (self *SSnapshotManager) AddRefCount(snapshotId string, count int)

func (*SSnapshotManager) CleanupSnapshots

func (manager *SSnapshotManager) CleanupSnapshots(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SSnapshotManager) CreateSnapshot

func (self *SSnapshotManager) CreateSnapshot(ctx context.Context, owner mcclient.IIdentityProvider,
	createdBy, diskId, guestId, location, name string, retentionDay int, isSystem bool) (*SSnapshot, error)

func (*SSnapshotManager) DeleteDiskSnapshots

func (self *SSnapshotManager) DeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, diskId string) error

func (*SSnapshotManager) FetchCustomizeColumns

func (manager *SSnapshotManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SnapshotDetails

func (*SSnapshotManager) GetConvertSnapshot

func (self *SSnapshotManager) GetConvertSnapshot(deleteSnapshot *SSnapshot) (*SSnapshot, error)

func (*SSnapshotManager) GetDiskFirstSnapshot

func (self *SSnapshotManager) GetDiskFirstSnapshot(diskId string) *SSnapshot

func (*SSnapshotManager) GetDiskManualSnapshotCount

func (self *SSnapshotManager) GetDiskManualSnapshotCount(diskId string) (int, error)

func (*SSnapshotManager) GetDiskSnapshotCount

func (self *SSnapshotManager) GetDiskSnapshotCount(diskId string) (int, error)

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) GetResourceCount

func (manager *SSnapshotManager) GetResourceCount() ([]db.SScopeResourceCount, error)

func (*SSnapshotManager) IsDiskSnapshotsNeedConvert

func (self *SSnapshotManager) IsDiskSnapshotsNeedConvert(diskId string) (bool, error)

func (*SSnapshotManager) ListItemExportKeys

func (manager *SSnapshotManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SSnapshotManager) ListItemFilter

func (manager *SSnapshotManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.SnapshotListInput,
) (*sqlchemy.SQuery, error)

快照列表

func (*SSnapshotManager) OnCreateComplete

func (manager *SSnapshotManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SSnapshotManager) OrderByExtraFields

func (manager *SSnapshotManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.SnapshotListInput,
) (*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) QueryDistinctExtraField

func (manager *SSnapshotManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSnapshotManager) StartSnapshotCleanupTask

func (manager *SSnapshotManager) StartSnapshotCleanupTask(
	ctx context.Context, userCred mcclient.TokenCredential,
	region *SCloudregion, now time.Time,
) error

func (*SSnapshotManager) SyncSnapshots

func (manager *SSnapshotManager) SyncSnapshots(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, snapshots []cloudprovider.ICloudSnapshot, syncOwnerId mcclient.IIdentityProvider) compare.SyncResult

func (*SSnapshotManager) ValidateCreateData

type SSnapshotPolicy

type SSnapshotPolicy struct {
	db.SVirtualResourceBase

	RetentionDays int `nullable:"false" list:"user" get:"user" create:"required"`

	// 1~7, 1 is Monday
	RepeatWeekdays uint8 `charset:"utf8" create:"required" list:"user" get:"user"`
	// 0~23
	TimePoints  uint32            `charset:"utf8" create:"required" list:"user" get:"user"`
	IsActivated tristate.TriState `list:"user" get:"user" create:"optional" default:"true"`
}

func (*SSnapshotPolicy) ComputeNextSyncTime

func (sp *SSnapshotPolicy) ComputeNextSyncTime(base time.Time) time.Time

func (*SSnapshotPolicy) CustomizeDelete

func (sp *SSnapshotPolicy) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSnapshotPolicy) Delete

func (sp *SSnapshotPolicy) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshotPolicy) DetachAfterDelete

func (sp *SSnapshotPolicy) DetachAfterDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshotPolicy) Equals

func (*SSnapshotPolicy) ExecuteNotify

func (sp *SSnapshotPolicy) ExecuteNotify(ctx context.Context, userCred mcclient.TokenCredential, diskName string)

func (*SSnapshotPolicy) GenerateCreateSpParams

func (sp *SSnapshotPolicy) GenerateCreateSpParams() *cloudprovider.SnapshotPolicyInput

func (*SSnapshotPolicy) GetCloudproviderId

func (sp *SSnapshotPolicy) GetCloudproviderId() string

func (*SSnapshotPolicy) Key

func (sp *SSnapshotPolicy) Key() uint64

func (*SSnapshotPolicy) PerformBindDisks

func (*SSnapshotPolicy) PerformCache

func (*SSnapshotPolicy) PerformUnbindDisks

func (*SSnapshotPolicy) PerformUpdate

func (*SSnapshotPolicy) RealDelete

func (sp *SSnapshotPolicy) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshotPolicy) StartSnapshotPolicyDeleteTask

func (sp *SSnapshotPolicy) StartSnapshotPolicyDeleteTask(ctx context.Context, userCred mcclient.TokenCredential,
	params *jsonutils.JSONDict, parentTaskId string) error

func (*SSnapshotPolicy) StartSnapshotPolicyUpdateTask

func (sp *SSnapshotPolicy) StartSnapshotPolicyUpdateTask(ctx context.Context, userCred mcclient.TokenCredential,
	input *api.SSnapshotPolicyCreateInput) error

func (*SSnapshotPolicy) UpdateParamCheck

func (sp *SSnapshotPolicy) UpdateParamCheck(input *api.SSnapshotPolicyCreateInput) error

UpdateParamCheck check if update parameters are correct and need to update

type SSnapshotPolicyCache

type SSnapshotPolicyCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	SSnapshotPolicyResourceBase `width:"128" charset:"ascii" create:"required"`
}

func NewSSnapshotPolicyCache

func NewSSnapshotPolicyCache(snapshotpolicyId, cloudregionId, externalId string) *SSnapshotPolicyCache

func (*SSnapshotPolicyCache) CreateCloudSnapshotPolicy

func (spc *SSnapshotPolicyCache) CreateCloudSnapshotPolicy(ctx context.Context) error

func (*SSnapshotPolicyCache) CustomizeDelete

func (spc *SSnapshotPolicyCache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSnapshotPolicyCache) Delete

func (*SSnapshotPolicyCache) DeleteCloudSnapshotPolicy

func (spc *SSnapshotPolicyCache) DeleteCloudSnapshotPolicy(ctx context.Context) error

func (*SSnapshotPolicyCache) GetIRegion

func (*SSnapshotPolicyCache) GetOwnerId

func (*SSnapshotPolicyCache) GetSnapshotPolicy

func (spc *SSnapshotPolicyCache) GetSnapshotPolicy() (*SSnapshotPolicy, error)

func (*SSnapshotPolicyCache) RealDetele

func (spc *SSnapshotPolicyCache) RealDetele(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshotPolicyCache) UpdateCloudSnapshotPolicy

func (spc *SSnapshotPolicyCache) UpdateCloudSnapshotPolicy(ctx context.Context, input *cloudprovider.SnapshotPolicyInput) error

type SSnapshotPolicyCacheManager

var SnapshotPolicyCacheManager *SSnapshotPolicyCacheManager

func (*SSnapshotPolicyCacheManager) DeleteCloudSnapshotPolices

func (spcm *SSnapshotPolicyCacheManager) DeleteCloudSnapshotPolices(ctx context.Context,
	userCred mcclient.TokenCredential, snapshotPolicyId string) error

func (*SSnapshotPolicyCacheManager) FetchAllByExtIds

func (spcm *SSnapshotPolicyCacheManager) FetchAllByExtIds(externalIds []string, regionId,
	providerId string) ([]SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) FetchAllByRegionProvider

func (spcm *SSnapshotPolicyCacheManager) FetchAllByRegionProvider(cloudregionId,
	managerId string) ([]SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) FetchAllBySnpId

func (spcm *SSnapshotPolicyCacheManager) FetchAllBySnpId(snapshotPolicyId string) ([]SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) FetchCustomizeColumns

func (spcm *SSnapshotPolicyCacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SnapshotPolicyCacheDetails

func (*SSnapshotPolicyCacheManager) FetchSnapshotPolicyCache

func (spcm *SSnapshotPolicyCacheManager) FetchSnapshotPolicyCache(snapshotPolicyId, regionId, providerId string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) FetchSnapshotPolicyCacheByExtId

func (spcm *SSnapshotPolicyCacheManager) FetchSnapshotPolicyCacheByExtId(externalId, regionId,
	providerId string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) FetchSnapshotpolicyCaheById

func (spcm *SSnapshotPolicyCacheManager) FetchSnapshotpolicyCaheById(cacheId string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) ListItemExportKeys

func (*SSnapshotPolicyCacheManager) ListItemFilter

快照策略缓存列表

func (*SSnapshotPolicyCacheManager) NewCache

func (spcm *SSnapshotPolicyCacheManager) NewCache(ctx context.Context, userCred mcclient.TokenCredential,
	snapshotPolicyId, regionId, providerId string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) NewCacheWithExternalId

func (spcm *SSnapshotPolicyCacheManager) NewCacheWithExternalId(ctx context.Context, userCred mcclient.TokenCredential,
	snapshotPolicyId, externalId, regionId, providerId string, name string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) OrderByExtraFields

func (*SSnapshotPolicyCacheManager) QueryDistinctExtraField

func (spcm *SSnapshotPolicyCacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSnapshotPolicyCacheManager) Register

func (spcm *SSnapshotPolicyCacheManager) Register(ctx context.Context, userCred mcclient.TokenCredential, snapshotPolicyId,
	regionId string, providerId string) (*SSnapshotPolicyCache, error)

func (*SSnapshotPolicyCacheManager) ResourceScope

func (manager *SSnapshotPolicyCacheManager) ResourceScope() rbacutils.TRbacScope

func (*SSnapshotPolicyCacheManager) UpdateCloudSnapshotPolicy

func (spcm *SSnapshotPolicyCacheManager) UpdateCloudSnapshotPolicy(snapshotPolicyId string,
	input *cloudprovider.SnapshotPolicyInput) error

type SSnapshotPolicyDisk

type SSnapshotPolicyDisk struct {
	db.SVirtualJointResourceBase

	SSnapshotPolicyResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	SDiskResourceBase           `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	Status                      string `width:"36" charset:"ascii" nullable:"false" default:"init" list:"user" create:"optional"`
	NextSyncTime                time.Time
}

func (*SSnapshotPolicyDisk) CustomizeCreate

func (*SSnapshotPolicyDisk) CustomizeDelete

func (sd *SSnapshotPolicyDisk) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject,
	data jsonutils.JSONObject) error

func (*SSnapshotPolicyDisk) Delete

func (*SSnapshotPolicyDisk) Detach

func (*SSnapshotPolicyDisk) DetachByDisk

func (sd *SSnapshotPolicyDisk) DetachByDisk(ctx context.Context, userCred mcclient.TokenCredential, disk *SDisk) error

syncDetach should lock before

func (*SSnapshotPolicyDisk) DetachBySnapshotpolicy

func (sd *SSnapshotPolicyDisk) DetachBySnapshotpolicy(ctx context.Context, userCred mcclient.TokenCredential,
	snapshotPolicy *SSnapshotPolicy) error

func (*SSnapshotPolicyDisk) PostCreate

func (*SSnapshotPolicyDisk) RealDetach

func (sd *SSnapshotPolicyDisk) RealDetach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshotPolicyDisk) SetStatus

func (sd *SSnapshotPolicyDisk) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error

type SSnapshotPolicyDiskManager

var SnapshotPolicyDiskManager *SSnapshotPolicyDiskManager

func (*SSnapshotPolicyDiskManager) FetchAllByDiskID

func (m *SSnapshotPolicyDiskManager) FetchAllByDiskID(ctx context.Context, userCred mcclient.TokenCredential,
	diskID string) ([]SSnapshotPolicyDisk, error)

func (*SSnapshotPolicyDiskManager) FetchAllBySnapshotpolicyID

func (m *SSnapshotPolicyDiskManager) FetchAllBySnapshotpolicyID(ctx context.Context, userCred mcclient.TokenCredential,
	snapshotPolicyID string) ([]SSnapshotPolicyDisk, error)

func (*SSnapshotPolicyDiskManager) FetchBySnapshotPolicyDisk

func (m *SSnapshotPolicyDiskManager) FetchBySnapshotPolicyDisk(spId, diskId string) (*SSnapshotPolicyDisk, error)

func (*SSnapshotPolicyDiskManager) FetchCustomizeColumns

func (manager *SSnapshotPolicyDiskManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SnapshotPolicyDiskDetails

func (*SSnapshotPolicyDiskManager) FetchDiskCountBySPID

func (m *SSnapshotPolicyDiskManager) FetchDiskCountBySPID(snapshotpolicyID string) (int, error)

func (*SSnapshotPolicyDiskManager) GetMasterFieldName

func (m *SSnapshotPolicyDiskManager) GetMasterFieldName() string

func (*SSnapshotPolicyDiskManager) GetSlaveFieldName

func (m *SSnapshotPolicyDiskManager) GetSlaveFieldName() string

func (*SSnapshotPolicyDiskManager) InitializeData

func (sdm *SSnapshotPolicyDiskManager) InitializeData() error

func (*SSnapshotPolicyDiskManager) ListItemExportKeys

func (*SSnapshotPolicyDiskManager) ListItemFilter

func (*SSnapshotPolicyDiskManager) OrderByExtraFields

func (*SSnapshotPolicyDiskManager) QueryDistinctExtraField

func (manager *SSnapshotPolicyDiskManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSnapshotPolicyDiskManager) SyncAttachDisk

func (m *SSnapshotPolicyDiskManager) SyncAttachDisk(ctx context.Context, userCred mcclient.TokenCredential,
	Snapshotpolicies []string, syncOwnerID mcclient.IIdentityProvider, disk *SDisk) error

func (*SSnapshotPolicyDiskManager) SyncAttachDiskExt

func (m *SSnapshotPolicyDiskManager) SyncAttachDiskExt(ctx context.Context, userCred mcclient.TokenCredential,
	extSnapshotpolicies []string, syncOwnerID mcclient.IIdentityProvider, disk *SDisk, storage *SStorage) error

func (*SSnapshotPolicyDiskManager) SyncByDisk

func (m *SSnapshotPolicyDiskManager) SyncByDisk(ctx context.Context, userCred mcclient.TokenCredential,
	extSnapshotpolicies []string, syncOwnerID mcclient.IIdentityProvider, disk *SDisk, storage *SStorage) error

func (*SSnapshotPolicyDiskManager) SyncDetachByDisk

func (m *SSnapshotPolicyDiskManager) SyncDetachByDisk(ctx context.Context, userCred mcclient.TokenCredential,
	cloudRelations []SSnapshotPolicyDisk, disk *SDisk) error

SyncDetachByDisk will detach all snapshot policies fo cloudRelations if cloudRelations is nil, it will detach all shapshot policies which has been attached to disk.

func (*SSnapshotPolicyDiskManager) SyncDetachBySnapshotpolicy

func (m *SSnapshotPolicyDiskManager) SyncDetachBySnapshotpolicy(ctx context.Context,
	userCred mcclient.TokenCredential, cloudRelations []SSnapshotPolicyDisk, snapshotPolicy *SSnapshotPolicy) error

SyncDetachBySnapshotpolicy detach all sn

func (*SSnapshotPolicyDiskManager) ValidateCreateData

type SSnapshotPolicyManager

type SSnapshotPolicyManager struct {
	db.SVirtualResourceBaseManager
}
var SnapshotPolicyManager *SSnapshotPolicyManager

func (*SSnapshotPolicyManager) CustomizeFilterList

func (*SSnapshotPolicyManager) FetchAllByIds

func (manager *SSnapshotPolicyManager) FetchAllByIds(spIds []string) ([]SSnapshotPolicy, error)

func (*SSnapshotPolicyManager) FetchCustomizeColumns

func (manager *SSnapshotPolicyManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SnapshotPolicyDetails

func (*SSnapshotPolicyManager) FetchProjectId

func (spm *SSnapshotPolicyManager) FetchProjectId(ctx context.Context, userCred mcclient.TokenCredential,
	syncOwnerId mcclient.IIdentityProvider, cloudSP cloudprovider.ICloudSnapshotPolicy, managerId string) string

func (*SSnapshotPolicyManager) FetchSnapshotPolicyById

func (manager *SSnapshotPolicyManager) FetchSnapshotPolicyById(spId string) (*SSnapshotPolicy, error)

func (*SSnapshotPolicyManager) GetSnapshotPoliciesAt

func (manager *SSnapshotPolicyManager) GetSnapshotPoliciesAt(week, timePoint uint32) ([]string, error)

==================================================== fetch ==========================================================

func (*SSnapshotPolicyManager) ListItemFilter

快照策略列表

func (*SSnapshotPolicyManager) OnCreateComplete

func (manager *SSnapshotPolicyManager) OnCreateComplete(ctx context.Context, items []db.IModel,
	userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SSnapshotPolicyManager) OrderByExtraFields

func (manager *SSnapshotPolicyManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.SnapshotPolicyListInput,
) (*sqlchemy.SQuery, error)

func (*SSnapshotPolicyManager) QueryDistinctExtraField

func (manager *SSnapshotPolicyManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SSnapshotPolicyManager) RepeatWeekdaysParseIntArray

func (self *SSnapshotPolicyManager) RepeatWeekdaysParseIntArray(nums []int) uint8

func (*SSnapshotPolicyManager) RepeatWeekdaysToIntArray

func (self *SSnapshotPolicyManager) RepeatWeekdaysToIntArray(n uint8) []int

func (*SSnapshotPolicyManager) SyncSnapshotPolicies

func (manager *SSnapshotPolicyManager) SyncSnapshotPolicies(ctx context.Context, userCred mcclient.TokenCredential,
	provider *SCloudprovider, region *SCloudregion, cloudSPs []cloudprovider.ICloudSnapshotPolicy,
	syncOwnerId mcclient.IIdentityProvider) compare.SyncResult

==================================================== sync ===========================================================

func (*SSnapshotPolicyManager) TimePointsParseIntArray

func (self *SSnapshotPolicyManager) TimePointsParseIntArray(nums []int) uint32

func (*SSnapshotPolicyManager) TimePointsToIntArray

func (self *SSnapshotPolicyManager) TimePointsToIntArray(n uint32) []int

func (*SSnapshotPolicyManager) ValidateCreateData

func (*SSnapshotPolicyManager) ValidateListConditions

func (manager *SSnapshotPolicyManager) ValidateListConditions(ctx context.Context, userCred mcclient.TokenCredential,
	query *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSnapshotPolicyResourceBase

type SSnapshotPolicyResourceBase struct {
	// 本地快照策略ID
	SnapshotpolicyId string `width:"36" charset:"ascii" nullable:"false" create:"required"  index:"true" list:"user" json:"snapshotpolicy_id"`
}

func (*SSnapshotPolicyResourceBase) GetSnapshotPolicy

func (self *SSnapshotPolicyResourceBase) GetSnapshotPolicy() *SSnapshotPolicy

type SSnapshotPolicyResourceBaseManager

type SSnapshotPolicyResourceBaseManager struct{}

func (*SSnapshotPolicyResourceBaseManager) FetchCustomizeColumns

func (manager *SSnapshotPolicyResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.SnapshotPolicyResourceInfo

func (*SSnapshotPolicyResourceBaseManager) GetExportKeys

func (manager *SSnapshotPolicyResourceBaseManager) GetExportKeys() []string

func (*SSnapshotPolicyResourceBaseManager) GetOrderByFields

func (*SSnapshotPolicyResourceBaseManager) GetOrderBySubQuery

func (*SSnapshotPolicyResourceBaseManager) ListItemExportKeys

func (*SSnapshotPolicyResourceBaseManager) ListItemFilter

func (*SSnapshotPolicyResourceBaseManager) OrderByExtraFields

func (*SSnapshotPolicyResourceBaseManager) QueryDistinctExtraField

func (manager *SSnapshotPolicyResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SStorage

type SStorage struct {
	db.SEnabledStatusInfrasResourceBase `"status->default":"offline" "status->update":"domain" "enabled->default":"true"`
	db.SExternalizedResourceBase

	SManagedResourceBase
	SZoneResourceBase `update:""`

	// 容量大小,单位Mb
	Capacity int64 `nullable:"false" list:"user" update:"domain" create:"domain_required"`
	// 实际容量大小,单位Mb
	// we always expect actual capacity great or equal than zero, otherwise something wrong
	ActualCapacityUsed int64 `nullable:"true" list:"user" update:"domain" create:"domain_optional"`
	// 预留容量大小
	Reserved int64 `nullable:"true" default:"0" list:"domain" update:"domain"`
	// 存储类型
	// example: local
	StorageType string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"domain_required"`
	// 介质类型
	// example: ssd
	MediumType string `width:"32" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
	// 超售比
	Cmtbound float32 `nullable:"true" default:"1" list:"domain" update:"domain"`
	// 存储配置信息
	StorageConf jsonutils.JSONObject `nullable:"true" get:"domain" list:"domain" update:"domain"`

	// 存储缓存Id
	StoragecacheId string `width:"36" charset:"ascii" nullable:"true" list:"domain" get:"domain" update:"domain" create:"domain_optional"`

	// indicating whether system disk can be allocated in this storage
	// 是否可以用作系统盘存储
	// example: true
	IsSysDiskStore tristate.TriState `default:"true" list:"user" create:"optional" update:"domain"`
}

func ChooseLeastUsedStorage

func ChooseLeastUsedStorage(storages []SStorage, backend string) *SStorage

func (*SStorage) ClearSchedDescCache

func (self *SStorage) ClearSchedDescCache() error

func (*SStorage) CustomizeCreate

func (self *SStorage) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SStorage) Delete

func (self *SStorage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStorage) GetAllAttachingHosts

func (self *SStorage) GetAllAttachingHosts() []SHost

func (*SStorage) GetAttachedHosts

func (self *SStorage) GetAttachedHosts() ([]SHost, error)

func (*SStorage) GetCapacity

func (self *SStorage) GetCapacity() int64

func (*SStorage) GetChangeOwnerRequiredDomainIds

func (storage *SStorage) GetChangeOwnerRequiredDomainIds() []string

func (*SStorage) GetDiskCount

func (self *SStorage) GetDiskCount() (int, error)

func (*SStorage) GetDisks

func (self *SStorage) GetDisks() []SDisk

func (*SStorage) GetDynamicConditionInput

func (self *SStorage) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SStorage) GetFreeCapacity

func (self *SStorage) GetFreeCapacity() int64

func (*SStorage) GetHostCount

func (self *SStorage) GetHostCount() (int, error)

func (*SStorage) GetIStorage

func (self *SStorage) GetIStorage(ctx context.Context) (cloudprovider.ICloudStorage, error)

func (*SStorage) GetMasterHost

func (self *SStorage) GetMasterHost() (*SHost, error)

func (*SStorage) GetOvercommitBound

func (self *SStorage) GetOvercommitBound() float32

func (*SStorage) GetRegion

func (self *SStorage) GetRegion() (*SCloudregion, error)

func (*SStorage) GetReserved

func (self *SStorage) GetReserved() int64

func (*SStorage) GetSchedtagJointManager

func (self *SStorage) GetSchedtagJointManager() ISchedtagJointManager

func (*SStorage) GetSchedtags

func (self *SStorage) GetSchedtags() []SSchedtag

func (*SStorage) GetShortDesc

func (self *SStorage) GetShortDesc(ctx context.Context) *jsonutils.JSONDict

func (*SStorage) GetStorageCachePath

func (self *SStorage) GetStorageCachePath(mountPoint, imageCachePath string) string

func (*SStorage) GetStoragecache

func (self *SStorage) GetStoragecache() *SStoragecache

func (*SStorage) GetUsedCapacity

func (self *SStorage) GetUsedCapacity(isReady tristate.TriState) int64

func (*SStorage) GetVisibleSnapshotCount

func (self *SStorage) GetVisibleSnapshotCount() (int, error)

func (*SStorage) GetZoneId

func (self *SStorage) GetZoneId() string

func (*SStorage) IsLocal

func (self *SStorage) IsLocal() bool

func (*SStorage) IsPrepaidRecycleResource

func (self *SStorage) IsPrepaidRecycleResource() bool

func (*SStorage) PerformCacheImage

func (self *SStorage) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.CacheImageInput) (jsonutils.JSONObject, error)

func (*SStorage) PerformChangeOwner

func (*SStorage) PerformDisable

func (self *SStorage) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStorage) PerformEnable

func (*SStorage) PerformForceDetachHost

func (storage *SStorage) PerformForceDetachHost(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.StorageForceDetachHostInput) (jsonutils.JSONObject, error)

func (*SStorage) PerformOffline

func (self *SStorage) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStorage) PerformOnline

func (*SStorage) PerformPrivate

func (storage *SStorage) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error)

func (*SStorage) PerformPublic

func (*SStorage) PerformSetSchedtag

func (self *SStorage) PerformSetSchedtag(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) PostCreate

func (self *SStorage) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SStorage) PostUpdate

func (self *SStorage) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SStorage) SetStatus

func (self *SStorage) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error

func (*SStorage) SetStoragecache

func (self *SStorage) SetStoragecache(userCred mcclient.TokenCredential, cache *SStoragecache) error

func (*SStorage) StartDeleteRbdDisks

func (self *SStorage) StartDeleteRbdDisks(ctx context.Context, userCred mcclient.TokenCredential, disksId []string) error

func (*SStorage) StartStorageUpdateTask

func (self *SStorage) StartStorageUpdateTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStorage) SyncCapacityUsed

func (s *SStorage) SyncCapacityUsed(ctx context.Context) error

func (*SStorage) SyncStatusWithHosts

func (self *SStorage) SyncStatusWithHosts()

func (*SStorage) ValidateDeleteCondition

func (self *SStorage) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SStorage) ValidateUpdateData

func (self *SStorage) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.StorageUpdateInput) (api.StorageUpdateInput, error)

type SStorageCapacity

type SStorageCapacity struct {
	Capacity   int64 `json:"capacity,omitzero"`
	Used       int64 `json:"used_capacity,omitzero"`
	ActualUsed int64 `json:"real_time_used_capacity,omitzero"`
	Wasted     int64 `json:"waste_capacity,omitzero"`
	VCapacity  int64 `json:"virtual_capacity,omitzero"`
}

func (*SStorageCapacity) Add

func (cap *SStorageCapacity) Add(cap2 SStorageCapacity)

func (*SStorageCapacity) GetCommitRate

func (cap *SStorageCapacity) GetCommitRate() float64

func (*SStorageCapacity) GetFree

func (cap *SStorageCapacity) GetFree() int64

type SStorageManager

var StorageManager *SStorageManager

func (*SStorageManager) FetchCustomizeColumns

func (manager *SStorageManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.StorageDetails

func (*SStorageManager) FetchStorageById

func (manager *SStorageManager) FetchStorageById(storageId string) *SStorage

func (*SStorageManager) FetchStorageByIds

func (manager *SStorageManager) FetchStorageByIds(ids []string) ([]SStorage, error)

func (*SStorageManager) GetContextManagers

func (manager *SStorageManager) GetContextManagers() [][]db.IModelManager

func (*SStorageManager) GetStorageTypesByHostType

func (manager *SStorageManager) GetStorageTypesByHostType(hostType string) ([]string, error)

func (*SStorageManager) InitializeData

func (manager *SStorageManager) InitializeData() error

func (*SStorageManager) IsStorageTypeExist

func (manager *SStorageManager) IsStorageTypeExist(storageType string) (string, bool)

func (*SStorageManager) ListItemExportKeys

func (manager *SStorageManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SStorageManager) ListItemFilter

func (manager *SStorageManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.StorageListInput,
) (*sqlchemy.SQuery, error)

块存储列表

func (*SStorageManager) OrderByExtraFields

func (manager *SStorageManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.StorageListInput,
) (*sqlchemy.SQuery, error)

func (*SStorageManager) QueryDistinctExtraField

func (manager *SStorageManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SStorageManager) StorageSnapshotsRecycle

func (manager *SStorageManager) StorageSnapshotsRecycle(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SStorageManager) SyncCapacityUsedForEsxiStorage

func (sm *SStorageManager) SyncCapacityUsedForEsxiStorage(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SStorageManager) SyncCapacityUsedForStorage

func (sm *SStorageManager) SyncCapacityUsedForStorage(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SStorageManager) SyncStorages

func (*SStorageManager) TotalCapacity

func (manager *SStorageManager) TotalCapacity(
	rangeObjs []db.IStandaloneModel,
	hostTypes []string,
	resourceTypes []string,
	providers []string, brands []string, cloudEnv string,
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	pendingDeleted bool, includeSystem bool,
	storageOwnership bool,
	policyResult rbacutils.SPolicyResult,
) StoragesCapacityStat

func (*SStorageManager) ValidateCreateData

type SStorageResourceBase

type SStorageResourceBase struct {
	StorageId string `width:"36" charset:"ascii" nullable:"true" list:"user" index:"true" create:"optional"`
}

func (*SStorageResourceBase) GetChangeOwnerCandidateDomainIds

func (model *SStorageResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SStorageResourceBase) GetStorage

func (self *SStorageResourceBase) GetStorage() *SStorage

type SStorageResourceBaseManager

type SStorageResourceBaseManager struct {
	SZoneResourceBaseManager
	SManagedResourceBaseManager
}

func (*SStorageResourceBaseManager) FetchCustomizeColumns

func (manager *SStorageResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.StorageResourceInfo

func (*SStorageResourceBaseManager) GetExportKeys

func (manager *SStorageResourceBaseManager) GetExportKeys() []string

func (*SStorageResourceBaseManager) GetOrderByFields

func (manager *SStorageResourceBaseManager) GetOrderByFields(query api.StorageFilterListInput) []string

func (*SStorageResourceBaseManager) GetOrderBySubQuery

func (manager *SStorageResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.StorageFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SStorageResourceBaseManager) ListItemExportKeys

func (*SStorageResourceBaseManager) ListItemFilter

func (*SStorageResourceBaseManager) OrderByExtraFields

func (*SStorageResourceBaseManager) QueryDistinctExtraField

func (manager *SStorageResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SStoragecache

type SStoragecache struct {
	db.SStandaloneResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase

	// 镜像存储地址
	Path string `width:"256" charset:"utf8" nullable:"true" list:"user" update:"admin" create:"admin_optional"` // = Column(VARCHAR(256, charset='utf8'), nullable=True)
}

func (*SStoragecache) CheckCloudimages

func (self *SStoragecache) CheckCloudimages(ctx context.Context, userCred mcclient.TokenCredential, regionName, regionId string) error

func (*SStoragecache) CustomizeDelete

func (cache *SStoragecache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SStoragecache) GetEsxiAgentHostDesc

func (self *SStoragecache) GetEsxiAgentHostDesc() (*jsonutils.JSONDict, error)

func (*SStoragecache) GetHost

func (self *SStoragecache) GetHost() (*SHost, error)

func (*SStoragecache) GetHosts

func (self *SStoragecache) GetHosts() ([]SHost, error)

func (*SStoragecache) GetIStorageCache

func (self *SStoragecache) GetIStorageCache(ctx context.Context) (cloudprovider.ICloudStoragecache, error)

func (*SStoragecache) GetRegion

func (self *SStoragecache) GetRegion() (*SCloudregion, error)

func (*SStoragecache) IsReachCapacityLimit

func (self *SStoragecache) IsReachCapacityLimit(imageId string) bool

func (*SStoragecache) PerformCacheImage

func (self *SStoragecache) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.CacheImageInput) (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, input api.CacheImageInput) error

func (*SStoragecache) StartImageUncacheTask

func (self *SStoragecache) StartImageUncacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isPurge bool, parentTaskId string) error

func (*SStoragecache) StartRelinquishLeastUsedCachedImageTask

func (self *SStoragecache) StartRelinquishLeastUsedCachedImageTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, parentTaskId string) error

func (*SStoragecache) SyncCloudImages

func (self *SStoragecache) SyncCloudImages(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	iStoragecache cloudprovider.ICloudStoragecache,
	region *SCloudregion,
) compare.SyncResult

func (*SStoragecache) ValidateDeleteCondition

func (self *SStoragecache) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SStoragecacheManager

var StoragecacheManager *SStoragecacheManager

func (*SStoragecacheManager) FetchCustomizeColumns

func (manager *SStoragecacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.StoragecacheDetails

func (*SStoragecacheManager) FetchStoragecacheById

func (manager *SStoragecacheManager) FetchStoragecacheById(storageCacheId string) *SStoragecache

func (*SStoragecacheManager) GetCachePathById

func (manager *SStoragecacheManager) GetCachePathById(storageCacheId string) string

func (*SStoragecacheManager) ListItemExportKeys

func (manager *SStoragecacheManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SStoragecacheManager) ListItemFilter

func (manager *SStoragecacheManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.StoragecacheListInput,
) (*sqlchemy.SQuery, error)

镜像缓存存储列表

func (*SStoragecacheManager) OrderByExtraFields

func (manager *SStoragecacheManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.StoragecacheListInput,
) (*sqlchemy.SQuery, error)

func (*SStoragecacheManager) QueryDistinctExtraField

func (manager *SStoragecacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SStoragecacheManager) SyncWithCloudStoragecache

func (manager *SStoragecacheManager) SyncWithCloudStoragecache(ctx context.Context, userCred mcclient.TokenCredential, cloudCache cloudprovider.ICloudStoragecache, provider *SCloudprovider) (*SStoragecache, bool, error)

type SStoragecacheResourceBase

type SStoragecacheResourceBase struct {
	// 存储缓存Id
	StoragecacheId string `width:"36" charset:"ascii" nullable:"true" list:"user" index:"true" create:"optional"`
}

func (*SStoragecacheResourceBase) GetChangeOwnerCandidateDomainIds

func (model *SStoragecacheResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SStoragecacheResourceBase) GetStoragecache

func (self *SStoragecacheResourceBase) GetStoragecache() *SStoragecache

type SStoragecacheResourceBaseManager

type SStoragecacheResourceBaseManager struct {
	SManagedResourceBaseManager
}

func (*SStoragecacheResourceBaseManager) FetchCustomizeColumns

func (manager *SStoragecacheResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.StoragecacheResourceInfo

func (*SStoragecacheResourceBaseManager) GetExportKeys

func (manager *SStoragecacheResourceBaseManager) GetExportKeys() []string

func (*SStoragecacheResourceBaseManager) GetOrderByFields

func (manager *SStoragecacheResourceBaseManager) GetOrderByFields(query api.StoragecacheFilterListInput) []string

func (*SStoragecacheResourceBaseManager) GetOrderBySubQuery

func (*SStoragecacheResourceBaseManager) ListItemExportKeys

func (*SStoragecacheResourceBaseManager) ListItemFilter

func (*SStoragecacheResourceBaseManager) OrderByExtraFields

func (*SStoragecacheResourceBaseManager) QueryDistinctExtraField

func (manager *SStoragecacheResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SStoragecachedimage

type SStoragecachedimage struct {
	db.SJointResourceBase
	db.SExternalizedResourceBase

	SStoragecacheResourceBase
	// 镜像缓存Id
	CachedimageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`

	// 镜像状态
	Status string `width:"32" charset:"ascii" nullable:"false" default:"init" list:"admin" update:"admin" create:"admin_required"`
	Path   string `width:"256" charset:"utf8" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`
	// 上次下载时间
	LastDownload time.Time `get:"admin"`
	// 下载引用次数
	DownloadRefcnt int `get:"admin"`
}

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) GetExternalId

func (self SStoragecachedimage) GetExternalId() string

func (*SStoragecachedimage) GetHost

func (self *SStoragecachedimage) GetHost() (*SHost, error)

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) ValidateDeleteCondition

func (self *SStoragecachedimage) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SStoragecachedimageManager

var StoragecachedimageManager *SStoragecachedimageManager

func (*SStoragecachedimageManager) FetchCustomizeColumns

func (manager *SStoragecachedimageManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.StoragecachedimageDetails

func (*SStoragecachedimageManager) GetMasterFieldName

func (manager *SStoragecachedimageManager) GetMasterFieldName() string

func (*SStoragecachedimageManager) GetSlaveFieldName

func (manager *SStoragecachedimageManager) GetSlaveFieldName() string

func (*SStoragecachedimageManager) GetStoragecachedimage

func (manager *SStoragecachedimageManager) GetStoragecachedimage(cacheId string, imageId string) *SStoragecachedimage

func (*SStoragecachedimageManager) InitializeData

func (manager *SStoragecachedimageManager) InitializeData() error

func (*SStoragecachedimageManager) ListItemFilter

func (*SStoragecachedimageManager) OrderByExtraFields

func (*SStoragecachedimageManager) Register

func (manager *SStoragecachedimageManager) Register(ctx context.Context, userCred mcclient.TokenCredential, cacheId, imageId string, status string) *SStoragecachedimage

type SStorageschedtag

type SStorageschedtag struct {
	SSchedtagJointsBase

	StorageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SStorageschedtag) Delete

func (joint *SStorageschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStorageschedtag) Detach

func (joint *SStorageschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStorageschedtag) GetDetails

func (joint *SStorageschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SStorageschedtag) GetResourceId

func (joint *SStorageschedtag) GetResourceId() string

type SStorageschedtagManager

type SStorageschedtagManager struct {
	*SSchedtagJointsManager
	// contains filtered or unexported fields
}
var (
	StorageschedtagManager *SStorageschedtagManager
)

func (*SStorageschedtagManager) GetMasterFieldName

func (manager *SStorageschedtagManager) GetMasterFieldName() string

func (*SStorageschedtagManager) ListItemFilter

func (*SStorageschedtagManager) OrderByExtraFields

func (manager *SStorageschedtagManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.StorageschedtagListInput,
) (*sqlchemy.SQuery, error)

type SSyncRange

type SSyncRange struct {
	api.SyncRangeInput
}

func (*SSyncRange) GetRegionIds

func (sr *SSyncRange) GetRegionIds() ([]string, error)

func (*SSyncRange) NeedSyncInfo

func (sr *SSyncRange) NeedSyncInfo() bool

func (*SSyncRange) NeedSyncResource

func (sr *SSyncRange) NeedSyncResource(res string) bool

func (*SSyncRange) Normalize

func (sr *SSyncRange) Normalize() error

type SSyncResultSet

type SSyncResultSet map[string]*SyncResult

func (SSyncResultSet) Add

func (set SSyncResultSet) Add(manager db.IModelManager, result compare.SyncResult)

func (SSyncResultSet) AddRequestCost

func (set SSyncResultSet) AddRequestCost(manager db.IModelManager) func()

func (SSyncResultSet) AddSqlCost

func (set SSyncResultSet) AddSqlCost(manager db.IModelManager) func()

type SSyncableBaseResource

type SSyncableBaseResource struct {
	SyncStatus    string    `width:"10" charset:"ascii" default:"idle" list:"domain"`
	LastSync      time.Time `list:"domain"` // = Column(DateTime, nullable=True)
	LastSyncEndAt time.Time `list:"domain"`
}

func (*SSyncableBaseResource) CanSync

func (self *SSyncableBaseResource) CanSync() bool

type SSyncableBaseResourceManager

type SSyncableBaseResourceManager struct{}

func (*SSyncableBaseResourceManager) ListItemFilter

type STablestore

func (*STablestore) Delete

func (self *STablestore) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*STablestore) RealDelete

func (self *STablestore) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*STablestore) SyncWithCloudTablestore

func (self *STablestore) SyncWithCloudTablestore(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudTablestore, provider *SCloudprovider) error

func (*STablestore) ValidateDeleteCondition

func (self *STablestore) ValidateDeleteCondition(ctx context.Context, data *api.TablestoreDetails) error

func (*STablestore) ValidateUpdateCondition

func (self *STablestore) ValidateUpdateCondition(ctx context.Context) error

func (*STablestore) ValidateUpdateData

type STablestoreManager

var TablestoreManager *STablestoreManager

func (*STablestoreManager) AllowScope

func (manager *STablestoreManager) AllowScope(userCred mcclient.TokenCredential) rbacutils.TRbacScope

func (*STablestoreManager) FetchCustomizeColumns

func (manager *STablestoreManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.TablestoreDetails

func (*STablestoreManager) GetContextManagers

func (manager *STablestoreManager) GetContextManagers() [][]db.IModelManager

func (*STablestoreManager) ListItemExportKeys

func (manager *STablestoreManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*STablestoreManager) ListItemFilter

func (manager *STablestoreManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.TablestoreListInput,
) (*sqlchemy.SQuery, error)

Tablestore列表

func (*STablestoreManager) OrderByExtraFields

func (manager *STablestoreManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input api.TablestoreListInput,
) (*sqlchemy.SQuery, error)

func (*STablestoreManager) QueryDistinctExtraField

func (manager *STablestoreManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*STablestoreManager) ValidateCreateData

type STimer

type STimer struct {
	// Cycle type
	Type string `width:"8" charset:"ascii"`
	// 0-59
	Minute int `nullable:"false"`
	// 0-23
	Hour int `nullable:"false"`
	// 0-7 1 is Monday 0 is unlimited
	WeekDays uint8 `nullable:"false"`
	// 0-31 0 is unlimited
	MonthDays uint32 `nullable:"false"`

	// StartTime represent the start time of this timer
	StartTime time.Time
	// EndTime represent deadline of this timer
	EndTime time.Time
	// NextTime represent the time timer should bell
	NextTime  time.Time `index:"true"`
	IsExpired bool
}

func (*STimer) CycleTimerDetails

func (st *STimer) CycleTimerDetails() api.CycleTimerDetails

func (*STimer) Description

func (st *STimer) Description(ctx context.Context) string

func (*STimer) GetMonthDays

func (st *STimer) GetMonthDays() []int

func (*STimer) GetWeekDays

func (st *STimer) GetWeekDays() []int

func (*STimer) MonthDaySum

func (st *STimer) MonthDaySum(t time.Time) int

MonthDaySum calculate the number of month's days

func (*STimer) SetMonthDays

func (st *STimer) SetMonthDays(days []int)

func (*STimer) SetWeekDays

func (st *STimer) SetWeekDays(days []int)

func (*STimer) TimerDetails

func (st *STimer) TimerDetails() api.TimerDetails

func (*STimer) Update

func (st *STimer) Update(now time.Time)

Update will update the SScalingTimer

type SVpc

type SVpc struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase

	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"domain_required" default:"default"`

	SGlobalVpcResourceBase `width:"36" charset:"ascii" list:"user" json:"globalvpc_id"`

	// 是否是默认VPC
	// example: true
	IsDefault bool `default:"false" list:"domain" create:"domain_optional"`

	// CIDR地址段
	// example: 192.168.222.0/24
	CidrBlock string `charset:"ascii" nullable:"true" list:"domain" create:"domain_optional"`

	// Vpc外网访问模式
	ExternalAccessMode string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	// Can it be connected directly
	Direct bool `default:"false" list:"user" update:"user"`
}

func (*SVpc) BackSycVpcPeeringConnectionsVpc

func (self *SVpc) BackSycVpcPeeringConnectionsVpc(exts []cloudprovider.ICloudVpcPeeringConnection) compare.SyncResult

func (*SVpc) CustomizeCreate

func (self *SVpc) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, 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) Delete

func (self *SVpc) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) GetAccepterVpcPeeringConnectionByExtId

func (self *SVpc) GetAccepterVpcPeeringConnectionByExtId(extId string) (*SVpcPeeringConnection, error)

func (*SVpc) GetAccepterVpcPeeringConnections

func (self *SVpc) GetAccepterVpcPeeringConnections() ([]SVpcPeeringConnection, error)

func (*SVpc) GetChangeOwnerCandidateDomainIds

func (vpc *SVpc) GetChangeOwnerCandidateDomainIds() []string

func (*SVpc) GetChangeOwnerRequiredDomainIds

func (vpc *SVpc) GetChangeOwnerRequiredDomainIds() []string

func (*SVpc) GetCloudRegionId

func (self *SVpc) GetCloudRegionId() string

func (*SVpc) GetDetailsTopology

func (self *SVpc) GetDetailsTopology(ctx context.Context, userCred mcclient.TokenCredential, input *api.VpcTopologyInput) (*api.VpcTopologyOutput, error)

func (*SVpc) GetDnsZoneCount

func (self *SVpc) GetDnsZoneCount() (int, error)

func (*SVpc) GetDnsZones

func (self *SVpc) GetDnsZones() ([]SDnsZone, error)

func (*SVpc) GetIPv6Gateways

func (self *SVpc) GetIPv6Gateways() ([]SIPv6Gateway, error)

func (*SVpc) GetIRegion

func (self *SVpc) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SVpc) GetIVpc

func (self *SVpc) GetIVpc(ctx context.Context) (cloudprovider.ICloudVpc, error)

func (*SVpc) GetInterVpcNetworks

func (self *SVpc) GetInterVpcNetworks() ([]SInterVpcNetwork, error)

func (*SVpc) GetNatgatewayCount

func (self *SVpc) GetNatgatewayCount() (int, error)

func (*SVpc) GetNatgateways

func (self *SVpc) GetNatgateways() ([]SNatGateway, error)

func (*SVpc) GetNetworkByExtId

func (self *SVpc) GetNetworkByExtId(extId string) (*SNetwork, error)

func (*SVpc) GetNetworkCount

func (self *SVpc) GetNetworkCount() (int, error)

func (*SVpc) GetNetworks

func (self *SVpc) GetNetworks() ([]SNetwork, error)

func (*SVpc) GetQuotaKeys

func (vpc *SVpc) GetQuotaKeys() quotas.SDomainRegionalCloudResourceKeys

func (*SVpc) GetRegion

func (self *SVpc) GetRegion() (*SCloudregion, error)

func (*SVpc) GetRequesterVpcPeeringConnections

func (self *SVpc) GetRequesterVpcPeeringConnections() ([]SVpcPeeringConnection, error)

func (*SVpc) GetRequiredSharedDomainIds

func (vpc *SVpc) GetRequiredSharedDomainIds() []string

func (*SVpc) GetRouteTableCount

func (self *SVpc) GetRouteTableCount() (int, error)

func (*SVpc) GetRouteTableQuery

func (self *SVpc) GetRouteTableQuery() *sqlchemy.SQuery

func (*SVpc) GetRouteTables

func (self *SVpc) GetRouteTables() []SRouteTable

func (*SVpc) GetUsages

func (vpc *SVpc) GetUsages() []db.IUsage

func (*SVpc) GetVpcPeeringConnectionByExtId

func (self *SVpc) GetVpcPeeringConnectionByExtId(extId string) (*SVpcPeeringConnection, error)

func (*SVpc) GetVpcPeeringConnectionCount

func (self *SVpc) GetVpcPeeringConnectionCount() (int, error)

func (*SVpc) GetVpcPeeringConnections

func (self *SVpc) GetVpcPeeringConnections() ([]SVpcPeeringConnection, error)

func (*SVpc) GetWireCount

func (self *SVpc) GetWireCount() (int, error)

func (*SVpc) GetWires

func (self *SVpc) GetWires() ([]SWire, error)

func (*SVpc) IsSupportAssociateEip

func (self *SVpc) IsSupportAssociateEip() bool

func (*SVpc) PerformPrivate

func (vpc *SVpc) PerformPrivate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformPrivateInput) (jsonutils.JSONObject, error)

func (*SVpc) PerformPublic

func (*SVpc) PerformPurge

func (self *SVpc) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SVpc) PerformSync

func (*SVpc) PerformSyncstatus

func (vpc *SVpc) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.VpcSyncstatusInput) (jsonutils.JSONObject, error)

同步VPC状态

func (*SVpc) PostCreate

func (self *SVpc) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SVpc) Purge

func (vpc *SVpc) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) RealDelete

func (self *SVpc) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) StartDeleteVpcTask

func (self *SVpc) StartDeleteVpcTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) SyncIPv6Gateways

func (self *SVpc) SyncIPv6Gateways(ctx context.Context, userCred mcclient.TokenCredential, exts []cloudprovider.ICloudIPv6Gateway, provider *SCloudprovider) compare.SyncResult

func (*SVpc) SyncRemoteWires

func (self *SVpc) SyncRemoteWires(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) SyncRouteTables

func (self *SVpc) SyncRouteTables(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) SyncVpcPeeringConnections

func (self *SVpc) SyncVpcPeeringConnections(ctx context.Context, userCred mcclient.TokenCredential, exts []cloudprovider.ICloudVpcPeeringConnection) compare.SyncResult

func (*SVpc) SyncWithCloudVpc

func (self *SVpc) SyncWithCloudVpc(ctx context.Context, userCred mcclient.TokenCredential, extVPC cloudprovider.ICloudVpc, provider *SCloudprovider) error

func (*SVpc) ValidateDeleteCondition

func (self *SVpc) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SVpc) ValidateUpdateData

func (self *SVpc) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.VpcUpdateInput) (api.VpcUpdateInput, error)

type SVpcManager

var VpcManager *SVpcManager

func (*SVpcManager) FetchCustomizeColumns

func (manager *SVpcManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.VpcDetails

func (*SVpcManager) GetContextManagers

func (manager *SVpcManager) GetContextManagers() [][]db.IModelManager

func (*SVpcManager) GetOrCreateVpcForClassicNetwork

func (manager *SVpcManager) GetOrCreateVpcForClassicNetwork(ctx context.Context, cloudprovider *SCloudprovider, region *SCloudregion) (*SVpc, error)

func (*SVpcManager) InitializeData

func (manager *SVpcManager) InitializeData() error

func (*SVpcManager) ListItemExportKeys

func (manager *SVpcManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SVpcManager) ListItemFilter

func (manager *SVpcManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.VpcListInput,
) (*sqlchemy.SQuery, error)

列出VPC

func (*SVpcManager) OrderByExtraFields

func (manager *SVpcManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.VpcListInput,
) (*sqlchemy.SQuery, error)

func (*SVpcManager) QueryDistinctExtraField

func (manager *SVpcManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SVpcManager) SyncVPCs

func (*SVpcManager) ValidateCreateData

func (manager *SVpcManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	input api.VpcCreateInput,
) (api.VpcCreateInput, error)

type SVpcPeeringConnection

type SVpcPeeringConnection struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SVpcResourceBase
	ExtPeerVpcId     string `width:"36" charset:"ascii" nullable:"true" list:"domain"`
	ExtPeerAccountId string `width:"36" charset:"ascii" nullable:"true" list:"domain"`
	PeerVpcId        string `width:"36" charset:"ascii" nullable:"true" list:"domain" create:"required" json:"peer_vpc_id"`
	PeerAccountId    string `width:"36" charset:"ascii" nullable:"true" list:"domain"`
	Bandwidth        int    `nullable:"false" default:"0" list:"user" create:"optional"`
}

func (*SVpcPeeringConnection) CustomizeDelete

func (self *SVpcPeeringConnection) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SVpcPeeringConnection) Delete

func (self *SVpcPeeringConnection) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpcPeeringConnection) GetPeerVpc

func (self *SVpcPeeringConnection) GetPeerVpc() (*SVpc, error)

func (*SVpcPeeringConnection) GetVpc

func (self *SVpcPeeringConnection) GetVpc() (*SVpc, error)

func (*SVpcPeeringConnection) PerformSyncstatus

同步状态

func (*SVpcPeeringConnection) PostCreate

func (*SVpcPeeringConnection) RealDelete

func (self *SVpcPeeringConnection) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpcPeeringConnection) StartDeleteVpcPeeringConnectionTask

func (self *SVpcPeeringConnection) StartDeleteVpcPeeringConnectionTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpcPeeringConnection) SyncWithCloudPeerConnection

func (self *SVpcPeeringConnection) SyncWithCloudPeerConnection(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudVpcPeeringConnection, provider *SCloudprovider) error

type SVpcPeeringConnectionManager

var VpcPeeringConnectionManager *SVpcPeeringConnectionManager

func (*SVpcPeeringConnectionManager) FetchCustomizeColumns

func (manager *SVpcPeeringConnectionManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.VpcPeeringConnectionDetails

func (*SVpcPeeringConnectionManager) GetContextManagers

func (manager *SVpcPeeringConnectionManager) GetContextManagers() [][]db.IModelManager

func (*SVpcPeeringConnectionManager) ListItemExportKeys

func (*SVpcPeeringConnectionManager) ListItemFilter

列表

func (*SVpcPeeringConnectionManager) OrderByExtraFields

func (*SVpcPeeringConnectionManager) QueryDistinctExtraField

func (manager *SVpcPeeringConnectionManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SVpcPeeringConnectionManager) ValidateCreateData

创建

type SVpcResourceBase

type SVpcResourceBase struct {
	VpcId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"vpc_id"`
}

func (*SVpcResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SVpcResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SVpcResourceBase) GetCloudprovider

func (self *SVpcResourceBase) GetCloudprovider() *SCloudprovider

func (*SVpcResourceBase) GetCloudproviderId

func (self *SVpcResourceBase) GetCloudproviderId() string

func (*SVpcResourceBase) GetIRegion

func (*SVpcResourceBase) GetProviderName

func (self *SVpcResourceBase) GetProviderName() string

func (*SVpcResourceBase) GetRegion

func (self *SVpcResourceBase) GetRegion() (*SCloudregion, error)

func (*SVpcResourceBase) GetRegionId

func (self *SVpcResourceBase) GetRegionId() string

func (*SVpcResourceBase) GetVpc

func (self *SVpcResourceBase) GetVpc() (*SVpc, error)

type SVpcResourceBaseManager

type SVpcResourceBaseManager struct {
	SCloudregionResourceBaseManager
	SManagedResourceBaseManager
}

func (*SVpcResourceBaseManager) FetchCustomizeColumns

func (manager *SVpcResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.VpcResourceInfo

func (*SVpcResourceBaseManager) GetExportKeys

func (manager *SVpcResourceBaseManager) GetExportKeys() []string

func (*SVpcResourceBaseManager) GetOrderByFields

func (manager *SVpcResourceBaseManager) GetOrderByFields(query api.VpcFilterListInput) []string

func (*SVpcResourceBaseManager) GetOrderBySubQuery

func (manager *SVpcResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	subqField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.VpcFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SVpcResourceBaseManager) ListItemExportKeys

func (*SVpcResourceBaseManager) ListItemFilter

func (manager *SVpcResourceBaseManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.VpcFilterListInput,
) (*sqlchemy.SQuery, error)

func (*SVpcResourceBaseManager) OrderByExtraFields

func (manager *SVpcResourceBaseManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.VpcFilterListInput,
) (*sqlchemy.SQuery, error)

func (*SVpcResourceBaseManager) QueryDistinctExtraField

func (manager *SVpcResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SVs2Wire

type SVs2Wire struct {
	WireId      string
	VsId        string
	Distributed bool
	Mac         string
	SyncTimes   int
}

type SWafIPSet

type SWafIPSet struct {
	db.SStatusInfrasResourceBase

	Addresses *cloudprovider.WafAddresses `list:"domain" update:"domain" create:"required"`
}

func (*SWafIPSet) CustomizeDelete

func (self *SWafIPSet) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafIPSet) Delete

func (self *SWafIPSet) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafIPSet) GetCaches

func (self *SWafIPSet) GetCaches() ([]SWafIPSetCache, error)

func (*SWafIPSet) RealDelete

func (self *SWafIPSet) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafIPSet) StartDeleteTask

func (self *SWafIPSet) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

type SWafIPSetCache

type SWafIPSetCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	Type       cloudprovider.TWafType `width:"20" charset:"utf8" nullable:"false" list:"user"`
	WafIPSetId string                 `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SWafIPSetCache) CustomizeDelete

func (self *SWafIPSetCache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafIPSetCache) Delete

func (self *SWafIPSetCache) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafIPSetCache) GetICloudWafIPSet

func (self *SWafIPSetCache) GetICloudWafIPSet(ctx context.Context) (cloudprovider.ICloudWafIPSet, error)

func (*SWafIPSetCache) GetIRegion

func (self *SWafIPSetCache) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SWafIPSetCache) RealDelete

func (self *SWafIPSetCache) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafIPSetCache) StartDeleteTask

func (self *SWafIPSetCache) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

type SWafIPSetCacheManager

var WafIPSetCacheManager *SWafIPSetCacheManager

func (*SWafIPSetCacheManager) FetchCustomizeColumns

func (manager *SWafIPSetCacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafIPSetCacheDetails

func (*SWafIPSetCacheManager) GetContextManagers

func (manager *SWafIPSetCacheManager) GetContextManagers() [][]db.IModelManager

func (*SWafIPSetCacheManager) ListItemExportKeys

func (manager *SWafIPSetCacheManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWafIPSetCacheManager) ListItemFilter

列出WAF IPSet缓存

func (*SWafIPSetCacheManager) OrderByExtraFields

func (manager *SWafIPSetCacheManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafIPSetCacheListInput,
) (*sqlchemy.SQuery, error)

func (*SWafIPSetCacheManager) QueryDistinctExtraField

func (manager *SWafIPSetCacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafIPSetManager

type SWafIPSetManager struct {
	db.SStatusInfrasResourceBaseManager
}
var WafIPSetManager *SWafIPSetManager

func (*SWafIPSetManager) FetchCustomizeColumns

func (manager *SWafIPSetManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafIPSetDetails

func (*SWafIPSetManager) ListItemExportKeys

func (manager *SWafIPSetManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWafIPSetManager) ListItemFilter

func (manager *SWafIPSetManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafIPSetListInput,
) (*sqlchemy.SQuery, error)

列出WAF IPSets

func (*SWafIPSetManager) OrderByExtraFields

func (manager *SWafIPSetManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafIPSetListInput,
) (*sqlchemy.SQuery, error)

func (*SWafIPSetManager) QueryDistinctExtraField

func (manager *SWafIPSetManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafInstance

type SWafInstance struct {
	db.SEnabledStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	Type          cloudprovider.TWafType       `width:"20" charset:"ascii" nullable:"false" list:"domain" create:"required"`
	DefaultAction *cloudprovider.DefaultAction `charset:"ascii" nullable:"true" list:"domain" create:"domain_optional"`
}

func (*SWafInstance) CustomizeDelete

func (self *SWafInstance) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafInstance) Delete

func (self *SWafInstance) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafInstance) GetDetailsCloudResources

func (self *SWafInstance) GetDetailsCloudResources(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (cloudprovider.SCloudResources, error)

获取WAF绑定的资源列表

func (*SWafInstance) GetICloudWafInstance

func (self *SWafInstance) GetICloudWafInstance(ctx context.Context) (cloudprovider.ICloudWafInstance, error)

func (*SWafInstance) GetIRegion

func (self *SWafInstance) GetIRegion(ctx context.Context) (cloudprovider.ICloudRegion, error)

func (*SWafInstance) GetWafRules

func (self *SWafInstance) GetWafRules() ([]SWafRule, error)

func (*SWafInstance) OnMetadataUpdated

func (self *SWafInstance) OnMetadataUpdated(ctx context.Context, userCred mcclient.TokenCredential)

func (*SWafInstance) PerformRemoteUpdate

func (*SWafInstance) PerformSyncstatus

func (self *SWafInstance) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WafSyncstatusInput) (jsonutils.JSONObject, error)

同步WAF状态

func (*SWafInstance) PostCreate

func (*SWafInstance) RealDelete

func (self *SWafInstance) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafInstance) StartCreateTask

func (self *SWafInstance) StartCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error

func (*SWafInstance) StartDeleteTask

func (self *SWafInstance) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafInstance) StartRemoteUpdateTask

func (self *SWafInstance) StartRemoteUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, replaceTags bool, parentTaskId string) error

func (*SWafInstance) SyncWafRules

func (*SWafInstance) SyncWithCloudWafInstance

func (self *SWafInstance) SyncWithCloudWafInstance(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudWafInstance) error

type SWafInstanceManager

var WafInstanceManager *SWafInstanceManager

func (*SWafInstanceManager) FetchCustomizeColumns

func (manager *SWafInstanceManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafInstanceDetails

func (*SWafInstanceManager) GetContextManagers

func (manager *SWafInstanceManager) GetContextManagers() [][]db.IModelManager

func (*SWafInstanceManager) ListItemExportKeys

func (manager *SWafInstanceManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWafInstanceManager) ListItemFilter

func (manager *SWafInstanceManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafInstanceListInput,
) (*sqlchemy.SQuery, error)

列出WAF实例

func (*SWafInstanceManager) OrderByExtraFields

func (manager *SWafInstanceManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafInstanceListInput,
) (*sqlchemy.SQuery, error)

func (*SWafInstanceManager) QueryDistinctExtraField

func (manager *SWafInstanceManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SWafInstanceManager) ValidateCreateData

type SWafRegexSet

type SWafRegexSet struct {
	db.SStatusInfrasResourceBase

	RegexPatterns *cloudprovider.WafRegexPatterns `list:"domain" update:"domain" create:"required"`
}

func (*SWafRegexSet) CustomizeDelete

func (self *SWafRegexSet) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafRegexSet) Delete

func (self *SWafRegexSet) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRegexSet) GetCaches

func (self *SWafRegexSet) GetCaches() ([]SWafRegexSetCache, error)

func (*SWafRegexSet) RealDelete

func (self *SWafRegexSet) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRegexSet) StartDeleteTask

func (self *SWafRegexSet) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

type SWafRegexSetCache

type SWafRegexSetCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	Type          cloudprovider.TWafType `width:"20" charset:"utf8" nullable:"false" list:"user"`
	WafRegexSetId string                 `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SWafRegexSetCache) CustomizeDelete

func (self *SWafRegexSetCache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafRegexSetCache) Delete

func (self *SWafRegexSetCache) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRegexSetCache) GetICloudWafRegexSet

func (self *SWafRegexSetCache) GetICloudWafRegexSet(ctx context.Context) (cloudprovider.ICloudWafRegexSet, error)

func (*SWafRegexSetCache) GetIRegion

func (*SWafRegexSetCache) RealDelete

func (self *SWafRegexSetCache) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRegexSetCache) StartDeleteTask

func (self *SWafRegexSetCache) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

type SWafRegexSetCacheManager

var WafRegexSetCacheManager *SWafRegexSetCacheManager

func (*SWafRegexSetCacheManager) FetchCustomizeColumns

func (manager *SWafRegexSetCacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafRegexSetCacheDetails

func (*SWafRegexSetCacheManager) GetContextManagers

func (manager *SWafRegexSetCacheManager) GetContextManagers() [][]db.IModelManager

func (*SWafRegexSetCacheManager) ListItemExportKeys

func (*SWafRegexSetCacheManager) ListItemFilter

列出WAF RegexSet缓存

func (*SWafRegexSetCacheManager) OrderByExtraFields

func (*SWafRegexSetCacheManager) QueryDistinctExtraField

func (manager *SWafRegexSetCacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafRegexSetManager

type SWafRegexSetManager struct {
	db.SStatusInfrasResourceBaseManager
}
var WafRegexSetManager *SWafRegexSetManager

func (*SWafRegexSetManager) FetchCustomizeColumns

func (manager *SWafRegexSetManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafRegexSetDetails

func (*SWafRegexSetManager) ListItemExportKeys

func (manager *SWafRegexSetManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWafRegexSetManager) ListItemFilter

func (manager *SWafRegexSetManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafRegexSetListInput,
) (*sqlchemy.SQuery, error)

列出WAF RegexSets

func (*SWafRegexSetManager) OrderByExtraFields

func (manager *SWafRegexSetManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafRegexSetListInput,
) (*sqlchemy.SQuery, error)

func (*SWafRegexSetManager) QueryDistinctExtraField

func (manager *SWafRegexSetManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafRule

type SWafRule struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	// 规则优先级
	Priority int `nullable:"false" list:"domain" create:"required"`
	// 规则默认行为
	Action *cloudprovider.DefaultAction `charset:"utf8" nullable:"true" list:"user" update:"domain" create:"required"`
	// 条件
	StatementConditon cloudprovider.TWafStatementCondition `width:"20" charset:"ascii" nullable:"false" list:"domain" create:"optional"`
	// 规则组的id
	WafRuleGroupId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"optional"`
	// 所属waf实例id
	WafInstanceId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"optional"`
}

func (*SWafRule) CustomizeDelete

func (self *SWafRule) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafRule) Delete

func (self *SWafRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (SWafRule) GetGlobalId

func (self SWafRule) GetGlobalId() string

func (*SWafRule) GetICloudWafInstance

func (self *SWafRule) GetICloudWafInstance(ctx context.Context) (cloudprovider.ICloudWafInstance, error)

func (*SWafRule) GetICloudWafRule

func (self *SWafRule) GetICloudWafRule(ctx context.Context) (cloudprovider.ICloudWafRule, error)

func (*SWafRule) GetOwnerId

func (self *SWafRule) GetOwnerId() mcclient.IIdentityProvider

func (*SWafRule) GetRuleStatements

func (self *SWafRule) GetRuleStatements() ([]SWafRuleStatement, error)

func (*SWafRule) GetWafInstance

func (self *SWafRule) GetWafInstance() (*SWafInstance, error)

func (*SWafRule) GetWafRuleGroup

func (self *SWafRule) GetWafRuleGroup() (*SWafRuleGroup, error)

func (*SWafRule) PerformSyncstatus

func (self *SWafRule) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WafSyncstatusInput) (jsonutils.JSONObject, error)

同步WAF规则状态

func (*SWafRule) PostCreate

func (self *SWafRule) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SWafRule) PostUpdate

func (self *SWafRule) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SWafRule) RealDelete

func (self *SWafRule) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRule) StartCreateTask

func (self *SWafRule) StartCreateTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRule) StartDeleteTask

func (self *SWafRule) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRule) StartUpdateTask

func (self *SWafRule) StartUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SWafRule) SyncStatements

func (self *SWafRule) SyncStatements(ctx context.Context, userCred mcclient.TokenCredential, rule cloudprovider.ICloudWafRule) error

func (*SWafRule) SyncWithCloudRule

func (self *SWafRule) SyncWithCloudRule(ctx context.Context, userCred mcclient.TokenCredential, rule cloudprovider.ICloudWafRule) error

func (*SWafRule) ValidateUpdateData

func (self *SWafRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WafRuleUpdateInput) (api.WafRuleUpdateInput, error)

type SWafRuleGroup

type SWafRuleGroup struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase

	// 支持的WAF类型,仅is_system=true时有效
	WafType  cloudprovider.TWafType `width:"40" charset:"ascii" list:"domain" nullable:"false"`
	Provider string                 `width:"20" charset:"ascii" list:"domain" nullable:"false"`
	CloudEnv string                 `width:"20" charset:"ascii" list:"domain" nullable:"false"`
	IsSystem bool                   `nullable:"false" default:"false" list:"domain" update:"domain" create:"optional"`
}

func (*SWafRuleGroup) Delete

func (self *SWafRuleGroup) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRuleGroup) GetWafRules

func (self *SWafRuleGroup) GetWafRules() ([]SWafRule, error)

func (*SWafRuleGroup) RealDelete

func (self *SWafRuleGroup) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRuleGroup) SyncManagedWafRules

func (self *SWafRuleGroup) SyncManagedWafRules(ctx context.Context, userCred mcclient.TokenCredential, exts []SWafRule) (compare.SyncResult, error)

type SWafRuleGroupCache

type SWafRuleGroupCache struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase

	SManagedResourceBase
	SCloudregionResourceBase

	Type           cloudprovider.TWafType `width:"20" charset:"utf8" nullable:"false" list:"user"`
	WafRuleGroupId string                 `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SWafRuleGroupCache) CustomizeDelete

func (self *SWafRuleGroupCache) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWafRuleGroupCache) Delete

func (self *SWafRuleGroupCache) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRuleGroupCache) GetICloudWafRuleGroup

func (self *SWafRuleGroupCache) GetICloudWafRuleGroup(ctx context.Context) (cloudprovider.ICloudWafRuleGroup, error)

func (*SWafRuleGroupCache) GetIRegion

func (*SWafRuleGroupCache) RealDelete

func (self *SWafRuleGroupCache) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SWafRuleGroupCache) StartDeleteTask

func (self *SWafRuleGroupCache) StartDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

type SWafRuleGroupCacheManager

var WafRuleGroupCacheManager *SWafRuleGroupCacheManager

func (*SWafRuleGroupCacheManager) FetchCustomizeColumns

func (manager *SWafRuleGroupCacheManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafRuleGroupCacheDetails

func (*SWafRuleGroupCacheManager) GetContextManagers

func (manager *SWafRuleGroupCacheManager) GetContextManagers() [][]db.IModelManager

func (*SWafRuleGroupCacheManager) ListItemExportKeys

func (*SWafRuleGroupCacheManager) ListItemFilter

列出WAF RuleGroup缓存

func (*SWafRuleGroupCacheManager) OrderByExtraFields

func (*SWafRuleGroupCacheManager) QueryDistinctExtraField

func (manager *SWafRuleGroupCacheManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafRuleGroupManager

var WafRuleGroupManager *SWafRuleGroupManager

func (*SWafRuleGroupManager) FetchCustomizeColumns

func (manager *SWafRuleGroupManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafRuleGroupDetails

func (*SWafRuleGroupManager) ListItemExportKeys

func (manager *SWafRuleGroupManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWafRuleGroupManager) ListItemFilter

func (manager *SWafRuleGroupManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafRuleGroupListInput,
) (*sqlchemy.SQuery, error)

列出WAF RuleGroups

func (*SWafRuleGroupManager) OrderByExtraFields

func (manager *SWafRuleGroupManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafRuleGroupListInput,
) (*sqlchemy.SQuery, error)

func (*SWafRuleGroupManager) QueryDistinctExtraField

func (manager *SWafRuleGroupManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SWafRuleManager

var WafRuleManager *SWafRuleManager

func (*SWafRuleManager) FetchCustomizeColumns

func (manager *SWafRuleManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WafRuleDetails

func (*SWafRuleManager) FetchOwnerId

func (manager *SWafRuleManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)

func (*SWafRuleManager) FetchUniqValues

func (manager *SWafRuleManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject

func (*SWafRuleManager) FilterByOwner

func (manager *SWafRuleManager) FilterByOwner(q *sqlchemy.SQuery, userCred mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery

func (*SWafRuleManager) FilterByUniqValues

func (manager *SWafRuleManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SWafRuleManager) ListItemFilter

func (manager *SWafRuleManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WafRuleListInput,
) (*sqlchemy.SQuery, error)

列出WAF规则

func (*SWafRuleManager) ResourceScope

func (manager *SWafRuleManager) ResourceScope() rbacutils.TRbacScope

func (*SWafRuleManager) ValidateCreateData

type SWafRuleStatement

type SWafRuleStatement struct {
	db.SResourceBase

	Id string `width:"128" charset:"ascii" primary:"true" list:"user"`
	cloudprovider.SWafStatement

	WafRuleId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SWafRuleStatement) BeforeInsert

func (self *SWafRuleStatement) BeforeInsert()

func (*SWafRuleStatement) GetId

func (self *SWafRuleStatement) GetId() string

type SWafRuleStatementManager

type SWafRuleStatementManager struct {
	db.SResourceBaseManager
}
var WafRuleStatementManager *SWafRuleStatementManager

type SWire

type SWire struct {
	db.SStatusInfrasResourceBase
	db.SExternalizedResourceBase

	SVpcResourceBase  `wdith:"36" charset:"ascii" nullable:"false" list:"domain" create:"domain_required" update:""`
	SZoneResourceBase `width:"36" charset:"ascii" nullable:"true" list:"domain" create:"domain_required" update:""`

	// 带宽大小, 单位Mbps
	// example: 1000
	Bandwidth int `list:"domain" update:"domain" nullable:"false" create:"domain_required" json:"bandwidth"`
	// MTU
	// example: 1500
	Mtu int `list:"domain" update:"domain" nullable:"false" create:"domain_optional" default:"1500" json:"mtu"`
	// swagger:ignore
	ScheduleRank int `list:"domain" update:"domain" json:"schedule_rank"`
}

func ValidateWireResourceInput

func ValidateWireResourceInput(userCred mcclient.TokenCredential, input api.WireResourceInput) (*SWire, api.WireResourceInput, error)

func (*SWire) CustomizeCreate

func (model *SWire) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SWire) GetCandidateAutoAllocNetwork

func (self *SWire) GetCandidateAutoAllocNetwork(ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope, isExit bool, serverTypes []string) (*SNetwork, error)

func (*SWire) GetCandidateNetworkForIp

func (self *SWire) GetCandidateNetworkForIp(ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope, ipAddr string) (*SNetwork, error)

func (*SWire) GetCandidatePrivateNetwork

func (self *SWire) GetCandidatePrivateNetwork(ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope, isExit bool, serverTypes []string) (*SNetwork, error)

func (*SWire) GetChangeOwnerCandidateDomainIds

func (wire *SWire) GetChangeOwnerCandidateDomainIds() []string

func (*SWire) GetChangeOwnerRequiredDomainIds

func (wire *SWire) GetChangeOwnerRequiredDomainIds() []string

func (*SWire) GetDetailsTopology

func (self *SWire) GetDetailsTopology(ctx context.Context, userCred mcclient.TokenCredential, input *api.WireTopologyInput) (*api.WireTopologyOutput, error)

func (*SWire) GetHosts

func (self *SWire) GetHosts() ([]SHost, error)

func (*SWire) GetHostwires

func (wire *SWire) GetHostwires() ([]SHostwire, error)

func (*SWire) GetIWire

func (self *SWire) GetIWire(ctx context.Context) (cloudprovider.ICloudWire, error)

func (*SWire) GetNetworks

func (self *SWire) GetNetworks(ownerId mcclient.IIdentityProvider, scope rbacutils.TRbacScope) ([]SNetwork, error)

func (*SWire) GetRequiredSharedDomainIds

func (wire *SWire) GetRequiredSharedDomainIds() []string

func (*SWire) GetVpcId

func (wire *SWire) GetVpcId() string

func (*SWire) HostCount

func (wire *SWire) HostCount() (int, error)

func (*SWire) IsManaged

func (self *SWire) IsManaged() bool

func (*SWire) NetworkCount

func (wire *SWire) NetworkCount() (int, error)

func (*SWire) PerformMergeFrom

func (w *SWire) PerformMergeFrom(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WireMergeFromInput) (ret jsonutils.JSONObject, err error)

func (*SWire) PerformMergeNetwork

func (w *SWire) PerformMergeNetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WireMergeNetworkInput) (jsonutils.JSONObject, error)

func (*SWire) PerformMergeTo

func (w *SWire) PerformMergeTo(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WireMergeInput) (ret jsonutils.JSONObject, err error)

func (*SWire) PerformSetClassMetadata

func (wire *SWire) PerformSetClassMetadata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformSetClassMetadataInput) (jsonutils.JSONObject, error)

func (*SWire) PostCreate

func (model *SWire) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SWire) StartMergeNetwork

func (w *SWire) StartMergeNetwork(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SWire) ValidateDeleteCondition

func (wire *SWire) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SWire) ValidateUpdateData

func (wire *SWire) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.WireUpdateInput) (api.WireUpdateInput, error)

type SWireManager

var WireManager *SWireManager

func (*SWireManager) FetchByIdsOrNames

func (sm *SWireManager) FetchByIdsOrNames(idOrNames []string) ([]SWire, error)

func (*SWireManager) FetchCustomizeColumns

func (manager *SWireManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WireDetails

func (*SWireManager) FetchWireById

func (manager *SWireManager) FetchWireById(wireId string) *SWire

func (*SWireManager) GetContextManagers

func (manager *SWireManager) GetContextManagers() [][]db.IModelManager

func (*SWireManager) GetOnPremiseWireOfIp

func (manager *SWireManager) GetOnPremiseWireOfIp(ipAddr string) (*SWire, error)

func (*SWireManager) GetOrCreateWireForClassicNetwork

func (manager *SWireManager) GetOrCreateWireForClassicNetwork(ctx context.Context, vpc *SVpc, zone *SZone) (*SWire, error)

func (*SWireManager) InitializeData

func (manager *SWireManager) InitializeData() error

func (*SWireManager) ListItemExportKeys

func (manager *SWireManager) ListItemExportKeys(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	keys stringutils2.SSortedStrings,
) (*sqlchemy.SQuery, error)

func (*SWireManager) ListItemFilter

func (manager *SWireManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WireListInput,
) (*sqlchemy.SQuery, error)

二层网络列表

func (*SWireManager) OrderByExtraFields

func (manager *SWireManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WireListInput,
) (*sqlchemy.SQuery, error)

func (*SWireManager) QueryDistinctExtraField

func (manager *SWireManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SWireManager) SyncWires

func (manager *SWireManager) SyncWires(ctx context.Context, userCred mcclient.TokenCredential, vpc *SVpc, wires []cloudprovider.ICloudWire, provider *SCloudprovider) ([]SWire, []cloudprovider.ICloudWire, compare.SyncResult)

func (*SWireManager) TotalCount

func (manager *SWireManager) TotalCount(
	rangeObjs []db.IStandaloneModel,
	hostTypes []string,
	providers []string, brands []string, cloudEnv string,
	scope rbacutils.TRbacScope,
	ownerId mcclient.IIdentityProvider,
	policyResult rbacutils.SPolicyResult,
) WiresCountStat

func (*SWireManager) ValidateCreateData

func (manager *SWireManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	input api.WireCreateInput,
) (api.WireCreateInput, error)

type SWireResourceBase

type SWireResourceBase struct {
	// 二层网络ID
	WireId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"wire_id"`
}

func (*SWireResourceBase) GetChangeOwnerCandidateDomainIds

func (self *SWireResourceBase) GetChangeOwnerCandidateDomainIds() []string

func (*SWireResourceBase) GetCloudproviderId

func (self *SWireResourceBase) GetCloudproviderId() string

func (*SWireResourceBase) GetRegion

func (self *SWireResourceBase) GetRegion() (*SCloudregion, error)

func (*SWireResourceBase) GetVpc

func (self *SWireResourceBase) GetVpc() (*SVpc, error)

func (*SWireResourceBase) GetWire

func (self *SWireResourceBase) GetWire() (*SWire, error)

func (*SWireResourceBase) GetZone

func (self *SWireResourceBase) GetZone() (*SZone, error)

type SWireResourceBaseManager

type SWireResourceBaseManager struct {
	SVpcResourceBaseManager
	SZoneResourceBaseManager
}

func (*SWireResourceBaseManager) FetchCustomizeColumns

func (manager *SWireResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.WireResourceInfo

func (*SWireResourceBaseManager) GetExportKeys

func (manager *SWireResourceBaseManager) GetExportKeys() []string

func (*SWireResourceBaseManager) GetOrderByFields

func (manager *SWireResourceBaseManager) GetOrderByFields(query api.WireFilterListInput) []string

func (*SWireResourceBaseManager) GetOrderBySubQuery

func (manager *SWireResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.WireFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SWireResourceBaseManager) ListItemExportKeys

func (*SWireResourceBaseManager) ListItemFilter

func (*SWireResourceBaseManager) OrderByExtraFields

func (manager *SWireResourceBaseManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.WireFilterListInput,
) (*sqlchemy.SQuery, error)

func (*SWireResourceBaseManager) QueryDistinctExtraField

func (manager *SWireResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SZone

type SZone struct {
	db.SStatusStandaloneResourceBase
	db.SExternalizedResourceBase
	SI18nResourceBase
	SCloudregionResourceBase `width:"36" charset:"ascii" nullable:"false" list:"user" create:"admin_required"`

	Location   string `width:"256" charset:"utf8" get:"user" list:"user" update:"admin"`
	Contacts   string `width:"256" charset:"utf8" get:"user" update:"admin"`
	NameCn     string `width:"256" charset:"utf8"`
	ManagerUri string `width:"256" charset:"ascii" list:"admin" update:"admin"`
}

func ValidateZoneResourceInput

func ValidateZoneResourceInput(userCred mcclient.TokenCredential, query api.ZoneResourceInput) (*SZone, api.ZoneResourceInput, error)

func (*SZone) ClearSchedDescCache

func (self *SZone) ClearSchedDescCache() error

func (*SZone) GeneralUsage

func (zone *SZone) GeneralUsage() api.ZoneGeneralUsage

func (*SZone) GetCloudRegionId

func (zone *SZone) GetCloudRegionId() string

func (*SZone) GetCloudproviderId

func (zone *SZone) GetCloudproviderId() string

func (*SZone) GetDetailsCapability

func (self *SZone) GetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SZone) GetDetailsDiskCapability

func (self *SZone) GetDetailsDiskCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SZone) GetDynamicConditionInput

func (self *SZone) GetDynamicConditionInput() *jsonutils.JSONDict

func (*SZone) GetI18N

func (zone *SZone) GetI18N(ctx context.Context) *jsonutils.JSONDict

func (*SZone) GetRegion

func (zone *SZone) GetRegion() (*SCloudregion, error)

func (*SZone) GetSchedtagJointManager

func (self *SZone) GetSchedtagJointManager() ISchedtagJointManager

func (*SZone) GetSchedtags

func (self *SZone) GetSchedtags() []SSchedtag

func (*SZone) HostCount

func (zone *SZone) HostCount(status string, hostStatus string, enabled tristate.TriState, hostType string, isBaremetal tristate.TriState) (int, error)

func (*SZone) PerformSetSchedtag

func (self *SZone) PerformSetSchedtag(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SZone) Purge

func (zone *SZone) Purge(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SZone) ValidateDeleteCondition

func (zone *SZone) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SZoneManager

var ZoneManager *SZoneManager

func (*SZoneManager) Count

func (manager *SZoneManager) Count() (int, error)

func (*SZoneManager) FetchCustomizeColumns

func (manager *SZoneManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ZoneDetails

func (*SZoneManager) FetchZoneById

func (manager *SZoneManager) FetchZoneById(zoneId string) *SZone

func (*SZoneManager) GetContextManagers

func (manager *SZoneManager) GetContextManagers() [][]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 api.ZoneListInput,
) (*sqlchemy.SQuery, error)

可用区列表

func (*SZoneManager) OrderByExtraFields

func (manager *SZoneManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ZoneListInput,
) (*sqlchemy.SQuery, error)

func (*SZoneManager) QueryDistinctExtraField

func (manager *SZoneManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

func (*SZoneManager) SyncZones

func (*SZoneManager) ValidateCreateData

func (manager *SZoneManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.ZoneCreateInput) (*jsonutils.JSONDict, error)

type SZoneQuota

type SZoneQuota struct {
	quotas.SQuotaBase

	quotas.SZonalCloudResourceKeys
}

func (*SZoneQuota) Add

func (self *SZoneQuota) Add(quota quotas.IQuota)

func (*SZoneQuota) Allocable

func (self *SZoneQuota) Allocable(request quotas.IQuota) int

func (*SZoneQuota) Exceed

func (used *SZoneQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SZoneQuota) FetchSystemQuota

func (self *SZoneQuota) FetchSystemQuota()

func (*SZoneQuota) FetchUsage

func (self *SZoneQuota) FetchUsage(ctx context.Context) error

func (*SZoneQuota) GetKeys

func (self *SZoneQuota) GetKeys() quotas.IQuotaKeys

func (*SZoneQuota) IsEmpty

func (self *SZoneQuota) IsEmpty() bool

func (*SZoneQuota) ResetNegative

func (self *SZoneQuota) ResetNegative()

func (*SZoneQuota) SetKeys

func (self *SZoneQuota) SetKeys(keys quotas.IQuotaKeys)

func (*SZoneQuota) Sub

func (self *SZoneQuota) Sub(quota quotas.IQuota)

func (*SZoneQuota) ToJSON

func (self *SZoneQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SZoneQuota) Update

func (self *SZoneQuota) Update(quota quotas.IQuota)

type SZoneQuotaDetail

type SZoneQuotaDetail struct {
	SZoneQuota

	quotas.SZonalCloudResourceDetailKeys
}

可用区配额详情

func GetZoneQuota

func GetZoneQuota(query quotas.SBaseQuotaQueryInput) *SZoneQuotaDetail

获取指定项目或者域的可用区配额

func ListZoneQuotas

func ListZoneQuotas(query quotas.SBaseQuotaQueryInput) *SZoneQuotaDetail

获取所有项目或者域的可用区配额

func SetZoneQuotas

func SetZoneQuotas(input SetZoneQuotaInput) *SZoneQuotaDetail

设置指定项目或者域的可用区配额

type SZoneResourceBase

type SZoneResourceBase struct {
	ZoneId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user" json:"zone_id"`
}

func (*SZoneResourceBase) GetZone

func (self *SZoneResourceBase) GetZone() (*SZone, error)

type SZoneResourceBaseManager

type SZoneResourceBaseManager struct {
	SCloudregionResourceBaseManager
}

func (*SZoneResourceBaseManager) FetchCustomizeColumns

func (manager *SZoneResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []api.ZoneResourceInfo

func (*SZoneResourceBaseManager) GetExportKeys

func (manager *SZoneResourceBaseManager) GetExportKeys() []string

func (*SZoneResourceBaseManager) GetOrderByFields

func (manager *SZoneResourceBaseManager) GetOrderByFields(query api.ZonalFilterListInput) []string

func (*SZoneResourceBaseManager) GetOrderBySubQuery

func (manager *SZoneResourceBaseManager) GetOrderBySubQuery(
	q *sqlchemy.SQuery,
	subq *sqlchemy.SSubQuery,
	joinField sqlchemy.IQueryField,
	userCred mcclient.TokenCredential,
	query api.ZonalFilterListInput,
	orders []string,
	fields []sqlchemy.IQueryField,
) (*sqlchemy.SQuery, []string, []sqlchemy.IQueryField)

func (*SZoneResourceBaseManager) ListItemExportKeys

func (*SZoneResourceBaseManager) ListItemFilter

func (*SZoneResourceBaseManager) OrderByExtraFields

func (manager *SZoneResourceBaseManager) OrderByExtraFields(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	query api.ZonalFilterListInput,
) (*sqlchemy.SQuery, error)

func (*SZoneResourceBaseManager) QueryDistinctExtraField

func (manager *SZoneResourceBaseManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)

type SZoneschedtag

type SZoneschedtag struct {
	SSchedtagJointsBase
	SZoneResourceBase
}

func (*SZoneschedtag) Delete

func (obj *SZoneschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SZoneschedtag) Detach

func (obj *SZoneschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SZoneschedtag) GetDetails

func (obj *SZoneschedtag) GetDetails(base api.SchedtagJointResourceDetails, resourceName string, isList bool) interface{}

func (*SZoneschedtag) GetResourceId

func (obj *SZoneschedtag) GetResourceId() string

type SZoneschedtagManager

type SZoneschedtagManager struct {
	*SSchedtagJointsManager
	// contains filtered or unexported fields
}
var (
	ZoneschedtagManager *SZoneschedtagManager
)

func (*SZoneschedtagManager) GetMasterFieldName

func (m *SZoneschedtagManager) GetMasterFieldName() string

func (*SZoneschedtagManager) ListItemFilter

type SchedStrategyType

type SchedStrategyType string

type SetDomainQuotaInput

type SetDomainQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SDomainQuota
}

设置域配额输入参数

type SetInfrasQuotaInput

type SetInfrasQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SInfrasQuota
}

设置基础设施配额输入参数

type SetProjectQuotaInput

type SetProjectQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SProjectQuota
}

设置项目配额输入参数

type SetQuotaInput

type SetQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SQuota
}

设置主机配额输入参数

type SetRegionQuotaInput

type SetRegionQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SRegionQuota
}

设置区域配额输入参数

type SetZoneQuotaInput

type SetZoneQuotaInput struct {
	quotas.SBaseQuotaSetInput

	SZoneQuota
}

设置可用区配额输入参数

type SimpleStorageInfo

type SimpleStorageInfo struct {
	Storages []sStorage

	VirtualCapacity int64
	Capacity        int64
	Reserved        int64
	UsedCapacity    int64
	WasteCapacity   int64
	FreeCapacity    int64
	IsSysDiskStore  bool
}

type StorageCapacityStat

type StorageCapacityStat struct {
	TotalSize        int64
	TotalSizeVirtual float64
}

type StorageInfo

type StorageInfo struct {
	Id              string
	Name            string
	VirtualCapacity int64
	Capacity        int64
	Reserved        sql.NullInt64
	StorageType     string
	MediumType      string
	Cmtbound        sql.NullFloat64
	UsedCapacity    sql.NullInt64
	WasteCapacity   sql.NullInt64
	FreeCapacity    int64
	IsSysDiskStore  bool
	HostType        string
}

type StorageStat

type StorageStat struct {
	Capacity             int
	Reserved             int
	Cmtbound             float32
	StorageType          string
	MediumType           string
	UsedCapacity         int
	UsedCount            int
	FailedCapacity       int
	FailedCount          int
	AttachedUsedCapacity int
	AttachedCount        int
	DetachedUsedCapacity int
	DetachedCount        int
}

type StoragesCapacityStat

type StoragesCapacityStat struct {
	Capacity         int64
	CapacityVirtual  float64
	CapacityUsed     int64
	CountUsed        int
	CapacityUnready  int64
	CountUnready     int
	AttachedCapacity int64
	CountAttached    int
	DetachedCapacity int64
	CountDetached    int

	MediumeCapacity             map[string]int64
	StorageTypeCapacity         map[string]int64
	MediumeCapacityUsed         map[string]int64
	StorageTypeCapacityUsed     map[string]int64
	AttachedMediumeCapacity     map[string]int64
	AttachedStorageTypeCapacity map[string]int64
	DetachedMediumeCapacity     map[string]int64
	DetachedStorageTypeCapacity map[string]int64
}

type SyncResult

type SyncResult struct {
	RequestCost string

	SqlCost string

	compare.SyncResult
	// contains filtered or unexported fields
}

type WiresCountStat

type WiresCountStat struct {
	WiresCount         int
	EmulatedWiresCount int
	NetCount           int
	GuestNicCount      int
	HostNicCount       int
	ReservedCount      int
	GroupNicCount      int
	LbNicCount         int
	EipNicCount        int
	NetifNicCount      int
	DbNicCount         int

	PendingDeletedGuestNicCount int
}

func (WiresCountStat) NicCount

func (wstat WiresCountStat) NicCount() int

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL