This commit is contained in:
2025-04-09 11:21:07 +03:00
parent 3f21a89e80
commit 8a101c6fcb
115 changed files with 2342 additions and 429 deletions

View File

@@ -18,10 +18,6 @@ type CreateCDROMImageRequest struct {
// Required: true
URL string `url:"url" json:"url" validate:"required,url"`
// Grid (platform) ID where this CD-ROM image should be create in
// Required: true
GID uint64 `url:"gid" json:"gid" validate:"required"`
// Account ID to make the image exclusive
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`

View File

@@ -18,10 +18,6 @@ type CreateRequest struct {
// Required: true
URL string `url:"url" json:"url" validate:"required,url"`
// 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

View File

@@ -29,7 +29,7 @@ var images = ListImages{
Name: "u16",
Password: "",
Pool: "vmstor",
PresentTo: []uint64{},
PresentTo: map[string]uint64{},
ProviderName: "",
PurgeAttempts: 0,
ReferenceID: "sample_reference_id_u16",
@@ -72,7 +72,7 @@ var images = ListImages{
Name: "alpine-virt-3.17",
Password: "",
Pool: "vmstor",
PresentTo: []uint64{},
PresentTo: map[string]uint64{},
ProviderName: "",
PurgeAttempts: 0,
ReferenceID: "sample_reference_id_alpine",
@@ -115,7 +115,7 @@ var images = ListImages{
Name: "test",
Password: "",
Pool: "vmstor",
PresentTo: []uint64{},
PresentTo: map[string]uint64{},
ProviderName: "",
PurgeAttempts: 0,
ReferenceID: "sample_reference_id_test",

View File

@@ -16,7 +16,7 @@ type GrantAccessRequest struct {
// ID of the accounts for share image
// Required: true
AccountIDs []uint64 `url:"accounts" json:"accounts" validate:"required"`
AccountIDs []int64 `url:"accounts" json:"accounts" validate:"required"`
}
// GrantAccess shares specified image with specified accounts

View File

@@ -75,7 +75,7 @@ type RecordImage struct {
Pool string `json:"pool"`
// Present to
PresentTo []uint64 `json:"presentTo"`
PresentTo map[string]uint64 `json:"presentTo"`
// Provider name
ProviderName string `json:"provider_name"`
@@ -201,7 +201,7 @@ type ItemImage struct {
Pool string `json:"pool"`
// Present to
PresentTo []uint64 `json:"presentTo"`
PresentTo map[string]uint64 `json:"presentTo"`
// Provider name
ProviderName string `json:"provider_name"`

View File

@@ -16,7 +16,7 @@ type RevokeAccessRequest struct {
// ID of the accounts for unshare image
// Required: true
AccountIDs []uint64 `url:"accounts" json:"accounts" validate:"required"`
AccountIDs []int64 `url:"accounts" json:"accounts" validate:"required"`
}
// RevokeAccess unshares specified image with specified accounts