compute

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0, Apache-2.0 Imports: 31 Imported by: 63

Documentation

Index

Constants

View Source
const MACAddressPattern = `(([a-fA-F0-9]{2}[:-]){5}([a-fA-F0-9]{2}))`

Variables

View Source
var (
	Apps            AppManager
	AppEnvironments AppEnvironmentManager
)
View Source
var (
	DiskBackups     DiskBackupManager
	BackupStorages  BackupStorageManager
	InstanceBackups InstanceBackupManager
)
View Source
var (
	ElasticCache          ElasticCacheManager
	ElasticCacheAccount   ElasticCacheAccountManager
	ElasticCacheBackup    modulebase.ResourceManager
	ElasticCacheAcl       modulebase.ResourceManager
	ElasticCacheParameter modulebase.ResourceManager
	ElasticCacheSecgroup  modulebase.JointResourceManager
)
View Source
var (
	ScalingGroup    modulebase.ResourceManager
	ScalingPolicy   modulebase.ResourceManager
	ScalingActivity modulebase.ResourceManager
)
View Source
var (
	Schedtaghosts          modulebase.JointResourceManager
	Schedtagstorages       modulebase.JointResourceManager
	Schedtagnetworks       modulebase.JointResourceManager
	Schedtagcloudproviders modulebase.JointResourceManager
	Schedtagcloudregions   modulebase.JointResourceManager
	Schedtagzones          modulebase.JointResourceManager
)
View Source
var (
	// CloudmetaSkus    SkusManager             // meta.yunion.io
	OfflineCloudmeta OfflineCloudmetaManager // aliyun offine sku&rate data
	ServerSkus       ServerSkusManager       // region service: server sku manager
	ElasticcacheSkus ElasticcacheSkusManager // region service: elasitc cache sku manager
)
View Source
var (
	Usages        *UsageManager
	HistoryUsages *HistoryUsageManager
)
View Source
var (
	Baremetalagents modulebase.ResourceManager
)
View Source
var (
	Baremetalnetworks modulebase.JointResourceManager
)
View Source
var (
	Baremetalstorages modulebase.JointResourceManager
)
View Source
var (
	Cachedimages modulebase.ResourceManager
)
View Source
var (
	CloudproviderregionManager modulebase.JointResourceManager
)
View Source
var (
	DBInstanceBackups modulebase.ResourceManager
)
View Source
var (
	DBInstanceDatabases modulebase.ResourceManager
)
View Source
var (
	DBInstanceNetworks modulebase.JointResourceManager
)
View Source
var (
	DBInstanceParameters modulebase.ResourceManager
)
View Source
var (
	DBInstancePrivileges modulebase.ResourceManager
)
View Source
var (
	Dynamicschedtags modulebase.ResourceManager
)
View Source
var (
	ExternalProjects modulebase.ResourceManager
)
View Source
var (
	HostBackupstorages modulebase.JointResourceManager
)
View Source
var (
	HostIsolatedDeviceModels modulebase.JointResourceManager
)
View Source
var (
	Hostcachedimages modulebase.JointResourceManager
)
View Source
var (
	IPv6Gateways modulebase.ResourceManager
)
View Source
var (
	InstanceGroupGuests modulebase.JointResourceManager
)
View Source
var (
	InstanceGroups modulebase.ResourceManager
)
View Source
var (
	InstanceSnapshots modulebase.ResourceManager
)
View Source
var (
	InstancegroupNetworks modulebase.JointResourceManager
)
View Source
var (
	InterVpcNetworks modulebase.ResourceManager
)
View Source
var (
	IsolatedDeviceModels modulebase.ResourceManager
)
View Source
var (
	IsolatedDevices modulebase.ResourceManager
)
View Source
var (
	KubeClusters modulebase.ResourceManager
)
View Source
var (
	KubeNodePools modulebase.ResourceManager
)
View Source
var (
	Loadbalancernetworks modulebase.JointResourceManager
)
View Source
var (
	NatGateways modulebase.ResourceManager
)
View Source
var (
	NetTapFlows modulebase.ResourceManager
)
View Source
var (
	NetTapServices modulebase.ResourceManager
)
View Source
var (
	NetworkAddresses modulebase.ResourceManager
)
View Source
var (
	NetworkIpMacs modulebase.ResourceManager
)
View Source
var (
	Networkinterfacenetworks modulebase.JointResourceManager
)
View Source
var (
	Networkinterfaces modulebase.ResourceManager
)
View Source
var (
	ProjectMappings modulebase.ResourceManager
)
View Source
var (
	Schedpolicies modulebase.ResourceManager
)
View Source
var (
	SecGroupRules modulebase.ResourceManager
)
View Source
var (
	Serversecgroups modulebase.JointResourceManager
)
View Source
var (
	SnapshotPoliciy modulebase.ResourceManager
)
View Source
var (
	Storagecachedimages modulebase.JointResourceManager
)
View Source
var (
	Storagecaches modulebase.ResourceManager
)
View Source
var (
	Tablestores modulebase.ResourceManager
)
View Source
var (
	VpcPeeringConnections modulebase.ResourceManager
)
View Source
var (
	WafInstances modulebase.ResourceManager
)
View Source
var (
	WafRegexSets modulebase.ResourceManager
)
View Source
var (
	WafRuleGroups modulebase.ResourceManager
)

