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