public function getInterface(DrydockResource $resource, DrydockLease $lease, $type) { switch ($type) { case 'command': $ssh = new DrydockSSHCommandInterface(); $ssh->setConfiguration(array('host' => 'secure.phabricator.com', 'user' => 'ec2-user', 'ssh-keyfile' => '/Users/epriestley/.ssh/id_ec2w')); return $ssh; } throw new Exception("No interface of type '{$type}'."); }
public function getInterface(DrydockResource $resource, DrydockLease $lease, $type) { switch ($type) { case 'command': $ssh = new DrydockSSHCommandInterface(); $ssh->setConfiguration(array('host' => $resource->getAttribute('host'), 'user' => $resource->getAttribute('user'), 'ssh-keyfile' => $resource->getAttribute('ssh-keyfile'))); return $ssh; } throw new Exception("No interface of type '{$type}'."); }