Functions

func InitUsages

func InitUsages()

Types

type AccessGroupManager

type AccessGroupManager struct {
	modulebase.ResourceManager
}
var (
	AccessGroups AccessGroupManager
)

type AccessGroupRuleManager

type AccessGroupRuleManager struct {
	modulebase.ResourceManager
}
var (
	AccessGroupRules AccessGroupRuleManager
)

type AppEnvironmentManager

type AppEnvironmentManager struct {
	modulebase.ResourceManager
}

type AppManager

type AppManager struct {
	modulebase.ResourceManager
}

type BackupStorageManager

type BackupStorageManager struct {
	modulebase.ResourceManager
}

type CloudproviderQuotasManager

type CloudproviderQuotasManager struct {
	modulebase.ResourceManager
}
var (
	CloudproviderQuotas CloudproviderQuotasManager
)

type DBInstanceSkusManager

type DBInstanceSkusManager struct {
	modulebase.ResourceManager
}
var (
	DBInstanceSkus DBInstanceSkusManager
)

type DiskBackupManager

type DiskBackupManager struct {
	modulebase.ResourceManager
}

type ElasticCacheAccountManager

type ElasticCacheAccountManager struct {
	modulebase.ResourceManager
}

func (*ElasticCacheAccountManager) GetLoginInfo

type ElasticCacheManager

type ElasticCacheManager struct {
	modulebase.ResourceManager
}

func (*ElasticCacheManager) GetLoginInfo

type ElasticSearchManager

type ElasticSearchManager struct {
	modulebase.ResourceManager
}
var (
	ElasticSearchs ElasticSearchManager
)

type ElasticcacheSkusManager

type ElasticcacheSkusManager struct {
	modulebase.ResourceManager
}

type FileSystemManager

type FileSystemManager struct {
	modulebase.ResourceManager
}
var (
	FileSystems FileSystemManager
)

type GlobalVpcManager

type GlobalVpcManager struct {
	modulebase.ResourceManager
}
var (
	GlobalVpcs GlobalVpcManager
)

type HistoryUsageManager

type HistoryUsageManager struct {
	modulebase.ResourceManager
	// contains filtered or unexported fields
}

func (*HistoryUsageManager) RegisterManager

func (this *HistoryUsageManager) RegisterManager(manType TUsageManager, man IUsageManager)

type HostManager

type HostManager struct {
	modulebase.ResourceManager
}
var (
	Hosts HostManager
)

func (*HostManager) BatchRegister

func (this *HostManager) BatchRegister(s *mcclient.ClientSession, titles []string, params jsonutils.JSONObject) ([]printutils.SubmitResult, error)

func (*HostManager) DoBatchRegister

