2017-09-12 11:30:39 -04:00
|
|
|
package oci
|
2017-02-13 05:35:14 -05:00
|
|
|
|
|
|
|
import (
|
2017-09-12 11:30:39 -04:00
|
|
|
client "github.com/hashicorp/packer/builder/oracle/oci/client"
|
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 {
|
|
|
|
CreateInstance(publicKey string) (string, error)
|
|
|
|
CreateImage(id string) (client.Image, error)
|
|
|
|
DeleteImage(id string) error
|
|
|
|
GetInstanceIP(id string) (string, error)
|
|
|
|
TerminateInstance(id string) error
|
|
|
|
WaitForImageCreation(id string) error
|
|
|
|
WaitForInstanceState(id string, waitStates []string, terminalState string) error
|
|
|
|
}
|