@@ -9,17 +9,17 @@ import (
9
9
10
10
// OSImage represents a DD-provided virtual machine image.
11
11
type OSImage struct {
12
- ID string `json:"id"`
13
- Name string `json:"name"`
14
- Description string `json:"description"`
15
- DataCenterID string `json:"datacenterId"`
16
- OperatingSystem OperatingSystem `json:"operatingSystem"`
17
- CPU VirtualMachineCPU `json:"cpu"`
18
- MemoryGB int `json:"memoryGb"`
19
- Disks [] VirtualMachineDisk `json:"disk "`
20
- State string `json:"state"`
21
- CreateTime string `json:"createTime"`
22
- OSImageKey string `json:"osImageKey"`
12
+ ID string `json:"id"`
13
+ Name string `json:"name"`
14
+ Description string `json:"description"`
15
+ DataCenterID string `json:"datacenterId"`
16
+ OperatingSystem OperatingSystem `json:"operatingSystem"`
17
+ CPU VirtualMachineCPU `json:"cpu"`
18
+ MemoryGB int `json:"memoryGb"`
19
+ SCSIControllers VirtualMachineSCSIControllers `json:"scsiController "`
20
+ State string `json:"state"`
21
+ CreateTime string `json:"createTime"`
22
+ OSImageKey string `json:"osImageKey"`
23
23
}
24
24
25
25
// GetID retrieves the image ID.
@@ -79,10 +79,11 @@ func (image *OSImage) ApplyTo(config *ServerDeploymentConfiguration) {
79
79
config .ImageID = image .ID
80
80
config .CPU = image .CPU
81
81
config .MemoryGB = image .MemoryGB
82
- config .Disks = make ([] VirtualMachineDisk , len (image .Disks ))
83
- for index , disk := range image .Disks {
84
- config .Disks [index ] = disk
82
+ config .SCSIControllers = make (VirtualMachineSCSIControllers , len (image .SCSIControllers ))
83
+ for index , scsiController := range image .SCSIControllers {
84
+ config .SCSIControllers [index ] = scsiController
85
85
}
86
+
86
87
}
87
88
88
89
var _ Image = & OSImage {}
@@ -116,7 +117,7 @@ func (client *Client) GetOSImage(id string) (image *OSImage, err error) {
116
117
url .QueryEscape (organizationID ),
117
118
url .QueryEscape (id ),
118
119
)
119
- request , err := client .newRequestV22 (requestURI , http .MethodGet , nil )
120
+ request , err := client .newRequestV25 (requestURI , http .MethodGet , nil )
120
121
if err != nil {
121
122
return nil , err
122
123
}
@@ -161,7 +162,7 @@ func (client *Client) FindOSImage(name string, dataCenterID string) (image *OSIm
161
162
url .QueryEscape (name ),
162
163
url .QueryEscape (dataCenterID ),
163
164
)
164
- request , err := client .newRequestV22 (requestURI , http .MethodGet , nil )
165
+ request , err := client .newRequestV25 (requestURI , http .MethodGet , nil )
165
166
if err != nil {
166
167
return nil , err
167
168
}
@@ -211,7 +212,7 @@ func (client *Client) ListOSImagesInDatacenter(dataCenterID string, paging *Pagi
211
212
url .QueryEscape (dataCenterID ),
212
213
paging .EnsurePaging ().toQueryParameters (),
213
214
)
214
- request , err := client .newRequestV22 (requestURI , http .MethodGet , nil )
215
+ request , err := client .newRequestV25 (requestURI , http .MethodGet , nil )
215
216
if err != nil {
216
217
return nil , err
217
218
}
0 commit comments