2017-09-12 11:30:39 -04:00
|
|
|
package oci
|
2017-02-13 05:35:14 -05:00
|
|
|
|
2018-06-26 05:05:56 -04:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/oracle/oci-go-sdk/core"
|
|
|
|
)
|
2017-02-13 05:35:14 -05:00
|
|
|
|
2017-09-12 11:30:39 -04:00
|
|
|
// Driver interfaces between the builder steps and the OCI SDK.
|
2017-02-13 05:35:14 -05:00
|
|
|
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
|
2017-02-13 05:35:14 -05:00
|
|
|
}
|