mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 16:09:45 -05:00
ae2db08f3a
* AB#2256 Add recover e2e test * AB#2256 move test & fix minor objections * AB#2256 fix path * AB#2256 rename hacky filename
39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package cloudcmd
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
|
|
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
|
"github.com/edgelesssys/constellation/v2/internal/config"
|
|
)
|
|
|
|
type terraformClient interface {
|
|
PrepareWorkspace(path string, input terraform.Variables) error
|
|
CreateCluster(ctx context.Context) (terraform.CreateOutput, error)
|
|
CreateIAMConfig(ctx context.Context, provider cloudprovider.Provider) (terraform.IAMOutput, error)
|
|
DestroyCluster(ctx context.Context) error
|
|
CleanUpWorkspace() error
|
|
RemoveInstaller()
|
|
}
|
|
|
|
type libvirtRunner interface {
|
|
Start(ctx context.Context, containerName, imageName string) error
|
|
Stop(ctx context.Context) error
|
|
}
|
|
|
|
type imageFetcher interface {
|
|
FetchReference(ctx context.Context, config *config.Config) (string, error)
|
|
}
|
|
|
|
type rawDownloader interface {
|
|
Download(ctx context.Context, errWriter io.Writer, isTTY bool, source, version string) (string, error)
|
|
}
|