-
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.
Merge pull request #100 from solusio/task-oneumyvakin-additional-disk…
…s-SIO-5985 TASK SIO-5985 Add additional disks to create virtual server request.
- Loading branch information
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