-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK SIO-5985 Add additional disks to create virtual server request.
Add AdditionalDisk structure. Add Offer structure.
- Loading branch information
Oleg Neumyvakin
committed
Apr 20, 2024
1 parent
d284a92
commit c2278a0
Showing
3 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package solus | ||
|
||
type AdditionalDiskCreateRequest struct { | ||
Name string `json:"name"` | ||
Size int `json:"size"` | ||
OfferID int `json:"offer_id"` | ||
} | ||
|
||
type AdditionalDisk struct { | ||
ID int `json:"id"` | ||
IsPrimary bool `json:"is_primary"` | ||
Name string `json:"name"` | ||
Size int `json:"size"` | ||
ActualSize int `json:"actual_size"` | ||
Path string `json:"path"` | ||
FullPath string `json:"full_path"` | ||
Storage Storage `json:"storage"` | ||
Offer Offer `json:"offer,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package solus | ||
|
||
const ( | ||
// OfferTypeAdditionalDisk is a constant for additional disk offer type. | ||
OfferTypeAdditionalDisk OfferType = "additional_disk" | ||
) | ||
|
||
type OfferType string | ||
|
||
type Offer struct { | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Description string `json:"description,omitempty"` | ||
Type OfferType `json:"type"` | ||
IsVisible bool `json:"is_visible"` | ||
AvailablePlans []Plan `json:"available_plans"` | ||
AvailableLocations []Location `json:"available_locations"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters