public function getLocations(\Scalr_Environment $environment = null)
{
$retval = [];
if ($environment && $environment->isPlatformEnabled($this->platform)) {
try {
$client = $environment->openstack($this->platform, "fakeRegion");
foreach ($client->listZones() as $zone) {
$retval[$zone->name] = ucfirst($this->platform) . " / {$zone->name}";
}
} catch (\Exception $e) {
// No need to do anything here
// If we cannot get list of cloud locations - will return an empty one
}
}
return $retval;
}