I have created server via the web UI of my hosting provider. I want to be able to stop (shutdown) and start this server on demand from another server via their Openstack API.
I am using php-opencloud/openstack. I can get server by:
$compute = $openstack->computeV2(['region' => $region]);
$server = $compute->getServer(['id' => $server_id]);
$server->retrieve();
then I can reboot via:
$server->reboot();
but how can I just stop the server and then start it ?