public function listLocations($nodeLocationId = null)
{
$locations = array_map([$this, 'toLocation'], $this->digitalocean->region()->getAll());
if ($nodeLocationId) {
foreach ($locations as $location) {
if ($location->getId() == $nodeLocationId) {
return $location;
}
}
}
return $locations;
}