/
lxd_client.go
50 lines (43 loc) · 1.39 KB
/
lxd_client.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
// +build go1.3
package lxdclient
import (
"github.com/lxc/lxd/shared"
)
// The various status values used for LXD.
const (
StatusStarting = "Starting"
StatusStarted = "Started"
StatusRunning = "Running"
StatusFreezing = "Freezing"
StatusFrozen = "Frozen"
StatusThawed = "Thawed"
StatusStopping = "Stopping"
StatusStopped = "Stopped"
StatusOperationCreated = "Operation created"
StatusPending = "Pending"
StatusAborting = "Aborting"
StatusCancelling = "Canceling"
StatusCancelled = "Canceled"
StatusSuccess = "Success"
StatusFailure = "Failure"
DefaultLXDBridge = "lxdbr0"
)
var allStatuses = map[string]shared.StatusCode{
StatusStarting: shared.Starting,
StatusStarted: shared.Started,
StatusRunning: shared.Running,
StatusFreezing: shared.Freezing,
StatusFrozen: shared.Frozen,
StatusThawed: shared.Thawed,
StatusStopping: shared.Stopping,
StatusStopped: shared.Stopped,
StatusOperationCreated: shared.OperationCreated,
StatusPending: shared.Pending,
StatusAborting: shared.Aborting,
StatusCancelling: shared.Cancelling,
StatusCancelled: shared.Cancelled,
StatusSuccess: shared.Success,
StatusFailure: shared.Failure,
}