github.phpd.cn/hashicorp/packer@v1.3.2/builder/oracle/classic/artifact.go (about) 1 package classic 2 3 import ( 4 "fmt" 5 6 "github.com/hashicorp/go-oracle-terraform/compute" 7 ) 8 9 // Artifact is an artifact implementation that contains Image List 10 // and Machine Image info. 11 type Artifact struct { 12 MachineImageName string 13 MachineImageFile string 14 ImageListVersion int 15 driver *compute.ComputeClient 16 } 17 18 // BuilderId uniquely identifies the builder. 19 func (a *Artifact) BuilderId() string { 20 return BuilderId 21 } 22 23 // Files lists the files associated with an artifact. We don't have any files 24 // as the custom image is stored server side. 25 func (a *Artifact) Files() []string { 26 return nil 27 } 28 29 func (a *Artifact) Id() string { 30 return a.MachineImageName 31 } 32 33 func (a *Artifact) String() string { 34 return fmt.Sprintf("An image list entry was created: \n"+ 35 "Name: %s\n"+ 36 "File: %s\n"+ 37 "Version: %d", 38 a.MachineImageName, a.MachineImageFile, a.ImageListVersion) 39 } 40 41 func (a *Artifact) State(name string) interface{} { 42 return nil 43 } 44 45 // Destroy deletes the custom image associated with the artifact. 46 func (a *Artifact) Destroy() error { 47 return nil 48 }