| @@ 175-190 (lines=16) @@ | ||
| 172 | * @param PhysicalHostDetails $vmDetails |
|
| 173 | * @return string |
|
| 174 | */ |
|
| 175 | public function determineIpAddress($vmDetails) |
|
| 176 | { |
|
| 177 | // what are we doing? |
|
| 178 | $log = Log::usingLog()->startAction("determine IP address of physical host '{$vmDetails->hostId}'"); |
|
| 179 | ||
| 180 | // create an adapter to talk to the host operating system |
|
| 181 | $host = OsLib::getHostAdapter($this->st, $vmDetails->osName); |
|
| 182 | ||
| 183 | // get the IP address |
|
| 184 | $ipAddress = $host->determineIpAddress($vmDetails, $this); |
|
| 185 | $vmDetails->ipAddress = $ipAddress; |
|
| 186 | ||
| 187 | // all done |
|
| 188 | $log->endAction("IP address is '{$ipAddress}'"); |
|
| 189 | return $ipAddress; |
|
| 190 | } |
|
| 191 | ||
| 192 | /** |
|
| 193 | * |
|
| @@ 197-212 (lines=16) @@ | ||
| 194 | * @param PhysicalHostDetails $vmDetails |
|
| 195 | * @return string |
|
| 196 | */ |
|
| 197 | public function determineHostname($vmDetails) |
|
| 198 | { |
|
| 199 | // what are we doing? |
|
| 200 | $log = Log::usingLog()->startAction("determine hostname of physical host '{$vmDetails->hostId}'"); |
|
| 201 | ||
| 202 | // create an adapter to talk to the host operating system |
|
| 203 | $host = OsLib::getHostAdapter($this->st, $vmDetails->osName); |
|
| 204 | ||
| 205 | // get the hostname |
|
| 206 | $hostname = $host->determineHostname($vmDetails, $this); |
|
| 207 | $vmDetails->hostname = $hostname; |
|
| 208 | ||
| 209 | // all done |
|
| 210 | $log->endAction("hostname is '{$hostname}'"); |
|
| 211 | return $hostname; |
|
| 212 | } |
|
| 213 | } |
|
| 214 | ||
| @@ 384-398 (lines=15) @@ | ||
| 381 | * @param stdClass $vmDetails |
|
| 382 | * @return string |
|
| 383 | */ |
|
| 384 | public function determineIpAddress($vmDetails) |
|
| 385 | { |
|
| 386 | // what are we doing? |
|
| 387 | $log = Log::usingLog()->startAction("determine IP address of Vagrant VM '{$vmDetails->hostId}'"); |
|
| 388 | ||
| 389 | // create an adapter to talk to the host operating system |
|
| 390 | $host = OsLib::getHostAdapter($this->st, $vmDetails->osName); |
|
| 391 | ||
| 392 | // get the IP address |
|
| 393 | $ipAddress = $host->determineIpAddress($vmDetails, new VagrantVm($this->st)); |
|
| 394 | ||
| 395 | // all done |
|
| 396 | $log->endAction("IP address is '{$ipAddress}'"); |
|
| 397 | return $ipAddress; |
|
| 398 | } |
|
| 399 | ||
| 400 | /** |
|
| 401 | * |
|
| @@ 405-419 (lines=15) @@ | ||
| 402 | * @param stdClass $vmDetails |
|
| 403 | * @return string |
|
| 404 | */ |
|
| 405 | public function determineHostname($vmDetails) |
|
| 406 | { |
|
| 407 | // what are we doing? |
|
| 408 | $log = Log::usingLog()->startAction("determine hostname of Vagrant VM '{$vmDetails->hostId}'"); |
|
| 409 | ||
| 410 | // create an adapter to talk to the host operating system |
|
| 411 | $host = OsLib::getHostAdapter($this->st, $vmDetails->osName); |
|
| 412 | ||
| 413 | // get the hostname |
|
| 414 | $hostname = $host->determineHostname($vmDetails, new VagrantVm($this->st)); |
|
| 415 | ||
| 416 | // all done |
|
| 417 | $log->endAction("hostname is '{$hostname}'"); |
|
| 418 | return $hostname; |
|
| 419 | } |
|
| 420 | ||
| 421 | /** |
|
| 422 | * Set the VAGRANT_BRIDGE_ADAPTER and VIRTUALBOX_BRIDGE_ADAPTER |
|