vmpool

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionNone     string = "none"
	ActionAllocate string = "allocate"
	ActionRelease  string = "release"

	CreateVMTimeout    = 20 * time.Minute
	AllVMAccessTimeout = 30 * time.Minute
)

Variables

View Source
var VMPoolProps = map[string]*edgeproto.PropertyInfo{
	"MEX_ROUTER": {
		Name:        "External Router Type",
		Description: vmlayer.GetSupportedRouterTypes(),

		Value: vmlayer.NoConfigExternalRouter,
	},
}

Functions

func NewPlatform

func NewPlatform() platform.Platform

Types

type VMPoolPlatform

type VMPoolPlatform struct {
	VMProperties *vmlayer.VMProperties
	TestMode     bool

	FlavorList []*edgeproto.FlavorInfo
	// contains filtered or unexported fields
}

func (VMPoolPlatform) ActiveChanged

func (v VMPoolPlatform) ActiveChanged(ctx context.Context, platformActive bool) error

func (*VMPoolPlatform) AddImageIfNotPresent

func (o *VMPoolPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) AttachPortToServer

func (s *VMPoolPlatform) AttachPortToServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, portName string, ips infracommon.IPs, action vmlayer.ActionType) error

func (*VMPoolPlatform) CheckServerReady

func (s *VMPoolPlatform) CheckServerReady(ctx context.Context, client ssh.Client, serverName string) error

func (*VMPoolPlatform) ConfigureCloudletSecurityRules

func (v *VMPoolPlatform) ConfigureCloudletSecurityRules(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, rootlbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) ConfigureTrustPolicyExceptionSecurityRules

func (v *VMPoolPlatform) ConfigureTrustPolicyExceptionSecurityRules(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, rootLbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) CreateVMs

func (o *VMPoolPlatform) CreateVMs(ctx context.Context, vmGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) DeleteImage

func (s *VMPoolPlatform) DeleteImage(ctx context.Context, folder, imageName string) error

func (*VMPoolPlatform) DeleteVMs

func (o *VMPoolPlatform) DeleteVMs(ctx context.Context, vmGroupName, ownerID string) error

func (*VMPoolPlatform) DetachPortFromServer

func (s *VMPoolPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, portName string) error

func (*VMPoolPlatform) GatherCloudletInfo

