2016-05-27 03:21:55 +00:00
|
|
|
package lxd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Artifact struct {
|
2016-05-31 01:13:09 +00:00
|
|
|
id string
|
2016-05-27 03:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (*Artifact) BuilderId() string {
|
|
|
|
return BuilderId
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) Files() []string {
|
2016-05-31 01:13:09 +00:00
|
|
|
return nil
|
2016-05-27 03:21:55 +00:00
|
|
|
}
|
|
|
|
|
2016-05-31 01:13:09 +00:00
|
|
|
func (a *Artifact) Id() string {
|
|
|
|
return a.id
|
2016-05-27 03:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) String() string {
|
2016-05-31 01:13:09 +00:00
|
|
|
return fmt.Sprintf("image: %s", a.id)
|
2016-05-27 03:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) State(name string) interface{} {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) Destroy() error {
|
2016-08-07 03:47:52 +00:00
|
|
|
_, err := LXDCommand("image", "delete", a.id)
|
|
|
|
return err
|
2016-05-27 03:21:55 +00:00
|
|
|
}
|