1
1
package images
2
2
3
3
// ImageStatus image statuses
4
- //http://docs.openstack.org/developer/glance/statuses.html
4
+ // http://docs.openstack.org/developer/glance/statuses.html
5
5
type ImageStatus string
6
6
7
7
const (
8
- // ImageStatusQueued The image identifier has been reserved for an
9
- // image in the Glance registry. No image data has been uploaded to Glance
10
- // and the image size was not explicitly set to zero on creation.
8
+ // ImageStatusQueued is a status for an image which identifier has
9
+ // been reserved for an image in the image registry.
11
10
ImageStatusQueued ImageStatus = "queued"
12
11
13
- // ImageStatusActive Denotes an image that is fully available in Glance.
14
- // This occurs when the image data is uploaded, or the image size is
15
- // explicitly set to zero on creation.
12
+ // ImageStatusSaving denotes that an image’s raw data is currently being uploaded to Glance
13
+ ImageStatusSaving ImageStatus = "saving"
14
+
15
+ // ImageStatusActive denotes an image that is fully available in Glance.
16
16
ImageStatusActive ImageStatus = "active"
17
- // TODO not all image statuses are defined
17
+
18
+ // ImageStatusKilled denotes that an error occurred during the uploading
19
+ // of an image’s data, and that the image is not readable.
20
+ ImageStatusKilled ImageStatus = "killed"
21
+
22
+ // ImageStatusDeleted is used for an image that is no longer available to use.
23
+ // The image information is retained in the image registry.
24
+ ImageStatusDeleted ImageStatus = "deleted"
25
+
26
+ // ImageStatusPendingDelete is similar to Delete, but the image is not yet deleted.
27
+ ImageStatusPendingDelete ImageStatus = "pending_delete"
28
+
29
+ // ImageStatusDeactivated denotes that access to image data is not allowed to any non-admin user.
30
+ ImageStatusDeactivated ImageStatus = "deactivated"
18
31
)
19
32
20
33
// ImageVisibility denotes an image that is fully available in Glance.
@@ -27,6 +40,36 @@ type ImageVisibility string
27
40
const (
28
41
// ImageVisibilityPublic all users
29
42
ImageVisibilityPublic ImageVisibility = "public"
43
+
30
44
// ImageVisibilityPrivate users with tenantId == tenantId(owner)
31
45
ImageVisibilityPrivate ImageVisibility = "private"
46
+
47
+ // ImageVisibilityShared images are visible to:
48
+ // - users with tenantId == tenantId(owner)
49
+ // - users with tenantId in the member-list of the image
50
+ // - users with tenantId in the member-list with member_status == 'accepted'
51
+ ImageVisibilityShared ImageVisibility = "shared"
52
+
53
+ // ImageVisibilityCommunity images:
54
+ // - all users can see and boot it
55
+ // - users with tenantId in the member-list of the image with member_status == 'accepted'
56
+ // have this image in their default image-list
57
+ ImageVisibilityCommunity ImageVisibility = "community"
58
+ )
59
+
60
+ // MemberStatus is a status for adding a new member (tenant) to an image member list.
61
+ type ImageMemberStatus string
62
+
63
+ const (
64
+ // ImageMemberStatusAccepted is the status for an accepted image member.
65
+ ImageMemberStatusAccepted ImageMemberStatus = "accepted"
66
+
67
+ // ImageMemberStatusPending shows that the member addition is pending
68
+ ImageMemberStatusPending ImageMemberStatus = "pending"
69
+
70
+ // ImageMemberStatusAccepted is the status for a rejected image member
71
+ ImageMemberStatusRejected ImageMemberStatus = "rejected"
72
+
73
+ // ImageMemberStatusAll
74
+ ImageMemberStatusAll ImageMemberStatus = "all"
32
75
)
0 commit comments