func (this *HostManager) DoBatchRegister(s *mcclient.ClientSession, params jsonutils.JSONObject) ([]printutils.SubmitResult, error)

func (*HostManager) GetIpmiInfo

func (this *HostManager) GetIpmiInfo(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*HostManager) GetLoginInfo

func (this *HostManager) GetLoginInfo(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type IUsageManager

type IUsageManager interface {
	GetUsage(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
}

type InstanceBackupManager

type InstanceBackupManager struct {
	modulebase.ResourceManager
}

type InterVpcNetworkRouteSetManager

type InterVpcNetworkRouteSetManager struct {
	modulebase.ResourceManager
}
var (
	InterVpcNetworkRouteSets InterVpcNetworkRouteSetManager
)

type KafkaManager

type KafkaManager struct {
	modulebase.ResourceManager
}
var (
	Kafkas KafkaManager
)

type KeypairManager

type KeypairManager struct {
	modulebase.ResourceManager
}
var (
	Keypairs KeypairManager
)

type LoadbalancerAclManager

type LoadbalancerAclManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerAcls LoadbalancerAclManager
)

type LoadbalancerAgentManager

type LoadbalancerAgentManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerAgents LoadbalancerAgentManager
)

type LoadbalancerBackendGroupManager

type LoadbalancerBackendGroupManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerBackendGroups LoadbalancerBackendGroupManager
)

type LoadbalancerBackendManager

type LoadbalancerBackendManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerBackends LoadbalancerBackendManager
)

type LoadbalancerCertificateManager

type LoadbalancerCertificateManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerCertificates LoadbalancerCertificateManager
)

type LoadbalancerClusterManager

type LoadbalancerClusterManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerClusters LoadbalancerClusterManager
)

type LoadbalancerListenerManager

type LoadbalancerListenerManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerListeners LoadbalancerListenerManager
)

type LoadbalancerListenerRuleManager

type LoadbalancerListenerRuleManager struct {
	modulebase.ResourceManager
}
var (
	LoadbalancerListenerRules LoadbalancerListenerRuleManager
)

type LoadbalancerManager

type LoadbalancerManager struct {
	modulebase.ResourceManager
}
var (
	Loadbalancers LoadbalancerManager
)

type MetadataManager

type MetadataManager struct {
	modulebase.ResourceManager
}
var (
	ComputeMetadatas  MetadataManager
	IdentityMetadatas MetadataManager
	ImageMetadatas    MetadataManager
)

func (*MetadataManager) Get

func (*MetadataManager) List

type MiscResourceManager

type MiscResourceManager struct {
	modulebase.ResourceManager
}
var (
	MiscResource MiscResourceManager
)

type ModelartsPoolManager

type ModelartsPoolManager struct {
	modulebase.ResourceManager
}
var (
	ModelartsPools ModelartsPoolManager
)

type ModelartsPoolSkuManager

type ModelartsPoolSkuManager struct {
	modulebase.ResourceManager
}
var (
	ModelartsPoolSku ModelartsPoolSkuManager
)

type MongoDBManager

type MongoDBManager struct {
	modulebase.ResourceManager
}
var (
	MongoDB MongoDBManager
)

type MountTargetManager

type MountTargetManager struct {
	modulebase.ResourceManager
}
var (
	MountTargets MountTargetManager
)

type NasSkusManager

type NasSkusManager struct {
	modulebase.ResourceManager
}
var (
	NasSkus NasSkusManager
)

type NatSkusManager

type NatSkusManager struct {
	modulebase.ResourceManager
}
var (
	NatSkus NatSkusManager
)

type OfflineCloudmetaManager

type OfflineCloudmetaManager struct {
	modulebase.ResourceManager
}

func (*OfflineCloudmetaManager) GetSkuIndex

func (self *OfflineCloudmetaManager) GetSkuIndex(s *mcclient.ClientSession, client *http.Client, res string) (string, map[string]string, error)

func (*OfflineCloudmetaManager) GetSkuSourcesMeta

