Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

retrieving vApp no possible - what?

$
0
0

I tried this:

 

$sdkVApp = $service->createSDKObj($vAppHref);

 

and it throws:

 

Undefined index: vapp in <b>/var/www/hostname/lib/VMware/VCloud/Factory.php  on line  214

 

 

 

<b>Fatal error</b>:  Uncaught exception 'VMware_VCloud_SDK_Exception' with message 'Create SDK object error: no class name found

' in /var/www/hostname/lib/VMware/VCloud/Factory.php:168

Stack trace:

#0 /var/www/hostname/lib/VMware/VCloud/Service.php(155): VMware_VCloud_SDK_Factory::create(Object(VMware_VCloud_SDK_Service), 'https://cloud.u...')

#1 /var/www/hostname/html/ajax/vm_delete.php(46): VMware_VCloud_SDK_Service-&gt;createSDKObj('https://cloud.u...')

#2 {main}

  thrown in <b>/var/www/hostname/lib/VMware/VCloud/Factory.php</b> on line <b>168</b><br />

 

 

Am I doing this incorrectly?  This seems like a basic proven use case... ?  It works with VMs...

 

I am doing this becuase I delete a vm from a vApp and want to check to see if the vapp is now empty after deleting the VM.  If it is empty I will then clean up by remoiving the vApp also.

 

Any direction would save frustration...

 

Update:

 

Seems that a URL href does not work for vapps.

 

I did this and got better results:

 

$containerVAppRef = $sdkVm->getContainerVAppRef();

$sdkVApp = $service->createSDKObj($containerVAppRef);

 

Is it possible to create the VappRefLink from a URL like the vms do?


Viewing all articles
Browse latest Browse all 2039

Trending Articles