Differential D10870 Diff 33744 src/applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php
Show All 18 Lines | public function execute( | ||||
HarbormasterBuild $build, | HarbormasterBuild $build, | ||||
HarbormasterBuildTarget $build_target) { | HarbormasterBuildTarget $build_target) { | ||||
$settings = $this->getSettings(); | $settings = $this->getSettings(); | ||||
// Create the lease. | // Create the lease. | ||||
$lease = id(new DrydockLease()) | $lease = id(new DrydockLease()) | ||||
->setResourceType('host') | ->setResourceType('host') | ||||
->setOwnerPHID($build_target->getPHID()) | |||||
->setAttributes( | ->setAttributes( | ||||
array( | array( | ||||
'platform' => $settings['platform'], | 'platform' => $settings['platform'], | ||||
)) | )) | ||||
->queueForActivation(); | ->queueForActivation(); | ||||
// Wait until the lease is fulfilled. | // Wait until the lease is fulfilled. | ||||
// TODO: This will throw an exception if the lease can't be fulfilled; | // TODO: This will throw an exception if the lease can't be fulfilled; | ||||
Show All 39 Lines |