func (self *OfflineCloudmetaManager) GetSkuSourcesMeta(s *mcclient.ClientSession, client *http.Client) (jsonutils.JSONObject, error)

type PolicyAssignmentManager

type PolicyAssignmentManager struct {
	modulebase.ResourceManager
}
var (
	PolicyAssignment PolicyAssignmentManager
)

type PolicyDefinitionManager

type PolicyDefinitionManager struct {
	modulebase.ResourceManager
}
var (
	PolicyDefinition PolicyDefinitionManager
)

type ProxySettingManager

type ProxySettingManager struct {
	modulebase.ResourceManager
}
var (
	ProxySettings ProxySettingManager
)

type ReservedIPManager

type ReservedIPManager struct {
	modulebase.ResourceManager
}
var (
	ReservedIPs ReservedIPManager
)

func (*ReservedIPManager) DoBatchReleaseReservedIps

func (this *ReservedIPManager) DoBatchReleaseReservedIps(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type RouteTableAssociationManager

type RouteTableAssociationManager struct {
	modulebase.ResourceManager
}
var (
	RouteTableRouteAssociations RouteTableAssociationManager
)

type RouteTableManager

type RouteTableManager struct {
	modulebase.ResourceManager
}
var (
	RouteTables RouteTableManager
)

type RouteTableRoutesetManager

type RouteTableRoutesetManager struct {
	modulebase.ResourceManager
}
var (
	RouteTableRouteSets RouteTableRoutesetManager
)

type SBucketManager

type SBucketManager struct {
	modulebase.ResourceManager
}
var (
	Buckets SBucketManager
)

func (*SBucketManager) Upload

func (manager *SBucketManager) Upload(s *mcclient.ClientSession, bucketId string, key string, body io.Reader, contLength int64, storageClass string, acl string, meta http.Header) error

type SCDNDomainManager

type SCDNDomainManager struct {
	modulebase.ResourceManager
}
var (
	CDNDomains SCDNDomainManager
)

type SCapabilityManager

type SCapabilityManager struct {
	modulebase.ResourceManager
}
var (
	Capabilities SCapabilityManager
)

func (*SCapabilityManager) List

type SCloudDelegate

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

	AccessUrl string
	Account   string
	Secret    string

	Provider string
	Brand    string

	ReadOnly bool

	Options struct {
		cloudprovider.SHCSOEndpoints
		Account  string
		Password string
	}
	ProxySetting proxyapi.SProxySetting
}

type SCloudaccount

type SCloudaccount struct {
	modulebase.ResourceManager
}
var (
	Cloudaccounts SCloudaccount
)

func (*SCloudaccount) GetProvider

type SCloudprovider

type SCloudprovider struct {
	modulebase.ResourceManager
}
var (
	Cloudproviders SCloudprovider
)

func (*SCloudprovider) GetProvider

type SCloudregionManager

type SCloudregionManager struct {
	modulebase.ResourceManager
}
var (
	Cloudregions SCloudregionManager
)

func (*SCloudregionManager) GetCityServers

func (this *SCloudregionManager) GetCityServers(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudregionManager) GetRegionCities

func (this *SCloudregionManager) GetRegionCities(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudregionManager) GetRegionProviders

