| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
package govcd |
| 6 |
|
| 7 |
import ( |
| 8 |
"github.com/hmrc/vmware-govcd/testutil" |
| 9 |
|
| 10 |
. "gopkg.in/check.v1" |
| 11 |
) |
| 12 |
|
| 13 |
func (s *S) Test_ComposeVApp(c *C) { |
| 14 |
|
| 15 |
testServer.ResponseMap(7, testutil.ResponseMap{ |
| 16 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 17 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 18 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 19 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 20 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 21 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 22 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 23 |
}) |
| 24 |
|
| 25 |
|
| 26 |
org, err := s.vdc.GetVDCOrg() |
| 27 |
c.Assert(err, IsNil) |
| 28 |
|
| 29 |
|
| 30 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 31 |
c.Assert(err, IsNil) |
| 32 |
|
| 33 |
|
| 34 |
cat, err := org.FindCatalog("Public Catalog") |
| 35 |
c.Assert(err, IsNil) |
| 36 |
|
| 37 |
|
| 38 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 39 |
c.Assert(err, IsNil) |
| 40 |
|
| 41 |
|
| 42 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 43 |
c.Assert(err, IsNil) |
| 44 |
|
| 45 |
|
| 46 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 47 |
c.Assert(err, IsNil) |
| 48 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 49 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 50 |
|
| 51 |
status, err := s.vapp.GetStatus() |
| 52 |
|
| 53 |
c.Assert(err, IsNil) |
| 54 |
c.Assert(status, Equals, "POWERED_OFF") |
| 55 |
|
| 56 |
_ = testServer.WaitRequests(7) |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
func (s *S) Test_PowerOn(c *C) { |
| 61 |
|
| 62 |
testServer.Response(200, nil, taskExample) |
| 63 |
task, err := s.vapp.PowerOn() |
| 64 |
_ = testServer.WaitRequest() |
| 65 |
|
| 66 |
c.Assert(err, IsNil) |
| 67 |
c.Assert(task.Task.Status, Equals, "success") |
| 68 |
|
| 69 |
} |
| 70 |
|
| 71 |
func (s *S) Test_PowerOff(c *C) { |
| 72 |
|
| 73 |
testServer.Response(200, nil, taskExample) |
| 74 |
task, err := s.vapp.PowerOff() |
| 75 |
_ = testServer.WaitRequest() |
| 76 |
|
| 77 |
c.Assert(err, IsNil) |
| 78 |
c.Assert(task.Task.Status, Equals, "success") |
| 79 |
|
| 80 |
} |
| 81 |
|
| 82 |
func (s *S) Test_Reboot(c *C) { |
| 83 |
|
| 84 |
testServer.Response(200, nil, taskExample) |
| 85 |
task, err := s.vapp.Reboot() |
| 86 |
_ = testServer.WaitRequest() |
| 87 |
|
| 88 |
c.Assert(err, IsNil) |
| 89 |
c.Assert(task.Task.Status, Equals, "success") |
| 90 |
|
| 91 |
} |
| 92 |
|
| 93 |
func (s *S) Test_SetOvf(c *C) { |
| 94 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 95 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 96 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 97 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 98 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 99 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 100 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 101 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 102 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000/productSections": testutil.Response{200, nil, taskExample}, |
| 103 |
}) |
| 104 |
|
| 105 |
|
| 106 |
org, err := s.vdc.GetVDCOrg() |
| 107 |
c.Assert(err, IsNil) |
| 108 |
|
| 109 |
|
| 110 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 111 |
c.Assert(err, IsNil) |
| 112 |
|
| 113 |
|
| 114 |
cat, err := org.FindCatalog("Public Catalog") |
| 115 |
c.Assert(err, IsNil) |
| 116 |
|
| 117 |
|
| 118 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 119 |
c.Assert(err, IsNil) |
| 120 |
|
| 121 |
|
| 122 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 123 |
c.Assert(err, IsNil) |
| 124 |
|
| 125 |
|
| 126 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 127 |
c.Assert(err, IsNil) |
| 128 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 129 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 130 |
|
| 131 |
var test map[string]string |
| 132 |
test = make(map[string]string) |
| 133 |
test["guestinfo.hostname"] = "testhostname" |
| 134 |
task, err = s.vapp.SetOvf(test) |
| 135 |
|
| 136 |
c.Assert(err, IsNil) |
| 137 |
c.Assert(task.Task.Status, Equals, "success") |
| 138 |
|
| 139 |
_ = testServer.WaitRequests(8) |
| 140 |
|
| 141 |
} |
| 142 |
|
| 143 |
func (s *S) Test_AddMetadata(c *C) { |
| 144 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 145 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 146 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 147 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 148 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 149 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 150 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 151 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 152 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000/metadata/key": testutil.Response{200, nil, taskExample}, |
| 153 |
}) |
| 154 |
|
| 155 |
|
| 156 |
org, err := s.vdc.GetVDCOrg() |
| 157 |
c.Assert(err, IsNil) |
| 158 |
|
| 159 |
|
| 160 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 161 |
c.Assert(err, IsNil) |
| 162 |
|
| 163 |
|
| 164 |
cat, err := org.FindCatalog("Public Catalog") |
| 165 |
c.Assert(err, IsNil) |
| 166 |
|
| 167 |
|
| 168 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 169 |
c.Assert(err, IsNil) |
| 170 |
|
| 171 |
|
| 172 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 173 |
c.Assert(err, IsNil) |
| 174 |
|
| 175 |
|
| 176 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 177 |
c.Assert(err, IsNil) |
| 178 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 179 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 180 |
|
| 181 |
task, err = s.vapp.AddMetadata("key", "value") |
| 182 |
|
| 183 |
c.Assert(err, IsNil) |
| 184 |
c.Assert(task.Task.Status, Equals, "success") |
| 185 |
|
| 186 |
_ = testServer.WaitRequests(8) |
| 187 |
|
| 188 |
} |
| 189 |
|
| 190 |
func (s *S) Test_ChangeVMName(c *C) { |
| 191 |
|
| 192 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 193 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 194 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 195 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 196 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 197 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 198 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 199 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 200 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, taskExample}, |
| 201 |
}) |
| 202 |
|
| 203 |
|
| 204 |
org, err := s.vdc.GetVDCOrg() |
| 205 |
c.Assert(err, IsNil) |
| 206 |
|
| 207 |
|
| 208 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 209 |
c.Assert(err, IsNil) |
| 210 |
|
| 211 |
|
| 212 |
cat, err := org.FindCatalog("Public Catalog") |
| 213 |
c.Assert(err, IsNil) |
| 214 |
|
| 215 |
|
| 216 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 217 |
c.Assert(err, IsNil) |
| 218 |
|
| 219 |
|
| 220 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 221 |
c.Assert(err, IsNil) |
| 222 |
|
| 223 |
|
| 224 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 225 |
c.Assert(err, IsNil) |
| 226 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 227 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 228 |
|
| 229 |
task, err = s.vapp.ChangeVMName("My-vm") |
| 230 |
|
| 231 |
c.Assert(err, IsNil) |
| 232 |
c.Assert(task.Task.Status, Equals, "success") |
| 233 |
|
| 234 |
_ = testServer.WaitRequests(8) |
| 235 |
|
| 236 |
} |
| 237 |
|
| 238 |
func (s *S) Test_Reset(c *C) { |
| 239 |
|
| 240 |
testServer.Response(200, nil, taskExample) |
| 241 |
task, err := s.vapp.Reset() |
| 242 |
_ = testServer.WaitRequest() |
| 243 |
|
| 244 |
c.Assert(err, IsNil) |
| 245 |
c.Assert(task.Task.Status, Equals, "success") |
| 246 |
|
| 247 |
} |
| 248 |
|
| 249 |
func (s *S) Test_Suspend(c *C) { |
| 250 |
|
| 251 |
testServer.Response(200, nil, taskExample) |
| 252 |
task, err := s.vapp.Suspend() |
| 253 |
_ = testServer.WaitRequest() |
| 254 |
|
| 255 |
c.Assert(err, IsNil) |
| 256 |
c.Assert(task.Task.Status, Equals, "success") |
| 257 |
|
| 258 |
} |
| 259 |
|
| 260 |
func (s *S) Test_Shutdown(c *C) { |
| 261 |
|
| 262 |
testServer.Response(200, nil, taskExample) |
| 263 |
task, err := s.vapp.Shutdown() |
| 264 |
_ = testServer.WaitRequest() |
| 265 |
|
| 266 |
c.Assert(err, IsNil) |
| 267 |
c.Assert(task.Task.Status, Equals, "success") |
| 268 |
|
| 269 |
} |
| 270 |
|
| 271 |
func (s *S) Test_Undeploy(c *C) { |
| 272 |
|
| 273 |
testServer.Response(200, nil, taskExample) |
| 274 |
task, err := s.vapp.Undeploy() |
| 275 |
_ = testServer.WaitRequest() |
| 276 |
|
| 277 |
c.Assert(err, IsNil) |
| 278 |
c.Assert(task.Task.Status, Equals, "success") |
| 279 |
|
| 280 |
} |
| 281 |
|
| 282 |
func (s *S) Test_Deploy(c *C) { |
| 283 |
|
| 284 |
testServer.Response(200, nil, taskExample) |
| 285 |
task, err := s.vapp.Deploy() |
| 286 |
_ = testServer.WaitRequest() |
| 287 |
|
| 288 |
c.Assert(err, IsNil) |
| 289 |
c.Assert(task.Task.Status, Equals, "success") |
| 290 |
|
| 291 |
} |
| 292 |
|
| 293 |
func (s *S) Test_Delete(c *C) { |
| 294 |
|
| 295 |
testServer.Response(200, nil, taskExample) |
| 296 |
task, err := s.vapp.Delete() |
| 297 |
_ = testServer.WaitRequest() |
| 298 |
|
| 299 |
c.Assert(err, IsNil) |
| 300 |
c.Assert(task.Task.Status, Equals, "success") |
| 301 |
|
| 302 |
} |
| 303 |
|
| 304 |
func (s *S) Test_RunCustomizationScript(c *C) { |
| 305 |
|
| 306 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 307 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 308 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 309 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 310 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 311 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 312 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 313 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 314 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000/guestCustomizationSection/": testutil.Response{200, nil, taskExample}, |
| 315 |
}) |
| 316 |
|
| 317 |
|
| 318 |
org, err := s.vdc.GetVDCOrg() |
| 319 |
c.Assert(err, IsNil) |
| 320 |
|
| 321 |
|
| 322 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 323 |
c.Assert(err, IsNil) |
| 324 |
|
| 325 |
|
| 326 |
cat, err := org.FindCatalog("Public Catalog") |
| 327 |
c.Assert(err, IsNil) |
| 328 |
|
| 329 |
|
| 330 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 331 |
c.Assert(err, IsNil) |
| 332 |
|
| 333 |
|
| 334 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 335 |
c.Assert(err, IsNil) |
| 336 |
|
| 337 |
|
| 338 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 339 |
c.Assert(err, IsNil) |
| 340 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 341 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 342 |
|
| 343 |
task, err = s.vapp.RunCustomizationScript("computername", "this is my script") |
| 344 |
|
| 345 |
c.Assert(err, IsNil) |
| 346 |
c.Assert(task.Task.Status, Equals, "success") |
| 347 |
|
| 348 |
_ = testServer.WaitRequests(8) |
| 349 |
|
| 350 |
} |
| 351 |
|
| 352 |
func (s *S) Test_ChangeCPUcount(c *C) { |
| 353 |
|
| 354 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 355 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 356 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 357 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 358 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 359 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 360 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 361 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 362 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/cpu": testutil.Response{200, nil, taskExample}, |
| 363 |
}) |
| 364 |
|
| 365 |
|
| 366 |
org, err := s.vdc.GetVDCOrg() |
| 367 |
c.Assert(err, IsNil) |
| 368 |
|
| 369 |
|
| 370 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 371 |
c.Assert(err, IsNil) |
| 372 |
|
| 373 |
|
| 374 |
cat, err := org.FindCatalog("Public Catalog") |
| 375 |
c.Assert(err, IsNil) |
| 376 |
|
| 377 |
|
| 378 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 379 |
c.Assert(err, IsNil) |
| 380 |
|
| 381 |
|
| 382 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 383 |
c.Assert(err, IsNil) |
| 384 |
|
| 385 |
|
| 386 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 387 |
c.Assert(err, IsNil) |
| 388 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 389 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 390 |
|
| 391 |
task, err = s.vapp.ChangeCPUcount(2) |
| 392 |
|
| 393 |
c.Assert(err, IsNil) |
| 394 |
c.Assert(task.Task.Status, Equals, "success") |
| 395 |
|
| 396 |
_ = testServer.WaitRequests(8) |
| 397 |
|
| 398 |
} |
| 399 |
|
| 400 |
func (s *S) Test_ChangeMemorySize(c *C) { |
| 401 |
|
| 402 |
testServer.ResponseMap(8, testutil.ResponseMap{ |
| 403 |
"/api/org/11111111-1111-1111-1111-111111111111": testutil.Response{200, nil, orgExample}, |
| 404 |
"/api/network/44444444-4444-4444-4444-4444444444444": testutil.Response{200, nil, orgvdcnetExample}, |
| 405 |
"/api/catalog/e8a20fdf-8a78-440c-ac71-0420db59f854": testutil.Response{200, nil, catalogExample}, |
| 406 |
"/api/catalogItem/1176e485-8858-4e15-94e5-ae4face605ae": testutil.Response{200, nil, catalogitemExample}, |
| 407 |
"/api/vAppTemplate/vappTemplate-40cb9721-5f1a-44f9-b5c3-98c5f518c4f5": testutil.Response{200, nil, vapptemplateExample}, |
| 408 |
"/api/vdc/00000000-0000-0000-0000-000000000000/action/composeVApp": testutil.Response{200, nil, instantiatedvappExample}, |
| 409 |
"/api/vApp/vapp-00000000-0000-0000-0000-000000000000": testutil.Response{200, nil, vappExample}, |
| 410 |
"/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/memory": testutil.Response{200, nil, taskExample}, |
| 411 |
}) |
| 412 |
|
| 413 |
|
| 414 |
org, err := s.vdc.GetVDCOrg() |
| 415 |
c.Assert(err, IsNil) |
| 416 |
|
| 417 |
|
| 418 |
net, err := s.vdc.FindVDCNetwork("networkName") |
| 419 |
c.Assert(err, IsNil) |
| 420 |
|
| 421 |
|
| 422 |
cat, err := org.FindCatalog("Public Catalog") |
| 423 |
c.Assert(err, IsNil) |
| 424 |
|
| 425 |
|
| 426 |
catitem, err := cat.FindCatalogItem("CentOS64-32bit") |
| 427 |
c.Assert(err, IsNil) |
| 428 |
|
| 429 |
|
| 430 |
vapptemplate, err := catitem.GetVAppTemplate() |
| 431 |
c.Assert(err, IsNil) |
| 432 |
|
| 433 |
|
| 434 |
task, err := s.vapp.ComposeVApp(net, vapptemplate, "name", "description") |
| 435 |
c.Assert(err, IsNil) |
| 436 |
c.Assert(task.Task.OperationName, Equals, "vdcInstantiateVapp") |
| 437 |
c.Assert(s.vapp.VApp.HREF, Equals, "http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000") |
| 438 |
|
| 439 |
task, err = s.vapp.ChangeMemorySize(4096) |
| 440 |
|
| 441 |
c.Assert(err, IsNil) |
| 442 |
c.Assert(task.Task.Status, Equals, "success") |
| 443 |
|
| 444 |
_ = testServer.WaitRequests(8) |
| 445 |
|
| 446 |
} |
| 447 |
|
| 448 |
var instantiatedvappExample = ` |
| 449 |
<?xml version="1.0" ?> |
| 450 |
<VApp deployed="false" href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" id="urn:vcloud:vapp:00000000-0000-0000-0000-000000000000" name="myVApp" ovfDescriptorUploaded="true" status="0" type="application/vnd.vmware.vcloud.vApp+xml" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.6.32.3/api/v1.5/schema/master.xsd"> |
| 451 |
<Link href="http://localhost:4444/api/network/f869430c-7490-4d32-bf34-4208b6059c21" name="M916272752-5793-default-routed" rel="down" type="application/vnd.vmware.vcloud.vAppNetwork+xml"/> |
| 452 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/controlAccess/" rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml"/> |
| 453 |
<Link href="http://localhost:4444/api/vdc/214cd6b2-3f7a-4ee5-9b0a-52b4001a4a84" rel="up" type="application/vnd.vmware.vcloud.vdc+xml"/> |
| 454 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/owner" rel="down" type="application/vnd.vmware.vcloud.owner+xml"/> |
| 455 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/metadata" rel="down" type="application/vnd.vmware.vcloud.metadata+xml"/> |
| 456 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/ovf" rel="ovf" type="text/xml"/> |
| 457 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/productSections/" rel="down" type="application/vnd.vmware.vcloud.productSections+xml"/> |
| 458 |
<Link href="http://localhost:4444/api/vApp/00000000-0000-0000-0000-000000000000/backups" rel="add" type="application/vnd.emc.vcp.adhocBackupParams+xml"/> |
| 459 |
<Link href="http://localhost:4444/api/vApp/00000000-0000-0000-0000-000000000000/backups" rel="add" type="application/vnd.emc.vcp.adhocBackupParams+xml"/> |
| 460 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/metrics/historic" rel="advancedmetrics" type="application/vnd.vmware.vcloud.metrics.historicUsageList+xml"/> |
| 461 |
<Description>My vApp to be deployed</Description> |
| 462 |
<Tasks> |
| 463 |
<Task cancelRequested="false" expiryTime="2015-01-22T15:26:59.824Z" href="http://localhost:4444/api/task/b3ff4b8c-9292-41a5-8dc8-22aba49bb02d" id="urn:vcloud:task:b3ff4b8c-9292-41a5-8dc8-22aba49bb02d" name="task" operation="Creating Virtual Application My vApp 2(00000000-0000-0000-0000-000000000000)" operationName="vdcInstantiateVapp" serviceNamespace="com.vmware.vcloud" startTime="2014-10-24T15:26:59.824Z" status="running" type="application/vnd.vmware.vcloud.task+xml"> |
| 464 |
<Link href="http://localhost:4444/api/task/b3ff4b8c-9292-41a5-8dc8-22aba49bb02d/action/cancel" rel="task:cancel"/> |
| 465 |
<Owner href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" name="My vApp 2" type="application/vnd.vmware.vcloud.vApp+xml"/> |
| 466 |
<User href="http://localhost:4444/api/admin/user/d8ac278a-5b49-4c85-9a81-468838e89eb9" name="[email protected]" type="application/vnd.vmware.admin.user+xml"/> |
| 467 |
<Organization href="http://localhost:4444/api/org/23bd2339-c55f-403c-baf3-13109e8c8d57" name="M916272752-5793" type="application/vnd.vmware.vcloud.org+xml"/> |
| 468 |
<Progress>1</Progress> |
| 469 |
<Details/> |
| 470 |
</Task> |
| 471 |
</Tasks> |
| 472 |
<DateCreated>2014-10-24T15:26:59.067Z</DateCreated> |
| 473 |
<Owner type="application/vnd.vmware.vcloud.owner+xml"> |
| 474 |
<User href="http://localhost:4444/api/admin/user/d8ac278a-5b49-4c85-9a81-468838e89eb9" name="[email protected]" type="application/vnd.vmware.admin.user+xml"/> |
| 475 |
</Owner> |
| 476 |
<InMaintenanceMode>false</InMaintenanceMode> |
| 477 |
</VApp> |
| 478 |
` |
| 479 |
|
| 480 |
var vappExample = ` |
| 481 |
<?xml version="1.0" ?> |
| 482 |
<VApp deployed="false" href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" id="urn:vcloud:vapp:00000000-0000-0000-0000-000000000000" name="Test API GO4" ovfDescriptorUploaded="true" status="8" type="application/vnd.vmware.vcloud.vApp+xml" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://www.vmware.com/schema/ovf http://www.vmware.com/schema/ovf http://schemas.dmtf.org/ovf/envelope/1http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://10.6.32.3/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd"> |
| 483 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/power/action/powerOn" rel="power:powerOn"/> |
| 484 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/deploy" rel="deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml"/> |
| 485 |
<Link href="http://localhost:4444/api/network/e68434e9-a9ae-47d8-b809-743e70307085" name="M916272752-5793-default-isolated" rel="down" type="application/vnd.vmware.vcloud.vAppNetwork+xml"/> |
| 486 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/controlAccess/" rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml"/> |
| 487 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/controlAccess" rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"/> |
| 488 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/recomposeVApp" rel="recompose" type="application/vnd.vmware.vcloud.recomposeVAppParams+xml"/> |
| 489 |
<Link href="http://localhost:4444/api/vdc/214cd6b2-3f7a-4ee5-9b0a-52b4001a4a84" rel="up" type="application/vnd.vmware.vcloud.vdc+xml"/> |
| 490 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" rel="edit" type="application/vnd.vmware.vcloud.vApp+xml"/> |
| 491 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" rel="remove"/> |
| 492 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/enableDownload" rel="enable"/> |
| 493 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/disableDownload" rel="disable"/> |
| 494 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/owner" rel="down" type="application/vnd.vmware.vcloud.owner+xml"/> |
| 495 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/metadata" rel="down" type="application/vnd.vmware.vcloud.metadata+xml"/> |
| 496 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/ovf" rel="ovf" type="text/xml"/> |
| 497 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/productSections/" rel="down" type="application/vnd.vmware.vcloud.productSections+xml"/> |
| 498 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/action/createSnapshot" rel="snapshot:create" type="application/vnd.vmware.vcloud.createSnapshotParams+xml"/> |
| 499 |
<Link href="http://localhost:4444/api/vApp/00000000-0000-0000-0000-000000000000/backups" rel="add" type="application/vnd.emc.vcp.adhocBackupParams+xml"/> |
| 500 |
<Link href="http://localhost:4444/api/vApp/00000000-0000-0000-0000-000000000000/backups" rel="add" type="application/vnd.emc.vcp.adhocBackupParams+xml"/> |
| 501 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/metrics/historic" rel="advancedmetrics" type="application/vnd.vmware.vcloud.metrics.historicUsageList+xml"/> |
| 502 |
<Description>Test API GO4444!</Description> |
| 503 |
<LeaseSettingsSection href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/leaseSettingsSection/" ovf:required="false" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"> |
| 504 |
<ovf:Info>Lease settings section</ovf:Info> |
| 505 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/leaseSettingsSection/" rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"/> |
| 506 |
<DeploymentLeaseInSeconds>0</DeploymentLeaseInSeconds> |
| 507 |
<StorageLeaseInSeconds>0</StorageLeaseInSeconds> |
| 508 |
</LeaseSettingsSection> |
| 509 |
<ovf:StartupSection vcloud:href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/startupSection/" vcloud:type="application/vnd.vmware.vcloud.startupSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> |
| 510 |
<ovf:Info>VApp startup section</ovf:Info> |
| 511 |
<ovf:Item ovf:id="CentOS64-32bit" ovf:order="0" ovf:startAction="powerOn" ovf:startDelay="0" ovf:stopAction="powerOff" ovf:stopDelay="0"/> |
| 512 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/startupSection/" rel="edit" type="application/vnd.vmware.vcloud.startupSection+xml"/> |
| 513 |
</ovf:StartupSection> |
| 514 |
<ovf:NetworkSection vcloud:href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/networkSection/" vcloud:type="application/vnd.vmware.vcloud.networkSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> |
| 515 |
<ovf:Info>The list of logical networks</ovf:Info> |
| 516 |
<ovf:Network ovf:name="M916272752-5793-default-isolated"> |
| 517 |
<ovf:Description>This isolated network was created with Create VDC.</ovf:Description> |
| 518 |
</ovf:Network> |
| 519 |
<ovf:Network ovf:name="none"> |
| 520 |
<ovf:Description>This is a special place-holder used for disconnected network interfaces.</ovf:Description> |
| 521 |
</ovf:Network> |
| 522 |
</ovf:NetworkSection> |
| 523 |
<NetworkConfigSection href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/networkConfigSection/" ovf:required="false" type="application/vnd.vmware.vcloud.networkConfigSection+xml"> |
| 524 |
<ovf:Info>The configuration parameters for logical networks</ovf:Info> |
| 525 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/networkConfigSection/" rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml"/> |
| 526 |
<NetworkConfig networkName="M916272752-5793-default-isolated"> |
| 527 |
<Link href="http://localhost:4444/api/admin/network/e68434e9-a9ae-47d8-b809-743e70307085/action/reset" rel="repair"/> |
| 528 |
<Description>This isolated network was created with Create VDC.</Description> |
| 529 |
<Configuration> |
| 530 |
<IpScopes> |
| 531 |
<IpScope> |
| 532 |
<IsInherited>true</IsInherited> |
| 533 |
<Gateway>192.168.99.1</Gateway> |
| 534 |
<Netmask>255.255.255.0</Netmask> |
| 535 |
<IsEnabled>true</IsEnabled> |
| 536 |
<IpRanges> |
| 537 |
<IpRange> |
| 538 |
<StartAddress>192.168.99.2</StartAddress> |
| 539 |
<EndAddress>192.168.99.100</EndAddress> |
| 540 |
</IpRange> |
| 541 |
</IpRanges> |
| 542 |
</IpScope> |
| 543 |
</IpScopes> |
| 544 |
<ParentNetwork href="http://localhost:4444/api/admin/network/8d0cbfe2-25b3-4a1f-b608-5ffeabc7a53d" id="8d0cbfe2-25b3-4a1f-b608-5ffeabc7a53d" name="M916272752-5793-default-isolated"/> |
| 545 |
<FenceMode>bridged</FenceMode> |
| 546 |
<RetainNetInfoAcrossDeployments>false</RetainNetInfoAcrossDeployments> |
| 547 |
</Configuration> |
| 548 |
<IsDeployed>false</IsDeployed> |
| 549 |
</NetworkConfig> |
| 550 |
<NetworkConfig networkName="none"> |
| 551 |
<Description>This is a special place-holder used for disconnected network interfaces.</Description> |
| 552 |
<Configuration> |
| 553 |
<IpScopes> |
| 554 |
<IpScope> |
| 555 |
<IsInherited>false</IsInherited> |
| 556 |
<Gateway>196.254.254.254</Gateway> |
| 557 |
<Netmask>255.255.0.0</Netmask> |
| 558 |
<Dns1>196.254.254.254</Dns1> |
| 559 |
</IpScope> |
| 560 |
</IpScopes> |
| 561 |
<FenceMode>isolated</FenceMode> |
| 562 |
</Configuration> |
| 563 |
<IsDeployed>false</IsDeployed> |
| 564 |
</NetworkConfig> |
| 565 |
</NetworkConfigSection> |
| 566 |
<SnapshotSection href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000/snapshotSection" ovf:required="false" type="application/vnd.vmware.vcloud.snapshotSection+xml"> |
| 567 |
<ovf:Info>Snapshot information section</ovf:Info> |
| 568 |
</SnapshotSection> |
| 569 |
<DateCreated>2014-11-06T22:24:43.913Z</DateCreated> |
| 570 |
<Owner type="application/vnd.vmware.vcloud.owner+xml"> |
| 571 |
<User href="http://localhost:4444/api/admin/user/d8ac278a-5b49-4c85-9a81-468838e89eb9" name="[email protected]" type="application/vnd.vmware.admin.user+xml"/> |
| 572 |
</Owner> |
| 573 |
<InMaintenanceMode>false</InMaintenanceMode> |
| 574 |
<Children> |
| 575 |
<Vm deployed="false" href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000" id="urn:vcloud:vm:00000000-0000-0000-0000-000000000000" name="CentOS64-32bit" needsCustomization="true" nestedHypervisorEnabled="false" status="8" type="application/vnd.vmware.vcloud.vm+xml"> |
| 576 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/power/action/powerOn" rel="power:powerOn"/> |
| 577 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/deploy" rel="deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml"/> |
| 578 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000" rel="edit" type="application/vnd.vmware.vcloud.vm+xml"/> |
| 579 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000" rel="remove"/> |
| 580 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/metadata" rel="down" type="application/vnd.vmware.vcloud.metadata+xml"/> |
| 581 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/productSections/" rel="down" type="application/vnd.vmware.vcloud.productSections+xml"/> |
| 582 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/metrics/historic" rel="down" type="application/vnd.vmware.vcloud.metrics.historicUsageSpec+xml"/> |
| 583 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/metrics/historic" rel="metrics" type="application/vnd.vmware.vcloud.metrics.historicUsageSpec+xml"/> |
| 584 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/screen" rel="screen:thumbnail"/> |
| 585 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/media/action/insertMedia" rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml"/> |
| 586 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/media/action/ejectMedia" rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml"/> |
| 587 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/disk/action/attach" rel="disk:attach" type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml"/> |
| 588 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/disk/action/detach" rel="disk:detach" type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml"/> |
| 589 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/upgradeHardwareVersion" rel="upgrade"/> |
| 590 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/enableNestedHypervisor" rel="enable"/> |
| 591 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/customizeAtNextPowerOn" rel="customizeAtNextPowerOn"/> |
| 592 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/createSnapshot" rel="snapshot:create" type="application/vnd.vmware.vcloud.createSnapshotParams+xml"/> |
| 593 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/action/reconfigureVm" name="CentOS64-32bit" rel="reconfigureVm" type="application/vnd.vmware.vcloud.vm+xml"/> |
| 594 |
<Link href="http://localhost:4444/api/vApp/vapp-00000000-0000-0000-0000-000000000000" rel="up" type="application/vnd.vmware.vcloud.vApp+xml"/> |
| 595 |
<Description>id: cts-6.4-32bit</Description> |
| 596 |
<ovf:VirtualHardwareSection ovf:transport="" vcloud:href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> |
| 597 |
<ovf:Info>Virtual hardware requirements</ovf:Info> |
| 598 |
<ovf:System> |
| 599 |
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName> |
| 600 |
<vssd:InstanceID>0</vssd:InstanceID> |
| 601 |
<vssd:VirtualSystemIdentifier>CentOS64-32bit</vssd:VirtualSystemIdentifier> |
| 602 |
<vssd:VirtualSystemType>vmx-09</vssd:VirtualSystemType> |
| 603 |
</ovf:System> |
| 604 |
<ovf:Item> |
| 605 |
<rasd:Address>00:50:56:02:0b:36</rasd:Address> |
| 606 |
<rasd:AddressOnParent>0</rasd:AddressOnParent> |
| 607 |
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation> |
| 608 |
<rasd:Connection vcloud:ipAddressingMode="NONE" vcloud:primaryNetworkConnection="true">none</rasd:Connection> |
| 609 |
<rasd:Description>E1000 ethernet adapter on "none"</rasd:Description> |
| 610 |
<rasd:ElementName>Network adapter 0</rasd:ElementName> |
| 611 |
<rasd:InstanceID>1</rasd:InstanceID> |
| 612 |
<rasd:ResourceSubType>E1000</rasd:ResourceSubType> |
| 613 |
<rasd:ResourceType>10</rasd:ResourceType> |
| 614 |
</ovf:Item> |
| 615 |
<ovf:Item> |
| 616 |
<rasd:Address>0</rasd:Address> |
| 617 |
<rasd:Description>SCSI Controller</rasd:Description> |
| 618 |
<rasd:ElementName>SCSI Controller 0</rasd:ElementName> |
| 619 |
<rasd:InstanceID>2</rasd:InstanceID> |
| 620 |
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType> |
| 621 |
<rasd:ResourceType>6</rasd:ResourceType> |
| 622 |
</ovf:Item> |
| 623 |
<ovf:Item> |
| 624 |
<rasd:AddressOnParent>0</rasd:AddressOnParent> |
| 625 |
<rasd:Description>Hard disk</rasd:Description> |
| 626 |
<rasd:ElementName>Hard disk 1</rasd:ElementName> |
| 627 |
<rasd:HostResource vcloud:busSubType="lsilogic" vcloud:busType="6" vcloud:capacity="20480" vcloud:storageProfileHref="http://localhost:4444/api/vdcStorageProfile/816409e1-6207-4a1f-bd45-947cd03d6452" vcloud:storageProfileOverrideVmDefault="false"/> |
| 628 |
<rasd:InstanceID>2000</rasd:InstanceID> |
| 629 |
<rasd:Parent>2</rasd:Parent> |
| 630 |
<rasd:ResourceType>17</rasd:ResourceType> |
| 631 |
</ovf:Item> |
| 632 |
<ovf:Item> |
| 633 |
<rasd:Address>1</rasd:Address> |
| 634 |
<rasd:Description>IDE Controller</rasd:Description> |
| 635 |
<rasd:ElementName>IDE Controller 1</rasd:ElementName> |
| 636 |
<rasd:InstanceID>3</rasd:InstanceID> |
| 637 |
<rasd:ResourceType>5</rasd:ResourceType> |
| 638 |
</ovf:Item> |
| 639 |
<ovf:Item> |
| 640 |
<rasd:AddressOnParent>0</rasd:AddressOnParent> |
| 641 |
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation> |
| 642 |
<rasd:Description>CD/DVD Drive</rasd:Description> |
| 643 |
<rasd:ElementName>CD/DVD Drive 1</rasd:ElementName> |
| 644 |
<rasd:HostResource/> |
| 645 |
<rasd:InstanceID>3002</rasd:InstanceID> |
| 646 |
<rasd:Parent>3</rasd:Parent> |
| 647 |
<rasd:ResourceType>15</rasd:ResourceType> |
| 648 |
</ovf:Item> |
| 649 |
<ovf:Item> |
| 650 |
<rasd:AddressOnParent>0</rasd:AddressOnParent> |
| 651 |
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation> |
| 652 |
<rasd:Description>Floppy Drive</rasd:Description> |
| 653 |
<rasd:ElementName>Floppy Drive 1</rasd:ElementName> |
| 654 |
<rasd:HostResource/> |
| 655 |
<rasd:InstanceID>8000</rasd:InstanceID> |
| 656 |
<rasd:ResourceType>14</rasd:ResourceType> |
| 657 |
</ovf:Item> |
| 658 |
<ovf:Item vcloud:href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml"> |
| 659 |
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits> |
| 660 |
<rasd:Description>Number of Virtual CPUs</rasd:Description> |
| 661 |
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName> |
| 662 |
<rasd:InstanceID>4</rasd:InstanceID> |
| 663 |
<rasd:Reservation>0</rasd:Reservation> |
| 664 |
<rasd:ResourceType>3</rasd:ResourceType> |
| 665 |
<rasd:VirtualQuantity>1</rasd:VirtualQuantity> |
| 666 |
<rasd:Weight>0</rasd:Weight> |
| 667 |
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket> |
| 668 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/cpu" rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 669 |
</ovf:Item> |
| 670 |
<ovf:Item vcloud:href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml"> |
| 671 |
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits> |
| 672 |
<rasd:Description>Memory Size</rasd:Description> |
| 673 |
<rasd:ElementName>1024 MB of memory</rasd:ElementName> |
| 674 |
<rasd:InstanceID>5</rasd:InstanceID> |
| 675 |
<rasd:Reservation>0</rasd:Reservation> |
| 676 |
<rasd:ResourceType>4</rasd:ResourceType> |
| 677 |
<rasd:VirtualQuantity>1024</rasd:VirtualQuantity> |
| 678 |
<rasd:Weight>0</rasd:Weight> |
| 679 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/memory" rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 680 |
</ovf:Item> |
| 681 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/" rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml"/> |
| 682 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/cpu" rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 683 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/cpu" rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 684 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/memory" rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 685 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/memory" rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml"/> |
| 686 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/disks" rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 687 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/disks" rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 688 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/media" rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 689 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/networkCards" rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 690 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/networkCards" rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 691 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/serialPorts" rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 692 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/virtualHardwareSection/serialPorts" rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml"/> |
| 693 |
</ovf:VirtualHardwareSection> |
| 694 |
<ovf:OperatingSystemSection ovf:id="36" vcloud:href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="centosGuest" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> |
| 695 |
<ovf:Info>Specifies the operating system installed</ovf:Info> |
| 696 |
<ovf:Description>CentOS 4/5/6 (32-bit)</ovf:Description> |
| 697 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/operatingSystemSection/" rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml"/> |
| 698 |
</ovf:OperatingSystemSection> |
| 699 |
<NetworkConnectionSection href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/networkConnectionSection/" ovf:required="false" type="application/vnd.vmware.vcloud.networkConnectionSection+xml"> |
| 700 |
<ovf:Info>Specifies the available VM network connections</ovf:Info> |
| 701 |
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex> |
| 702 |
<NetworkConnection needsCustomization="true" network="none"> |
| 703 |
<NetworkConnectionIndex>0</NetworkConnectionIndex> |
| 704 |
<IsConnected>false</IsConnected> |
| 705 |
<MACAddress>00:50:56:02:0b:36</MACAddress> |
| 706 |
<IpAddressAllocationMode>NONE</IpAddressAllocationMode> |
| 707 |
</NetworkConnection> |
| 708 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/networkConnectionSection/" rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml"/> |
| 709 |
</NetworkConnectionSection> |
| 710 |
<GuestCustomizationSection href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/guestCustomizationSection/" ovf:required="false" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml"> |
| 711 |
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info> |
| 712 |
<Enabled>true</Enabled> |
| 713 |
<ChangeSid>false</ChangeSid> |
| 714 |
<VirtualMachineId>00000000-0000-0000-0000-000000000000</VirtualMachineId> |
| 715 |
<JoinDomainEnabled>false</JoinDomainEnabled> |
| 716 |
<UseOrgSettings>false</UseOrgSettings> |
| 717 |
<AdminPasswordEnabled>true</AdminPasswordEnabled> |
| 718 |
<AdminPasswordAuto>true</AdminPasswordAuto> |
| 719 |
<AdminAutoLogonEnabled>false</AdminAutoLogonEnabled> |
| 720 |
<AdminAutoLogonCount>0</AdminAutoLogonCount> |
| 721 |
<ResetPasswordRequired>true</ResetPasswordRequired> |
| 722 |
<ComputerName>cts-6.4-32bit</ComputerName> |
| 723 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/guestCustomizationSection/" rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml"/> |
| 724 |
</GuestCustomizationSection> |
| 725 |
<ovf:ProductSection ovf:class="" ovf:instance="" ovf:required="true"> |
| 726 |
<ovf:Property ovf:key="guestinfo.hostname" ovf:password="false" ovf:type="string" ovf:userConfigurable="true" ovf:value=""> |
| 727 |
<ovf:Label>Hostname</ovf:Label> |
| 728 |
<ovf:Description>Hostname</ovf:Description> |
| 729 |
<ovf:Value ovf:value="coreos01"/> |
| 730 |
</ovf:Property> |
| 731 |
</ovf:ProductSection> |
| 732 |
<RuntimeInfoSection vcloud:href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/runtimeInfoSection" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> |
| 733 |
<ovf:Info>Specifies Runtime info</ovf:Info> |
| 734 |
<VMWareTools version="9283"/> |
| 735 |
</RuntimeInfoSection> |
| 736 |
<SnapshotSection href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/snapshotSection" ovf:required="false" type="application/vnd.vmware.vcloud.snapshotSection+xml"> |
| 737 |
<ovf:Info>Snapshot information section</ovf:Info> |
| 738 |
</SnapshotSection> |
| 739 |
<VAppScopedLocalId>CentOS64-32bit</VAppScopedLocalId> |
| 740 |
<VmCapabilities href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/vmCapabilities/" type="application/vnd.vmware.vcloud.vmCapabilitiesSection+xml"> |
| 741 |
<Link href="http://localhost:4444/api/vApp/vm-00000000-0000-0000-0000-000000000000/vmCapabilities/" rel="edit" type="application/vnd.vmware.vcloud.vmCapabilitiesSection+xml"/> |
| 742 |
<MemoryHotAddEnabled>false</MemoryHotAddEnabled> |
| 743 |
<CpuHotAddEnabled>false</CpuHotAddEnabled> |
| 744 |
</VmCapabilities> |
| 745 |
<StorageProfile href="http://localhost:4444/api/vdcStorageProfile/816409e1-6207-4a1f-bd45-947cd03d6452" name="SSD-Accelerated" type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"/> |
| 746 |
</Vm> |
| 747 |
</Children> |
| 748 |
</VApp> |
| 749 |
` |