hi all,
I'm trying to automate update/install of vmware tool in virtual machine but this simple test code aren't work.
I can see error in VSphere console but i can't handle fault
$vm_view->UpgradeTools_Task ;
} ;
if ( $@ ) {
print "erreur\n" ;
$@->faultMessage() ;
print Dumper $@ ;
}
There are some methods in the API that have a non-task option, such as UpgradeTools. In those cases, you can call either, but I'm not sure how offical the non _task() version of the call will be in the future.
If you use the Task version, you have to query the task to get the state of the task execution, including error code. If you use the non-task version, you can probably rely on an eval to catch the SOAP error message.
There are a lot of diference between API reference docuementation and reality.
There are some methods in the API that have a non-task option, such as UpgradeTools. In those cases, you can call either, but I'm not sure how offical the non _task() version of the call will be in the future.
If you use the Task version, you have to query the task to get the state of the task execution, including error code. If you use the non-task version, you can probably rely on an eval to catch the SOAP error message.
