Differential D10585 Diff 25583 src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | public function getInterface( | ||||
switch ($type) { | switch ($type) { | ||||
case 'command': | case 'command': | ||||
return id(new DrydockSSHCommandInterface()) | return id(new DrydockSSHCommandInterface()) | ||||
->setConfiguration(array( | ->setConfiguration(array( | ||||
'host' => $resource->getAttribute('host'), | 'host' => $resource->getAttribute('host'), | ||||
'port' => $resource->getAttribute('port'), | 'port' => $resource->getAttribute('port'), | ||||
'credential' => $resource->getAttribute('credential'), | 'credential' => $resource->getAttribute('credential'), | ||||
'platform' => $resource->getAttribute('platform'))) | 'platform' => $resource->getAttribute('platform'), | ||||
)) | |||||
->setWorkingDirectory($lease->getAttribute('path')); | ->setWorkingDirectory($lease->getAttribute('path')); | ||||
case 'filesystem': | case 'filesystem': | ||||
return id(new DrydockSFTPFilesystemInterface()) | return id(new DrydockSFTPFilesystemInterface()) | ||||
->setConfiguration(array( | ->setConfiguration(array( | ||||
'host' => $resource->getAttribute('host'), | 'host' => $resource->getAttribute('host'), | ||||
'port' => $resource->getAttribute('port'), | 'port' => $resource->getAttribute('port'), | ||||
'credential' => $resource->getAttribute('credential'))); | 'credential' => $resource->getAttribute('credential'), | ||||
)); | |||||
} | } | ||||
throw new Exception("No interface of type '{$type}'."); | throw new Exception("No interface of type '{$type}'."); | ||||
} | } | ||||
} | } |