public function listImages($nodeImageId = null)
{
$args = [];
try {
if ($nodeImageId) {
$args = ['distributionid' => $nodeImageId];
}
return array_map([$this, 'toImage'], $this->linode->execute(new AvailCommand('distributions', $args)));
} catch (\Exception $e) {
throw $e;
}
}