github.com/gophercloud/gophercloud@v1.11.0/openstack/imageservice/v2/images/types.go (about) 1 package images 2 3 import ( 4 "time" 5 ) 6 7 // ImageStatus image statuses 8 // http://docs.openstack.org/developer/glance/statuses.html 9 type ImageStatus string 10 11 const ( 12 // ImageStatusQueued is a status for an image which identifier has 13 // been reserved for an image in the image registry. 14 ImageStatusQueued ImageStatus = "queued" 15 16 // ImageStatusSaving denotes that an image’s raw data is currently being 17 // uploaded to Glance 18 ImageStatusSaving ImageStatus = "saving" 19 20 // ImageStatusActive denotes an image that is fully available in Glance. 21 ImageStatusActive ImageStatus = "active" 22 23 // ImageStatusKilled denotes that an error occurred during the uploading 24 // of an image’s data, and that the image is not readable. 25 ImageStatusKilled ImageStatus = "killed" 26 27 // ImageStatusDeleted is used for an image that is no longer available to use. 28 // The image information is retained in the image registry. 29 ImageStatusDeleted ImageStatus = "deleted" 30 31 // ImageStatusPendingDelete is similar to Delete, but the image is not yet 32 // deleted. 33 ImageStatusPendingDelete ImageStatus = "pending_delete" 34 35 // ImageStatusDeactivated denotes that access to image data is not allowed to 36 // any non-admin user. 37 ImageStatusDeactivated ImageStatus = "deactivated" 38 39 // ImageStatusImporting denotes that an import call has been made but that 40 // the image is not yet ready for use. 41 ImageStatusImporting ImageStatus = "importing" 42 ) 43 44 // ImageVisibility denotes an image that is fully available in Glance. 45 // This occurs when the image data is uploaded, or the image size is explicitly 46 // set to zero on creation. 47 // According to design 48 // https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design 49 type ImageVisibility string 50 51 const ( 52 // ImageVisibilityPublic all users 53 ImageVisibilityPublic ImageVisibility = "public" 54 55 // ImageVisibilityPrivate users with tenantId == tenantId(owner) 56 ImageVisibilityPrivate ImageVisibility = "private" 57 58 // ImageVisibilityShared images are visible to: 59 // - users with tenantId == tenantId(owner) 60 // - users with tenantId in the member-list of the image 61 // - users with tenantId in the member-list with member_status == 'accepted' 62 ImageVisibilityShared ImageVisibility = "shared" 63 64 // ImageVisibilityCommunity images: 65 // - all users can see and boot it 66 // - users with tenantId in the member-list of the image with 67 // member_status == 'accepted' have this image in their default image-list. 68 ImageVisibilityCommunity ImageVisibility = "community" 69 ) 70 71 // MemberStatus is a status for adding a new member (tenant) to an image 72 // member list. 73 type ImageMemberStatus string 74 75 const ( 76 // ImageMemberStatusAccepted is the status for an accepted image member. 77 ImageMemberStatusAccepted ImageMemberStatus = "accepted" 78 79 // ImageMemberStatusPending shows that the member addition is pending 80 ImageMemberStatusPending ImageMemberStatus = "pending" 81 82 // ImageMemberStatusAccepted is the status for a rejected image member 83 ImageMemberStatusRejected ImageMemberStatus = "rejected" 84 85 // ImageMemberStatusAll 86 ImageMemberStatusAll ImageMemberStatus = "all" 87 ) 88 89 // ImageDateFilter represents a valid filter to use for filtering 90 // images by their date during a List. 91 type ImageDateFilter string 92 93 const ( 94 FilterGT ImageDateFilter = "gt" 95 FilterGTE ImageDateFilter = "gte" 96 FilterLT ImageDateFilter = "lt" 97 FilterLTE ImageDateFilter = "lte" 98 FilterNEQ ImageDateFilter = "neq" 99 FilterEQ ImageDateFilter = "eq" 100 ) 101 102 // ImageDateQuery represents a date field to be used for listing images. 103 // If no filter is specified, the query will act as though FilterEQ was 104 // set. 105 type ImageDateQuery struct { 106 Date time.Time 107 Filter ImageDateFilter 108 }