Documentation
¶
Overview ¶
Lists all the images. A image is a template which can be used to deploy machines
Index ¶
- type ACL
- type ComputeCISetRequest
- type ComputeCIUnsetRequest
- type CreateCDROMImageRequest
- type CreateRequest
- type CreateVirtualRequest
- type DeleteCDROMImageRequest
- type DeleteImagesRequest
- type DeleteRequest
- type DisableRequest
- type EditRequest
- type EnableRequest
- type GetRequest
- type History
- type Image
- func (i Image) ComputeCISet(ctx context.Context, req ComputeCISetRequest) (bool, error)
- func (i Image) ComputeCIUnset(ctx context.Context, req ComputeCIUnsetRequest) (bool, error)
- func (i Image) CreateCDROMImage(ctx context.Context, req CreateCDROMImageRequest) (uint64, error)
- func (i Image) CreateImage(ctx context.Context, req CreateRequest) (uint64, error)
- func (i Image) CreateVirtual(ctx context.Context, req CreateVirtualRequest) (uint64, error)
- func (i Image) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (i Image) DeleteCDROMImage(ctx context.Context, req DeleteCDROMImageRequest) (bool, error)
- func (i Image) DeleteImages(ctx context.Context, req DeleteImagesRequest) (bool, error)
- func (i Image) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (i Image) Edit(ctx context.Context, req EditRequest) (bool, error)
- func (i Image) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (i Image) Get(ctx context.Context, req GetRequest) (*RecordImage, error)
- func (i Image) Link(ctx context.Context, req LinkRequest) (bool, error)
- func (i Image) List(ctx context.Context, req ListRequest) (ListImages, error)
- func (i Image) ListStacks(ctx context.Context, req ListStacksRequest) (ListStacks, error)
- func (i Image) Rename(ctx context.Context, req RenameRequest) (bool, error)
- func (i Image) Share(ctx context.Context, req ShareRequest) (bool, error)
- func (i Image) SyncCreate(ctx context.Context, req SyncCreateRequest) (uint64, error)
- func (i Image) UpdateNodes(ctx context.Context, req UpdateNodesRequest) (bool, error)
- type LinkRequest
- type ListACL
- type ListHistory
- type ListImages
- type ListRequest
- type ListStacks
- type ListStacksRequest
- type RecordImage
- type RenameRequest
- type ShareRequest
- type SyncCreateRequest
- type UpdateNodesRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
// Explicit
Explicit bool `json:"explicit"`
// GUID
GUID string `json:"guid"`
// Right
Right string `json:"right"`
// Status
Status string `json:"status"`
// Type
Type string `json:"type"`
// User group ID
UserGroupID string `json:"userGroupId"`
}
Access Control List
type ComputeCISetRequest ¶
type ComputeCISetRequest struct {
// ID of the image
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// ID of the compute CI
// Required: true
ComputeCIID uint64 `url:"computeciId" json:"computeciId"`
}
Request struct for set compute CI
type ComputeCIUnsetRequest ¶
type ComputeCIUnsetRequest struct {
// ID of the image
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
}
Request struct for unset compute CI
type CreateCDROMImageRequest ¶
type CreateCDROMImageRequest struct {
// Name of the rescue disk
// Required: true
Name string `url:"name" json:"name"`
// URL where to download ISO from
// Required: true
URL string `url:"url" json:"url"`
// Grid (platform) ID where this CD-ROM image should be create in
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Account ID to make the image exclusive
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// Storage endpoint provider ID for place rescue CD
// Required: false
SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"`
// Pool for place rescue CD
// Required: false
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
// Username for remote media download
// Required: false
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
// Password for remote media download
// Required: false
PasswordDl string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
// Binary architecture of this image
// Should be one of:
// - X86_64
// - PPC64_LE
// Required: false
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
// List of types of compute suitable for image.
// Example: [ "KVM_X86" ]
// Required: true
Drivers []string `url:"drivers" json:"drivers"`
}
Request struct for create CD-ROM image
type CreateRequest ¶
type CreateRequest struct {
// Name of the rescue disk
// Required: true
Name string `url:"name" json:"name"`
// URL where to download media from
// Required: true
URL string `url:"url" json:"url"`
// Grid (platform) ID where this template should be create in
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Boot type of image
// Should be one of:
// - bios
// - UEFI
// Required: true
BootType string `url:"boottype" json:"boottype"`
// Image type
// Should be one of:
// - linux
// - windows
// - or other
// Required: true
ImageType string `url:"imagetype" json:"imagetype"`
// Does this machine supports hot resize
// Required: false
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
// Optional username for the image
// Required: false
Username string `url:"username,omitempty" json:"username,omitempty"`
// Optional password for the image
// Required: false
Password string `url:"password,omitempty" json:"password,omitempty"`
// Account ID to make the image exclusive
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// Username for upload binary media
// Required: false
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
// Password for upload binary media
// Required: false
PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
// Storage endpoint provider ID
// Required: false
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
// Pool for image create
// Required: false
PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"`
// Binary architecture of this image
// Should be one of:
// - X86_64
// - PPC64_LE
// Required: false
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
// List of types of compute suitable for image
// Example: [ "KVM_X86" ]
// Required: true
Drivers []string `url:"drivers" json:"drivers"`
// Bootable image or not
// Required: false
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
}
Request struct for create image
type CreateVirtualRequest ¶
type CreateVirtualRequest struct {
// Name of the virtual image to create
// Required: true
Name string `url:"name" json:"name"`
// ID of real image to link this virtual image to upon creation
// Required: true
TargetID uint64 `url:"targetId" json:"targetId"`
}
Request struct for create virtual image
type DeleteCDROMImageRequest ¶
type DeleteCDROMImageRequest struct {
// ID of the CD-ROM image to delete
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// Whether to completely delete the CD-ROM image, needs to be unused
// Required: true
Permanently bool `url:"permanently" json:"permanently"`
}
Request struct for delete CD-ROM image
type DeleteImagesRequest ¶
type DeleteImagesRequest struct {
// List of images to be deleted
// Required: true
ImageIDs []uint64 `url:"imageIds" json:"imageIds"`
// Reason for action
// Required: true
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
// Whether to completely delete the images
// Required: true
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
Request struct for delete images
type DeleteRequest ¶
type DeleteRequest struct {
// ID of the image to delete
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// Reason for action
// Required: true
Reason string `url:"reason" json:"reason"`
// Whether to completely delete the image
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
Request struct for delete image
type DisableRequest ¶
type DisableRequest struct {
// ID of image to be disabled
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
}
Request struct for disable image
type EditRequest ¶
type EditRequest struct {
// ID of the image to edit
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// Name for the image
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`
// Username for the image
// Required: false
Username string `url:"username,omitempty" json:"username,omitempty"`
// Password for the image
// Required: false
Password string `url:"password,omitempty" json:"password,omitempty"`
// Account ID to make the image exclusive
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// Does this machine supports hot resize
// Required: false
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
// Does this image boot OS
// Required: false
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
}
Request struct for edit image
type EnableRequest ¶
type EnableRequest struct {
// ID of image to be enabled
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
}
Request struct for enable image
type GetRequest ¶
type GetRequest struct {
// ID of image
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
}
Request struct for get image details
type History ¶
type History struct {
// GUID
GUID string `json:"guid"`
// ID
ID uint64 `json:"id"`
// Timestamp
Timestamp uint64 `json:"timestamp"`
}
History information
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Structure for creating request to image
func (Image) ComputeCISet ¶
ComputeCISet set compute CI ID for image
func (Image) ComputeCIUnset ¶
ComputeCIUnset unset compute CI ID from image
func (Image) CreateCDROMImage ¶
CreateCDROMImage creates CD-ROM image from an ISO identified by URL
func (Image) CreateImage ¶
CreateImage creates image from a media identified by URL
func (Image) CreateVirtual ¶
CreateVirtual creates virtual image
func (Image) DeleteCDROMImage ¶
DeleteCDROMImage delete a CD-ROM image
func (Image) DeleteImages ¶
DeleteImages deletes images
func (Image) Get ¶
func (i Image) Get(ctx context.Context, req GetRequest) (*RecordImage, error)
Get get image details by ID
func (Image) List ¶
func (i Image) List(ctx context.Context, req ListRequest) (ListImages, error)
List gets list of information about images
func (Image) ListStacks ¶
func (i Image) ListStacks(ctx context.Context, req ListStacksRequest) (ListStacks, error)
ListStacks gets list stack by image ID
func (Image) SyncCreate ¶
SyncCreate creates image from a media identified by URL (in synchronous mode)
func (Image) UpdateNodes ¶
UpdateNodes udates image availability on nodes
type LinkRequest ¶
type LinkRequest struct {
// ID of the virtual image
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// ID of real image to link this virtual image to
// Required: true
TargetID uint64 `url:"targetId" json:"targetId"`
}
Request struct for link virtual image to another image
type ListRequest ¶
type ListRequest struct {
// Filter images by storage endpoint provider ID
// Required: false
SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
// Required: false
SharedWith uint64 `url:"sharedWith,omitempty" json:"sharedWith,omitempty"`
// Page number
// Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
// Page size
// Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}
Request struct for get list available images
type ListStacks ¶
type ListStacks []struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// API URL
APIURL string `json:"apiUrl"`
// API key
APIKey string `json:"apikey"`
// App ID
AppID string `json:"appId"`
// Description
Description string `json:"desc"`
// Drivers
Drivers []string `json:"drivers"`
// Eco
Eco interface{} `json:"eco"`
// Error
Error uint64 `json:"error"`
// Grid ID
GID uint64 `json:"gid"`
// GID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
// List image IDs
Images []uint64 `json:"images"`
// Login
Login string `json:"login"`
// Name
Name string `json:"name"`
// Password
Password string `json:"passwd"`
// Reference ID
ReferenceID string `json:"referenceId"`
// Status
Status string `json:"status"`
// Type
Type string `json:"type"`
}
List stacks
type ListStacksRequest ¶
type ListStacksRequest struct {
// Image ID
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// Page number
// Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
// Page size
// Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}
Request struct for get list stack
type RecordImage ¶
type RecordImage struct {
// UNC path
UNCPath string `json:"UNCPath"`
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Account ID
AccountID uint64 `json:"accountId"`
// Access Control List
ACL ListACL `json:"acl"`
// Architecture
Architecture string `json:"architecture"`
// Boot type
BootType string `json:"bootType"`
// Bootable
Bootable bool `json:"bootable"`
// Compute CI ID
ComputeCIID uint64 `json:"computeciId"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// Drivers
Drivers []string `json:"drivers"`
// Enabled
Enabled bool `json:"enabled"`
// Grid ID
GID uint64 `json:"gid"`
// GUID
GUID uint64 `json:"guid"`
// List history
History ListHistory `json:"history"`
// Hot resize
HotResize bool `json:"hotResize"`
// ID
ID uint64 `json:"id"`
// Last modified
LastModified uint64 `json:"lastModified"`
// Link to
LinkTo uint64 `json:"linkTo"`
// Milestones
Milestones uint64 `json:"milestones"`
// Name
Name string `json:"name"`
// Password
Password string `json:"password"`
// Pool
Pool string `json:"pool"`
// Present to
PresentTo []uint64 `json:"presentTo"`
// Provider name
ProviderName string `json:"provider_name"`
// Purge attempts
PurgeAttempts uint64 `json:"purgeAttempts"`
// Reference ID
ReferenceID string `json:"referenceId"`
// Resource ID
ResID string `json:"resId"`
// Resource name
ResName string `json:"resName"`
// Rescue CD
RescueCD bool `json:"rescuecd"`
// SEP ID
SEPID uint64 `json:"sepId"`
SharedWith []uint64 `json:"sharedWith"`
// Size
Size uint64 `json:"size"`
// Status
Status string `json:"status"`
// Tech status
TechStatus string `json:"techStatus"`
// Type
Type string `json:"type"`
// URL
URL string `json:"url"`
// Username
Username string `json:"username"`
// Version
Version string `json:"version"`
// Virtual
Virtual bool `json:"virtual"`
}
Detailed information about image
type RenameRequest ¶
type RenameRequest struct {
// ID of the virtual image to rename
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// New name
// Required: true
Name string `url:"name" json:"name"`
}
Request struct for rename image
type ShareRequest ¶
type ShareRequest struct {
// Required: true
ImageId uint64 `url:"imageId" json:"imageId"`
// Required: true
AccountIDs []uint64 `url:"accounts" json:"accounts"`
}
Request struct for share image
type SyncCreateRequest ¶
type SyncCreateRequest struct {
// Name of the rescue disk
// Required: true
Name string `url:"name" json:"name"`
// URL where to download media from
// Required: true
URL string `url:"url" json:"url"`
// Grid (platform) ID where this template should be create in
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Boot type of image
// Should be one of:
// - bios
// - UEFI
// Required: true
BootType string `url:"boottype" json:"boottype"`
// Image type
// Should be one of:
// - linux
// - windows
// - or other
// Required: true
ImageType string `url:"imagetype" json:"imagetype"`
// Does this machine supports hot resize
// Required: false
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
// Optional username for the image
// Required: false
Username string `url:"username,omitempty" json:"username,omitempty"`
// Optional password for the image
// Required: false
Password string `url:"password,omitempty" json:"password,omitempty"`
// Account ID to make the image exclusive
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// Username for upload binary media
// Required: false
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
// Password for upload binary media
// Required: false
PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
// Storage endpoint provider ID
// Required: false
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
// Pool for image create
// Required: false
PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"`
// Binary architecture of this image
// Should be one of:
// - X86_64
// - PPC64_LE
// Required: false
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
// List of types of compute suitable for image
// Example: [ "KVM_X86" ]
// Required: true
Drivers []string `url:"drivers" json:"drivers"`
// Bootable image or not
// Required: false
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
}
Request struct for sync create image
type UpdateNodesRequest ¶
type UpdateNodesRequest struct {
// Image ID
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// List of stacks
// Required: false
EnabledStacks []uint64 `url:"enabledStacks,omitempty" json:"enabledStacks,omitempty"`
}
Request struct for update nodes