public function listLocations($nodeLocationId = null)
{
$args = [];
try {
if ($nodeLocationId) {
$args = ['datacenterid' => $nodeLocationId];
}
return array_map([$this, 'toLocation'], $this->linode->execute(new AvailCommand('datacenters', $args)));
} catch (\Exception $e) {
throw $e;
}
}