2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-04-13 07:01:38 -04:00
|
|
|
package cloudcmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-09-21 07:47:57 -04:00
|
|
|
azurecl "github.com/edgelesssys/constellation/v2/cli/internal/azure/client"
|
2022-09-26 09:52:31 -04:00
|
|
|
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
|
2022-09-21 07:47:57 -04:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/state"
|
2022-04-13 07:01:38 -04:00
|
|
|
)
|
|
|
|
|
2022-09-27 03:22:29 -04:00
|
|
|
type terraformClient interface {
|
2022-08-01 06:35:35 -04:00
|
|
|
GetState() state.ConstellationState
|
2022-09-27 03:22:29 -04:00
|
|
|
CreateCluster(ctx context.Context, name string, input terraform.Variables) error
|
|
|
|
DestroyCluster(ctx context.Context) error
|
|
|
|
CleanUpWorkspace() error
|
|
|
|
RemoveInstaller()
|
2022-04-13 07:01:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type azureclient interface {
|
2022-08-01 06:35:35 -04:00
|
|
|
GetState() state.ConstellationState
|
|
|
|
SetState(state.ConstellationState)
|
2022-06-10 07:18:30 -04:00
|
|
|
CreateApplicationInsight(ctx context.Context) error
|
2022-09-05 12:14:58 -04:00
|
|
|
CreateExternalLoadBalancer(ctx context.Context, isDebugCluster bool) error
|
2022-04-13 07:01:38 -04:00
|
|
|
CreateVirtualNetwork(ctx context.Context) error
|
|
|
|
CreateSecurityGroup(ctx context.Context, input azurecl.NetworkSecurityGroupInput) error
|
|
|
|
CreateInstances(ctx context.Context, input azurecl.CreateInstancesInput) error
|
2022-08-25 09:12:08 -04:00
|
|
|
TerminateResourceGroupResources(ctx context.Context) error
|
2022-04-13 07:01:38 -04:00
|
|
|
}
|
2022-10-05 03:11:30 -04:00
|
|
|
|
|
|
|
type libvirtRunner interface {
|
|
|
|
Start(ctx context.Context, containerName, imageName string) error
|
|
|
|
Stop(ctx context.Context) error
|
|
|
|
}
|