Documentation ¶
Index ¶
- Constants
- Variables
- func FetchImageMeta(h http.Header) jsonutils.JSONObject
- type ImageManager
- func (this *ImageManager) AddMembership(s *mcclient.ClientSession, img string, proj string, canShare bool) error
- func (this *ImageManager) BatchGet(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []modulebase.SubmitResult
- func (this *ImageManager) BatchUpdate(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []modulebase.SubmitResult
- func (this *ImageManager) Create(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) Download(s *mcclient.ClientSession, id string, format string, torrent bool) (jsonutils.JSONObject, io.Reader, int64, error)
- func (this *ImageManager) Download2(s *mcclient.ClientSession, id string, format string, torrent bool) (jsonutils.JSONObject, io.ReadCloser, int64, error)
- func (this *ImageManager) Get(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) GetById(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) GetByName(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) GetId(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (string, error)
- func (this *ImageManager) GetPrivateImageCount(s *mcclient.ClientSession, ownerId string, isAdmin bool) (int, error)
- func (this *ImageManager) GetUsage(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*modulebase.ListResult, error)
- func (this *ImageManager) ListMemberProjectIds(s *mcclient.ClientSession, imageId string) (*modulebase.ListResult, error)
- func (this *ImageManager) ListMemberProjects(s *mcclient.ClientSession, imageId string) (*modulebase.ListResult, error)
- func (this *ImageManager) ListSharedImageIds(s *mcclient.ClientSession, projectId string) (*modulebase.ListResult, error)
- func (this *ImageManager) ListSharedImages(s *mcclient.ClientSession, projectId string) (*modulebase.ListResult, error)
- func (this *ImageManager) RemoveMembership(s *mcclient.ClientSession, image string, project string) error
- func (this *ImageManager) Update(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ImageManager) Upload(s *mcclient.ClientSession, params jsonutils.JSONObject, body io.Reader, ...) (jsonutils.JSONObject, error)
- type ImageUsageCount
- type SImageUsageManager
Constants ¶
View Source
const ( IMAGE_META = "X-Image-Meta-" IMAGE_META_PROPERTY = "X-Image-Meta-Property-" IMAGE_METADATA = "X-Image-Meta-Metadata" IMAGE_META_COPY_FROM = "x-glance-api-copy-from" )
Variables ¶
View Source
var GuestImages modulebase.ResourceManager
Functions ¶
func FetchImageMeta ¶
func FetchImageMeta(h http.Header) jsonutils.JSONObject
Types ¶
type ImageManager ¶
type ImageManager struct {
modulebase.ResourceManager
}
var (
Images ImageManager
)
func (*ImageManager) AddMembership ¶
func (this *ImageManager) AddMembership(s *mcclient.ClientSession, img string, proj string, canShare bool) error
func (*ImageManager) BatchGet ¶
func (this *ImageManager) BatchGet(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []modulebase.SubmitResult
func (*ImageManager) BatchUpdate ¶
func (this *ImageManager) BatchUpdate( session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ) []modulebase.SubmitResult
func (*ImageManager) Create ¶
func (this *ImageManager) Create(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) Download ¶
func (this *ImageManager) Download(s *mcclient.ClientSession, id string, format string, torrent bool) (jsonutils.JSONObject, io.Reader, int64, error)
func (*ImageManager) Download2 ¶
func (this *ImageManager) Download2(s *mcclient.ClientSession, id string, format string, torrent bool) (jsonutils.JSONObject, io.ReadCloser, int64, error)
func (*ImageManager) Get ¶
func (this *ImageManager) Get(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) GetById ¶
func (this *ImageManager) GetById(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) GetByName ¶
func (this *ImageManager) GetByName(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) GetId ¶
func (this *ImageManager) GetId(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (string, error)
func (*ImageManager) GetPrivateImageCount ¶
func (this *ImageManager) GetPrivateImageCount(s *mcclient.ClientSession, ownerId string, isAdmin bool) (int, error)
func (*ImageManager) GetUsage ¶
func (this *ImageManager) GetUsage(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) List ¶
func (this *ImageManager) List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*modulebase.ListResult, error)
func (*ImageManager) ListMemberProjectIds ¶
func (this *ImageManager) ListMemberProjectIds(s *mcclient.ClientSession, imageId string) (*modulebase.ListResult, error)
func (*ImageManager) ListMemberProjects ¶
func (this *ImageManager) ListMemberProjects(s *mcclient.ClientSession, imageId string) (*modulebase.ListResult, error)
func (*ImageManager) ListSharedImageIds ¶
func (this *ImageManager) ListSharedImageIds(s *mcclient.ClientSession, projectId string) (*modulebase.ListResult, error)
func (*ImageManager) ListSharedImages ¶
func (this *ImageManager) ListSharedImages(s *mcclient.ClientSession, projectId string) (*modulebase.ListResult, error)
func (*ImageManager) RemoveMembership ¶
func (this *ImageManager) RemoveMembership(s *mcclient.ClientSession, image string, project string) error
func (*ImageManager) Update ¶
func (this *ImageManager) Update(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ImageManager) Upload ¶
func (this *ImageManager) Upload(s *mcclient.ClientSession, params jsonutils.JSONObject, body io.Reader, size int64) (jsonutils.JSONObject, error)
type ImageUsageCount ¶
type SImageUsageManager ¶
type SImageUsageManager struct {
modulebase.ResourceManager
}
var (
ImageUsages SImageUsageManager
)
func (*SImageUsageManager) GetUsage ¶
func (this *SImageUsageManager) GetUsage(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Click to show internal directories.
Click to hide internal directories.