This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 180
/
types.go
75 lines (57 loc) · 2.82 KB
/
types.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package images
// ImageStatus image statuses
// http://docs.openstack.org/developer/glance/statuses.html
type ImageStatus string
const (
// ImageStatusQueued is a status for an image which identifier has
// been reserved for an image in the image registry.
ImageStatusQueued ImageStatus = "queued"
// ImageStatusSaving denotes that an image’s raw data is currently being uploaded to Glance
ImageStatusSaving ImageStatus = "saving"
// ImageStatusActive denotes an image that is fully available in Glance.
ImageStatusActive ImageStatus = "active"
// ImageStatusKilled denotes that an error occurred during the uploading
// of an image’s data, and that the image is not readable.
ImageStatusKilled ImageStatus = "killed"
// ImageStatusDeleted is used for an image that is no longer available to use.
// The image information is retained in the image registry.
ImageStatusDeleted ImageStatus = "deleted"
// ImageStatusPendingDelete is similar to Delete, but the image is not yet deleted.
ImageStatusPendingDelete ImageStatus = "pending_delete"
// ImageStatusDeactivated denotes that access to image data is not allowed to any non-admin user.
ImageStatusDeactivated ImageStatus = "deactivated"
)
// ImageVisibility denotes an image that is fully available in Glance.
// This occurs when the image data is uploaded, or the image size
// is explicitly set to zero on creation.
// According to design
// https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design
type ImageVisibility string
const (
// ImageVisibilityPublic all users
ImageVisibilityPublic ImageVisibility = "public"
// ImageVisibilityPrivate users with tenantId == tenantId(owner)
ImageVisibilityPrivate ImageVisibility = "private"
// ImageVisibilityShared images are visible to:
// - users with tenantId == tenantId(owner)
// - users with tenantId in the member-list of the image
// - users with tenantId in the member-list with member_status == 'accepted'
ImageVisibilityShared ImageVisibility = "shared"
// ImageVisibilityCommunity images:
// - all users can see and boot it
// - users with tenantId in the member-list of the image with member_status == 'accepted'
// have this image in their default image-list
ImageVisibilityCommunity ImageVisibility = "community"
)
// MemberStatus is a status for adding a new member (tenant) to an image member list.
type ImageMemberStatus string
const (
// ImageMemberStatusAccepted is the status for an accepted image member.
ImageMemberStatusAccepted ImageMemberStatus = "accepted"
// ImageMemberStatusPending shows that the member addition is pending
ImageMemberStatusPending ImageMemberStatus = "pending"
// ImageMemberStatusAccepted is the status for a rejected image member
ImageMemberStatusRejected ImageMemberStatus = "rejected"
// ImageMemberStatusAll
ImageMemberStatusAll ImageMemberStatus = "all"
)