func (o *VMPoolPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error

func (*VMPoolPlatform) GetAccessClient

func (o *VMPoolPlatform) GetAccessClient(ctx context.Context) (ssh.Client, error)

func (*VMPoolPlatform) GetApiEndpointAddr

func (o *VMPoolPlatform) GetApiEndpointAddr(ctx context.Context) (string, error)

func (*VMPoolPlatform) GetCloudletImageSuffix

func (s *VMPoolPlatform) GetCloudletImageSuffix(ctx context.Context) string

func (*VMPoolPlatform) GetCloudletInfraResourcesInfo

func (o *VMPoolPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)

func (*VMPoolPlatform) GetCloudletKey

func (o *VMPoolPlatform) GetCloudletKey() *edgeproto.CloudletKey

func (*VMPoolPlatform) GetCloudletManifest

func (o *VMPoolPlatform) GetCloudletManifest(ctx context.Context, name string, cloudletImagePath string, vmgp *vmlayer.VMGroupOrchestrationParams) (string, error)

func (*VMPoolPlatform) GetClusterAdditionalResourceMetric

func (o *VMPoolPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, resources []edgeproto.VMResource) error

func (*VMPoolPlatform) GetClusterAdditionalResources

func (o *VMPoolPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource

func (*VMPoolPlatform) GetConsoleUrl

func (o *VMPoolPlatform) GetConsoleUrl(ctx context.Context, serverName string) (string, error)

func (*VMPoolPlatform) GetExternalGateway

func (o *VMPoolPlatform) GetExternalGateway(ctx context.Context, extNetName string) (string, error)

func (*VMPoolPlatform) GetFeatures

func (o *VMPoolPlatform) GetFeatures() *edgeproto.PlatformFeatures

func (*VMPoolPlatform) GetFlavorList

func (s *VMPoolPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, error)

func (*VMPoolPlatform) GetGPUSetupStage

func (o *VMPoolPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage

func (*VMPoolPlatform) GetInternalPortPolicy

func (o *VMPoolPlatform) GetInternalPortPolicy() vmlayer.InternalPortAttachPolicy

func (*VMPoolPlatform) GetNetworkList

func (s *VMPoolPlatform) GetNetworkList(ctx context.Context) ([]string, error)

func (*VMPoolPlatform) GetPlatformResourceInfo

func (s *VMPoolPlatform) GetPlatformResourceInfo(ctx context.Context) (*vmlayer.PlatformResources, error)

func (*VMPoolPlatform) GetProviderSpecificProps

func (o *VMPoolPlatform) GetProviderSpecificProps(ctx context.Context) (map[string]*edgeproto.PropertyInfo, error)

func (*VMPoolPlatform) GetResourceID

func (o *VMPoolPlatform) GetResourceID(ctx context.Context, resourceType vmlayer.ResourceType, resourceName string) (string, error)

func (*VMPoolPlatform) GetRouterDetail

func (o *VMPoolPlatform) GetRouterDetail(ctx context.Context, routerName string) (*vmlayer.RouterDetail, error)

func (*VMPoolPlatform) GetServerDetail

func (o *VMPoolPlatform) GetServerDetail(ctx context.Context, serverName string) (*vmlayer.ServerDetail, error)

func (*VMPoolPlatform) GetServerGroupResources

func (v *VMPoolPlatform) GetServerGroupResources(ctx context.Context, name string) (*edgeproto.InfraResources, error)

func (*VMPoolPlatform) GetVMStats

func (s *VMPoolPlatform) GetVMStats(ctx context.Context, appInst *edgeproto.AppInst) (*vmlayer.VMMetrics, error)

func (*VMPoolPlatform) IdSanitize

func (o *VMPoolPlatform) IdSanitize(name string) string

VMPool IdSanitize is the same as NameSanitize

func (*VMPoolPlatform) InitApiAccessProperties

func (o *VMPoolPlatform) InitApiAccessProperties(ctx context.Context, accessApi platform.AccessApi, vars map[string]string) error

func (*VMPoolPlatform) InitData

func (o *VMPoolPlatform) InitData(ctx context.Context, caches *platform.Caches)

func (*VMPoolPlatform) InitOperationContext

func (v *VMPoolPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error)

func (*VMPoolPlatform) InitProvider

func (o *VMPoolPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) InternalCloudletUpdatedCallback

func (o *VMPoolPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, new *edgeproto.CloudletInternal)

func (*VMPoolPlatform) NameSanitize

func (o *VMPoolPlatform) NameSanitize(name string) string

alphanumeric plus -_. first char must be alpha, <= 255 chars.

func (*VMPoolPlatform) PrepareRootLB

func (o *VMPoolPlatform) PrepareRootLB(ctx context.Context, client ssh.Client, rootLBName string, secGrpName string, TrustPolicy *edgeproto.TrustPolicy, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) RemoveWhitelistSecurityRules

func (o *VMPoolPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error

func (*VMPoolPlatform) SaveVMStateInVMPool

func (o *VMPoolPlatform) SaveVMStateInVMPool(ctx context.Context, vms map[string]edgeproto.VM, state edgeproto.VMState)

func (*VMPoolPlatform) SetPowerState

func (s *VMPoolPlatform) SetPowerState(ctx context.Context, serverName, serverAction string) error

func (*VMPoolPlatform) SetVMProperties

func (o *VMPoolPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties)

func (*VMPoolPlatform) SyncVMs

func (o *VMPoolPlatform) SyncVMs(ctx context.Context, vmGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) UpdateVMPoolInfo

func (o *VMPoolPlatform) UpdateVMPoolInfo(ctx context.Context)

Assumes VM pool lock is held

func (*VMPoolPlatform) UpdateVMs

func (o *VMPoolPlatform) UpdateVMs(ctx context.Context, vmGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error

func (*VMPoolPlatform) ValidateAdditionalNetworks

func (o *VMPoolPlatform) ValidateAdditionalNetworks(ctx context.Context, additionalNets map[string]vmlayer.NetworkType) error

func (*VMPoolPlatform) VerifyVMs

func (s *VMPoolPlatform) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error

func (*VMPoolPlatform) VmAppChangedCallback

func (s *VMPoolPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, newState edgeproto.TrackedState)

func (*VMPoolPlatform) WhitelistSecurityRules

func (o *VMPoolPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error

Jump to

Keyboard shortcuts

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