2022-09-05 07:06:08 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-04-13 11:01:38 +00:00
|
|
|
package cloudcmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-06-07 14:30:41 +00:00
|
|
|
azurecl "github.com/edgelesssys/constellation/cli/internal/azure/client"
|
2022-06-07 12:52:47 +00:00
|
|
|
gcpcl "github.com/edgelesssys/constellation/cli/internal/gcp/client"
|
2022-04-13 11:01:38 +00:00
|
|
|
"github.com/edgelesssys/constellation/internal/state"
|
|
|
|
)
|
|
|
|
|
|
|
|
type gcpclient interface {
|
2022-08-01 10:35:35 +00:00
|
|
|
GetState() state.ConstellationState
|
|
|
|
SetState(state.ConstellationState)
|
2022-05-16 16:54:25 +00:00
|
|
|
CreateVPCs(ctx context.Context) error
|
2022-04-13 11:01:38 +00:00
|
|
|
CreateFirewall(ctx context.Context, input gcpcl.FirewallInput) error
|
|
|
|
CreateInstances(ctx context.Context, input gcpcl.CreateInstancesInput) error
|
2022-09-06 08:28:00 +00:00
|
|
|
CreateLoadBalancers(ctx context.Context, isDebugCluster bool) error
|
2022-04-13 11:01:38 +00:00
|
|
|
TerminateFirewall(ctx context.Context) error
|
|
|
|
TerminateVPCs(context.Context) error
|
2022-08-01 14:51:34 +00:00
|
|
|
TerminateLoadBalancers(context.Context) error
|
2022-04-13 11:01:38 +00:00
|
|
|
TerminateInstances(context.Context) error
|
|
|
|
Close() error
|
|
|
|
}
|
|
|
|
|
|
|
|
type azureclient interface {
|
2022-08-01 10:35:35 +00:00
|
|
|
GetState() state.ConstellationState
|
|
|
|
SetState(state.ConstellationState)
|
2022-06-10 11:18:30 +00:00
|
|
|
CreateApplicationInsight(ctx context.Context) error
|
2022-09-05 16:14:58 +00:00
|
|
|
CreateExternalLoadBalancer(ctx context.Context, isDebugCluster bool) error
|
2022-04-13 11:01:38 +00: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 13:12:08 +00:00
|
|
|
TerminateResourceGroupResources(ctx context.Context) error
|
2022-04-13 11:01:38 +00:00
|
|
|
}
|