| @@ 75-87 (lines=13) @@ | ||
| 72 | } |
|
| 73 | } |
|
| 74 | ||
| 75 | public function addHost($hostId) |
|
| 76 | { |
|
| 77 | // what are we doing? |
|
| 78 | $log = usingLog()->startAction("add host '{$hostId}' to provisioning definition"); |
|
| 79 | ||
| 80 | // create the host |
|
| 81 | if (!isset($this->args[0]->$hostId)) { |
|
| 82 | $this->args[0]->$hostId = new BaseObject(); |
|
| 83 | } |
|
| 84 | ||
| 85 | // all done |
|
| 86 | $log->endAction(); |
|
| 87 | } |
|
| 88 | ||
| 89 | public function addRole($roleName) |
|
| 90 | { |
|
| @@ 157-168 (lines=12) @@ | ||
| 154 | * |
|
| 155 | * @return string |
|
| 156 | */ |
|
| 157 | public function getIpAddress() |
|
| 158 | { |
|
| 159 | // what are we doing? |
|
| 160 | $log = usingLog()->startAction("get IP address of host '{$this->args[0]}'"); |
|
| 161 | ||
| 162 | // make sure we have valid host details |
|
| 163 | $hostDetails = $this->getHostDetails(); |
|
| 164 | ||
| 165 | // all done |
|
| 166 | $log->endAction("IP address is '{$hostDetails->ipAddress}'"); |
|
| 167 | return $hostDetails->ipAddress; |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * @param string $packageName |
|
| @@ 275-289 (lines=15) @@ | ||
| 272 | /** |
|
| 273 | * @return string |
|
| 274 | */ |
|
| 275 | public function getSshUsername() |
|
| 276 | { |
|
| 277 | // what are we doing? |
|
| 278 | $log = usingLog()->startAction("get username to use with SSH to host '{$this->args[0]}'"); |
|
| 279 | ||
| 280 | // make sure we have valid host details |
|
| 281 | $hostDetails = $this->getHostDetails(); |
|
| 282 | ||
| 283 | // get the information |
|
| 284 | $return = $hostDetails->sshUsername; |
|
| 285 | ||
| 286 | // all done |
|
| 287 | $log->endAction("username is '{$return}'"); |
|
| 288 | return $return; |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * @return string |
|
| @@ 294-308 (lines=15) @@ | ||
| 291 | /** |
|
| 292 | * @return string |
|
| 293 | */ |
|
| 294 | public function getSshKeyFile() |
|
| 295 | { |
|
| 296 | // what are we doing? |
|
| 297 | $log = usingLog()->startAction("get key file to use with SSH to host '{$this->args[0]}'"); |
|
| 298 | ||
| 299 | // make sure we have valid host details |
|
| 300 | $hostDetails = $this->getHostDetails(); |
|
| 301 | ||
| 302 | // get the information |
|
| 303 | $return = $hostDetails->sshKeyFile; |
|
| 304 | ||
| 305 | // all done |
|
| 306 | $log->endAction("key file is '{$return}'"); |
|
| 307 | return $return; |
|
| 308 | } |
|
| 309 | ||
| 310 | /** |
|
| 311 | * @param string $sessionName |
|