This commit is contained in:
2024-11-12 12:51:21 +03:00
parent f1e0f7abb6
commit 80491ed643
226 changed files with 3033 additions and 2633 deletions

View File

@@ -45,14 +45,13 @@ type CreateCDROMImageRequest struct {
// 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" validate:"min=1,max=2,imageDrivers"`
// Required: false
Drivers []string `url:"drivers,omitempty" json:"drivers,omitempty" validate:"max=2,imageDrivers"`
}
// CreateCDROMImage creates CD-ROM image from an ISO identified by URL

View File

@@ -79,7 +79,6 @@ type CreateRequest struct {
// Binary architecture of this image
// Should be one of:
// - X86_64
// - PPC64_LE
// Required: false
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`

View File

@@ -13,14 +13,6 @@ type DeleteRequest struct {
// ID of the image to delete
// Required: true
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
// Reason for action
// Required: true
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
// Whether to completely delete the image
// Required: false
Permanently bool `url:"permanently" json:"permanently"`
}
// Delete deletes image by ID

View File

@@ -13,10 +13,6 @@ type DeleteCDROMImageRequest struct {
// ID of the CD-ROM image to delete
// Required: true
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
// Whether to completely delete the CD-ROM image, needs to be unused
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
// DeleteCDROMImage deletes a CD-ROM image

View File

@@ -13,14 +13,6 @@ type DeleteImagesRequest struct {
// List of images to be deleted
// Required: true
ImageIDs []uint64 `url:"imageIds" json:"imageIds" validate:"min=1"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
// Whether to completely delete the images
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
// DeleteImages deletes images

View File

@@ -69,6 +69,10 @@ type ListRequest struct {
// Page size
// Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
// Find by enabled True or False
// Required: false
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"`
}
// List gets list of information about images as a ListImages struct

View File

@@ -18,10 +18,6 @@ type SyncCreateRequest struct {
// Required: true
URL string `url:"url" json:"url" validate:"required"`
// Grid (platform) ID where this template should be create in
// Required: true
GID uint64 `url:"gid" json:"gid" validate:"required"`
// Boot type of image
// Should be one of:
// - bios
@@ -79,7 +75,6 @@ type SyncCreateRequest struct {
// Binary architecture of this image
// Should be one of:
// - X86_64
// - PPC64_LE
// Required: false
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`