/**
* Gets the list of available locations
*
* @param \Scalr_Environment $environment
* @return \Scalr_Environment Returns the list of available locations looks like array(location => description)
*/
public function getLocations(\Scalr_Environment $environment = null)
{
$accountType = null;
if ($environment instanceof \Scalr_Environment) {
$accountType = $environment->keychain(SERVER_PLATFORMS::EC2)->properties[Entity\CloudCredentialsProperty::AWS_ACCOUNT_TYPE];
}
return $this->getLocationsByAccountType($accountType);
}