public function GetServerIPAddresses(DBServer $DBServer)
{
$cloudLocation = $this->GetServerCloudLocation($DBServer);
$env = $DBServer->GetEnvironmentObject();
$cs = $env->cloudstack($this->platform);
try {
$info = $cs->instance->describe(array('id' => $DBServer->GetProperty(CLOUDSTACK_SERVER_PROPERTIES::SERVER_ID)));
$info = !empty($info[0]) ? $info[0] : null;
} catch (Exception $e) {
}
if (!empty($info) && property_exists($info, 'id') && $info->id == $DBServer->GetProperty(CLOUDSTACK_SERVER_PROPERTIES::SERVER_ID)) {
return $this->determineServerIps($cs, $info);
}
return array('localIp' => null, 'remoteIp' => null);
}