private static function checkStaticNatIp($ipaddress, CloudStack $cs)
{
\Scalr::getContainer()->logger('Cloudstack_Helpers')->debug(sprintf(_("Checking IP: %s"), $ipaddress));
try {
$requestObject = new ListIpAddressesData();
$requestObject->ipaddress = $ipaddress;
$info = $cs->listPublicIpAddresses($requestObject);
if (count($info) > 0) {
return true;
} else {
return false;
}
} catch (Exception $e) {
return false;
}
}