summaryrefslogtreecommitdiff
path: root/vendor/github.com/mitchellh/packer/builder/lxd/artifact.go
blob: 481f0758efd9a5eba0cd36cc0d75c6cc3cffca92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package lxd

import (
	"fmt"
)

type Artifact struct {
	id string
}

func (*Artifact) BuilderId() string {
	return BuilderId
}

func (a *Artifact) Files() []string {
	return nil
}

func (a *Artifact) Id() string {
	return a.id
}

func (a *Artifact) String() string {
	return fmt.Sprintf("image: %s", a.id)
}

func (a *Artifact) State(name string) interface{} {
	return nil
}

func (a *Artifact) Destroy() error {
	_, err := LXDCommand("image", "delete", a.id)
	return err
}