public function GetServerConsoleOutput(DBServer $DBServer)
{
if ($DBServer->GetRealStatus()->getName() != 'ACTIVE') {
return false;
}
$client = $this->getOsClient($DBServer->GetEnvironmentObject(), $DBServer->GetProperty(\OPENSTACK_SERVER_PROPERTIES::CLOUD_LOCATION));
if ($client->servers->isExtensionSupported(ServersExtension::consoleOutput())) {
return $client->servers->getConsoleOutput($DBServer->GetCloudServerID(), 200);
} else {
throw new \Exception("Not supported by Openstack");
}
}