vadimcomanescu/vmwarephp

soap fault when calling EnterMaintenanceMode_Task or RebootHost_Task

ZsBT opened this issue · 1 comments

ZsBT commented

It seems second parameter disappears before the last SOAP call:

$task = $vhost->EnterMaintenanceMode_Task( $hosts, -1  );

PHP Fatal error: SOAP-ERROR: Encoding: object has no 'timeout' property in /var/cache/src/vmwarephp-master/library/Vmwarephp/Service.php on line 71

PHP Fatal error: Uncaught exception 'Vmwarephp\Exception\Soap' with message 'Client: SOAP-ERROR: Encoding: object has no 'timeout' property. ' in /var/cache/src/vmwarephp-master/library/Vmwarephp/Service.php:74

$task = $vhost->RebootHost_Task( $host, false  );

PHP Fatal error: SOAP-ERROR: Encoding: object has no 'force' property in /var/cache/src/vmwarephp-master/library/Vmwarephp/Service.php on line 71

PHP Fatal error: Uncaught exception 'Vmwarephp\Exception\Soap' with message 'Client: SOAP-ERROR: Encoding: object has no 'force' property. ' in /var/cache/src/vmwarephp-master/library/Vmwarephp/Service.php:74

Tried to debug in Service.php:74 , print_r($soapMessage) shows that the second parameter is indeed missing.

The server is esxcli 5.5

$task = $host->EnterMaintenanceMode_Task(['timeout' => 300]); this syntax works nice for me