Documentation ¶
Index ¶
- Constants
- Variables
- func GetPlatformVMs() []edgeproto.VmInfo
- func NewPlatform() platform.Platform
- func NewPlatformSingleCluster() platform.Platform
- func NewPlatformVMPool() platform.Platform
- type Platform
- func (s *Platform) ActiveChanged(ctx context.Context, platformActive bool) error
- func (s *Platform) AddCrmServiceOps(ops ...process.CrmServiceOp)
- func (v *Platform) ChangeAppInstDNS(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, ...) error
- func (s *Platform) ChangeCloudletDNS(ctx context.Context, cloudlet *edgeproto.Cloudlet, oldFqdn string, ...) error
- func (s *Platform) ChangeClusterInstDNS(ctx context.Context, clusterInst *edgeproto.ClusterInst, oldFqdn string, ...) error
- func (s *Platform) CreateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, ...) error
- func (s *Platform) CreateCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) (bool, error)
- func (s *Platform) CreateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, ...) error
- func (s *Platform) DeleteAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, ...) error
- func (s *Platform) DeleteCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) error
- func (s *Platform) DeleteClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, ...) error
- func (s *Platform) DeleteTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, ...) error
- func (s *Platform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error
- func (s *Platform) GetAppInstRuntime(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, ...) (*edgeproto.AppInstRuntime, error)
- func (s *Platform) GetCloudletInfraResources(ctx context.Context) (*edgeproto.InfraResourcesSnapshot, error)
- func (s *Platform) GetCloudletManifest(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) (*edgeproto.CloudletManifest, error)
- func (s *Platform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, ...) error
- func (s *Platform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) map[string]edgeproto.InfraResource
- func (s *Platform) GetClusterInfraResources(ctx context.Context, cluster *edgeproto.ClusterInst) (*edgeproto.InfraResources, error)
- func (s *Platform) GetClusterPlatformClient(ctx context.Context, clusterInst *edgeproto.ClusterInst, clientType string) (ssh.Client, error)
- func (s *Platform) GetConsoleUrl(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst) (string, error)
- func (s *Platform) GetContainerCommand(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, ...) (string, error)
- func (s *Platform) GetFeatures() *edgeproto.PlatformFeatures
- func (s *Platform) GetInitHAConditionalCompatibilityVersion(ctx context.Context) string
- func (s *Platform) GetNodePlatformClient(ctx context.Context, node *edgeproto.CloudletMgmtNode, ops ...pc.SSHClientOp) (ssh.Client, error)
- func (s *Platform) GetResources() *fakecommon.Resources
- func (s *Platform) GetRestrictedCloudletStatus(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) error
- func (s *Platform) GetRootLBClients(ctx context.Context) (map[string]platform.RootLBClient, error)
- func (s *Platform) GetRootLBFlavor(ctx context.Context) (*edgeproto.Flavor, error)
- func (s *Platform) GetVersionProperties(ctx context.Context) map[string]string
- func (s *Platform) HandleFedAppInstCb(ctx context.Context, msg *edgeproto.FedAppInstEvent)
- func (s *Platform) HasTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, ...) bool
- func (s *Platform) InitCommon(ctx context.Context, platformConfig *platform.PlatformConfig, ...) error
- func (s *Platform) InitHAConditional(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error
- func (s *Platform) ListCloudletMgmtNodes(ctx context.Context, clusterInsts []edgeproto.ClusterInst, ...) ([]edgeproto.CloudletMgmtNode, error)
- func (s *Platform) NameSanitize(name string) string
- func (s *Platform) PerformUpgrades(ctx context.Context, caches *platform.Caches, cloudletState dme.CloudletState) error
- func (s *Platform) SetPause(enable bool)
- func (s *Platform) SetPowerState(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, ...) error
- func (s *Platform) SetSimulateAppCreateFailure(state bool)
- func (s *Platform) SetSimulateAppDeleteFailure(state bool)
- func (s *Platform) SetSimulateClusterCreateFailure(state bool)
- func (s *Platform) SetSimulateClusterDeleteFailure(state bool)
- func (s *Platform) TrustPolicyExceptionCount(ctx context.Context) int
- func (s *Platform) UpdateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, ...) error
- func (s *Platform) UpdateCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) error
- func (s *Platform) UpdateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, ...) error
- func (s *Platform) UpdateResourcesMax(envVars map[string]string) error
- func (s *Platform) UpdateTrustPolicy(ctx context.Context, TrustPolicy *edgeproto.TrustPolicy) error
- func (s *Platform) UpdateTrustPolicyException(ctx context.Context, tpe *edgeproto.TrustPolicyException, ...) error
- func (s *Platform) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error
- func (s *Platform) WaitHasTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, ...) bool
- type PlatformSingleCluster
- type PlatformVMPool
Constants ¶
View Source
const ( FakeRamMax = uint64(40960) FakeVcpusMax = uint64(50) FakeDiskMax = uint64(5000) FakeExternalIpsMax = uint64(30) )
Variables ¶
View Source
var AccessVarProps = map[string]*edgeproto.PropertyInfo{ "APIKey": &edgeproto.PropertyInfo{ Name: "API Key", Description: "API Key for authentication", Secret: true, }, }
View Source
var DefaultFlavorList = []*edgeproto.FlavorInfo{ &edgeproto.FlavorInfo{ Name: "x1.tiny", Vcpus: uint64(1), Ram: uint64(1024), Disk: uint64(20), }, &edgeproto.FlavorInfo{ Name: "x1.small", Vcpus: uint64(2), Ram: uint64(4096), Disk: uint64(40), }, }
View Source
var FakeAppDNSRoot = "fake.net"
Functions ¶
func GetPlatformVMs ¶
func NewPlatform ¶
func NewPlatformVMPool ¶
Types ¶
type Platform ¶
type Platform struct { FlavorList []*edgeproto.FlavorInfo // contains filtered or unexported fields }
func (*Platform) ActiveChanged ¶
func (*Platform) AddCrmServiceOps ¶
func (s *Platform) AddCrmServiceOps(ops ...process.CrmServiceOp)
func (*Platform) ChangeAppInstDNS ¶
func (*Platform) ChangeCloudletDNS ¶
func (*Platform) ChangeClusterInstDNS ¶
func (s *Platform) ChangeClusterInstDNS(ctx context.Context, clusterInst *edgeproto.ClusterInst, oldFqdn string, updateCallback edgeproto.CacheUpdateCallback) error
func (*Platform) CreateAppInst ¶
func (*Platform) CreateCloudlet ¶
func (*Platform) CreateClusterInst ¶
func (s *Platform) CreateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback, timeout time.Duration) error
func (*Platform) DeleteAppInst ¶
func (*Platform) DeleteCloudlet ¶
func (s *Platform) DeleteCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, pfInitConfig *platform.PlatformInitConfig, caches *platform.Caches, updateCallback edgeproto.CacheUpdateCallback) error
func (*Platform) DeleteClusterInst ¶
func (s *Platform) DeleteClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback) error
func (*Platform) DeleteTrustPolicyException ¶
func (s *Platform) DeleteTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, clusterKey *edgeproto.ClusterKey) error
func (*Platform) GatherCloudletInfo ¶
func (*Platform) GetAppInstRuntime ¶
func (*Platform) GetCloudletInfraResources ¶
func (*Platform) GetCloudletManifest ¶
func (*Platform) GetClusterAdditionalResourceMetric ¶
func (*Platform) GetClusterAdditionalResources ¶
func (s *Platform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource
called by controller, make sure it doesn't make any calls to infra API
func (*Platform) GetClusterInfraResources ¶
func (s *Platform) GetClusterInfraResources(ctx context.Context, cluster *edgeproto.ClusterInst) (*edgeproto.InfraResources, error)
func (*Platform) GetClusterPlatformClient ¶
func (*Platform) GetConsoleUrl ¶
func (*Platform) GetContainerCommand ¶
func (*Platform) GetFeatures ¶
func (s *Platform) GetFeatures() *edgeproto.PlatformFeatures
func (*Platform) GetInitHAConditionalCompatibilityVersion ¶
func (*Platform) GetNodePlatformClient ¶
func (s *Platform) GetNodePlatformClient(ctx context.Context, node *edgeproto.CloudletMgmtNode, ops ...pc.SSHClientOp) (ssh.Client, error)
func (*Platform) GetResources ¶
func (s *Platform) GetResources() *fakecommon.Resources
func (*Platform) GetRestrictedCloudletStatus ¶
func (*Platform) GetRootLBClients ¶
func (*Platform) GetRootLBFlavor ¶
func (*Platform) GetVersionProperties ¶
func (*Platform) HandleFedAppInstCb ¶
func (s *Platform) HandleFedAppInstCb(ctx context.Context, msg *edgeproto.FedAppInstEvent)
func (*Platform) HasTrustPolicyException ¶
func (s *Platform) HasTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, clusterInst *edgeproto.ClusterInst) bool
func (*Platform) InitCommon ¶
func (s *Platform) InitCommon(ctx context.Context, platformConfig *platform.PlatformConfig, caches *platform.Caches, haMgr *redundancy.HighAvailabilityManager, updateCallback edgeproto.CacheUpdateCallback) error
func (*Platform) InitHAConditional ¶
func (*Platform) ListCloudletMgmtNodes ¶
func (s *Platform) ListCloudletMgmtNodes(ctx context.Context, clusterInsts []edgeproto.ClusterInst, vmAppInsts []edgeproto.AppInst) ([]edgeproto.CloudletMgmtNode, error)
func (*Platform) NameSanitize ¶
func (*Platform) PerformUpgrades ¶
func (*Platform) SetPause ¶
SetPause pauses responder until unpaused. Warning: don't double-pause or double-unpause.
func (*Platform) SetPowerState ¶
func (*Platform) SetSimulateAppCreateFailure ¶
func (*Platform) SetSimulateAppDeleteFailure ¶
func (*Platform) SetSimulateClusterCreateFailure ¶
func (*Platform) SetSimulateClusterDeleteFailure ¶
func (*Platform) TrustPolicyExceptionCount ¶
func (*Platform) UpdateAppInst ¶
func (*Platform) UpdateCloudlet ¶
func (*Platform) UpdateClusterInst ¶
func (s *Platform) UpdateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback) error
func (*Platform) UpdateResourcesMax ¶
func (*Platform) UpdateTrustPolicy ¶
func (*Platform) UpdateTrustPolicyException ¶
func (s *Platform) UpdateTrustPolicyException(ctx context.Context, tpe *edgeproto.TrustPolicyException, clusterKey *edgeproto.ClusterKey) error
func (*Platform) WaitHasTrustPolicyException ¶
func (s *Platform) WaitHasTrustPolicyException(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, clusterInst *edgeproto.ClusterInst) bool
type PlatformSingleCluster ¶
type PlatformSingleCluster struct {
Platform
}
func (*PlatformSingleCluster) GetFeatures ¶
func (s *PlatformSingleCluster) GetFeatures() *edgeproto.PlatformFeatures
type PlatformVMPool ¶
type PlatformVMPool struct {
Platform
}
func (*PlatformVMPool) GetFeatures ¶
func (s *PlatformVMPool) GetFeatures() *edgeproto.PlatformFeatures
Click to show internal directories.
Click to hide internal directories.