func (this *SCloudregionManager) GetRegionProviders(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type SDBInstanceAccountManager

type SDBInstanceAccountManager struct {
	modulebase.ResourceManager
}
var (
	DBInstanceAccounts SDBInstanceAccountManager
)

func (*SDBInstanceAccountManager) GetLoginInfo

type SGuestTemplateManager

type SGuestTemplateManager struct {
	modulebase.ResourceManager
}
var GuestTemplate SGuestTemplateManager

type SServiceCatalog

type SServiceCatalog struct {
	modulebase.ResourceManager
}
var ServiceCatalog SServiceCatalog

type SSshkeypairManager

type SSshkeypairManager struct {
	modulebase.ResourceManager
}
var (
	Sshkeypairs SSshkeypairManager
)

func (*SSshkeypairManager) FetchKeypairBySession

func (this *SSshkeypairManager) FetchKeypairBySession(ctx context.Context, s *mcclient.ClientSession) (*models.SshKeypair, error)

func (*SSshkeypairManager) FetchPrivateKey

func (this *SSshkeypairManager) FetchPrivateKey(ctx context.Context, userCred mcclient.TokenCredential) (string, error)

func (*SSshkeypairManager) FetchPrivateKeyBySession

func (this *SSshkeypairManager) FetchPrivateKeyBySession(ctx context.Context, s *mcclient.ClientSession) (string, error)

func (*SSshkeypairManager) List

type SchedtagManager

type SchedtagManager struct {
	modulebase.ResourceManager
}
var (
	Schedtags SchedtagManager
)

func (*SchedtagManager) DoBatchSchedtagHostAddRemove

func (this *SchedtagManager) DoBatchSchedtagHostAddRemove(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type ServerManager

type ServerManager struct {
	modulebase.ResourceManager
}
var (
	Servers ServerManager
)

func (*ServerManager) DoChangeSetting

func (this *ServerManager) DoChangeSetting(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*ServerManager) GetLoginInfo

type ServerSkusManager

type ServerSkusManager struct {
	modulebase.ResourceManager
}

type SkusManager

type SkusManager struct {
	modulebase.ResourceManager
}

func (*SkusManager) GetSkus

func (self *SkusManager) GetSkus(s *mcclient.ClientSession, providerId, regionId, zoneId string, limit, offset int) (*printutils.ListResult, error)

type SpecsManager

type SpecsManager struct {
	modulebase.ResourceManager
}
var (
	Specs SpecsManager
)

func (*SpecsManager) GetAllSpecs

func (*SpecsManager) GetHostSpecs

func (*SpecsManager) GetIsolatedDevicesSpecs

func (this *SpecsManager) GetIsolatedDevicesSpecs(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SpecsManager) GetModelSpecs

func (this *SpecsManager) GetModelSpecs(s *mcclient.ClientSession, model string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SpecsManager) GetObjects

func (*SpecsManager) SpecsQueryModelObjects

func (this *SpecsManager) SpecsQueryModelObjects(s *mcclient.ClientSession, model string, specKeys []string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type TUsageManager

type TUsageManager string
const (
	UsageManagerImage    TUsageManager = "image"
	UsageManagerIdentity TUsageManager = "identity"
	UsageManagerK8s      TUsageManager = "k8s"
)

type TasksManager

type TasksManager struct {
	modulebase.ResourceManager
}
var (
	ComputeTasks TasksManager
	DevtoolTasks TasksManager
)

func (*TasksManager) List

func (TasksManager) TaskComplete

func (man TasksManager) TaskComplete(session *mcclient.ClientSession, taskId string, params jsonutils.JSONObject)

func (TasksManager) TaskFailed

func (man TasksManager) TaskFailed(session *mcclient.ClientSession, taskId string, err error)

func (TasksManager) TaskFailed2

func (man TasksManager) TaskFailed2(session *mcclient.ClientSession, taskId string, reason string)

func (TasksManager) TaskFailed3

func (man TasksManager) TaskFailed3(session *mcclient.ClientSession, taskId string, reason string, params *jsonutils.JSONDict)

type UsageManager

type UsageManager struct {
	modulebase.ResourceManager
	// contains filtered or unexported fields
}

func (*UsageManager) GetGeneralUsage

func (this *UsageManager) GetGeneralUsage(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*UsageManager) GetIdentityUsage

func (this *UsageManager) GetIdentityUsage(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*UsageManager) GetImageUsage

func (this *UsageManager) GetImageUsage(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*UsageManager) GetK8sUsage

func (*UsageManager) GetManagerByType

func (this *UsageManager) GetManagerByType(t TUsageManager) IUsageManager

func (*UsageManager) RegisterManager

func (this *UsageManager) RegisterManager(manType TUsageManager, man IUsageManager)

type WorkerManager

type WorkerManager struct {
	modulebase.ResourceManager
}
var (
	Workers WorkerManager
)

func (*WorkerManager) List

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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