packer-cn/builder/oracle/oci/driver.go

19 lines
634 B
Go
Raw Normal View History

package oci
2018-06-26 05:05:56 -04:00
import (
"context"
"github.com/oracle/oci-go-sdk/core"
)
// Driver interfaces between the builder steps and the OCI SDK.
type Driver interface {
2018-06-26 05:05:56 -04:00
CreateInstance(ctx context.Context, publicKey string) (string, error)
CreateImage(ctx context.Context, id string) (core.Image, error)
DeleteImage(ctx context.Context, id string) error
GetInstanceIP(ctx context.Context, id string) (string, error)
TerminateInstance(ctx context.Context, id string) error
WaitForImageCreation(ctx context.Context, id string) error
WaitForInstanceState(ctx context.Context, id string, waitStates []string, terminalState string) error
}