From 5646a95b27bb6c63c67ec75196e7b5fab2c2dd75 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Thu, 24 Mar 2016 15:53:30 +0100 Subject: [PATCH] Fix styling issues and prepare 5.3 release --- CHANGELOG.md | 4 +++ README.md | 2 +- doc/vps.md | 77 ++++++++++++++++++++++--------------------------- src/Api/Vps.php | 2 +- 4 files changed, 41 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca4904..df84b46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## 5.3 - 2016-03-24 +- New released feature in `5.3`: + - install an operating system unattended on a VPS + ## 5.2 - 2016-03-24 - Namespace change from `HiddeCo\TransIP` -> `TransIP` - Version number is from now on equal to the version number of the API (`5.2` for this release) diff --git a/README.md b/README.md index e2b7735..baf5f5f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ including extensive documentation. To use this library without running in to trouble you will need PHP 5.4+ or HHVM 3.6+ and Composer. 1. Get the latest version of TransIP by adding the following line to your `composer.json` file - `"hiddeco/transip": "5.2"` + `"hiddeco/transip": "5.3"` 2. Run `composer update` or `composer install` diff --git a/doc/vps.md b/doc/vps.md index 5ae6559..e746b63 100644 --- a/doc/vps.md +++ b/doc/vps.md @@ -175,48 +175,41 @@ $client->vps()->getOperatingSystems(); $client->vps()->installOperatingSystem('fooVps', 'ubuntu-14.04-transip', 'baymax.foo.com'); ```` -#### Install an operating system Unattended on a VPS. -````php -try { - $base64InstallText = base64_encode(' - ## Mirror settings - d-i mirror/country string manual - d-i mirror/http/hostname string mirror.transip.net - d-i mirror/http/directory string /debian/debian - - ## Automatically choose keymapping, since VNC client will translate to the clients one - d-i keymap select us - - ## Automatically select the networking interface - d-i netcfg/choose_interface select auto - - ## Install ACPId so the machine is responsive to Ctrl+Alt+Del etc - d-i pkgsel/include string acpid - - # Any hostname and domain names assigned from dhcp take precedence over - # values set here. However, setting the values still prevents the questions - # from being shown, even if values come from dhcp. - d-i netcfg/get_hostname string test-vps - d-i netcfg/get_domain string example.com - - # Controls whether or not the hardware clock is set to UTC. - d-i clock-setup/utc boolean true - - # You may set this to any valid setting for $TZ; see the contents of - # /usr/share/zoneinfo/ for valid values. - d-i time/zone string Europe/Amsterdam - - # Controls whether to use NTP to set the clock during the install - d-i clock-setup/ntp boolean true - '); - - $client->vps()->installOperatingSystemUnattended('fooVps','debian-8',$base64InstallText); - echo 'Operating system install in progress'; -} catch (SoapFault $f) { - // It is possible that an error occurs when connecting to the TransIP Soap API, - // those errors will be thrown as a SoapFault exception. - echo 'An error occurred: ' . $f->getMessage(), PHP_EOL; -} +#### Install an operating system unattended on a VPS. +````php +$base64InstallText = base64_encode(' + ## Mirror settings + d-i mirror/country string manual + d-i mirror/http/hostname string mirror.transip.net + d-i mirror/http/directory string /debian/debian + + ## Automatically choose key mapping, since VNC client will translate to the clients one + d-i keymap select us + + ## Automatically select the networking interface + d-i netcfg/choose_interface select auto + + ## Install ACPId so the machine is responsive to Ctrl+Alt+Del etc + d-i pkgsel/include string acpid + + # Any hostname and domain names assigned from dhcp take precedence over + # values set here. However, setting the values still prevents the questions + # from being shown, even if values come from dhcp. + d-i netcfg/get_hostname string test-vps + d-i netcfg/get_domain string example.com + + # Controls whether or not the hardware clock is set to UTC. + d-i clock-setup/utc boolean true + + # You may set this to any valid setting for $TZ; see the contents of + # /usr/share/zoneinfo/ for valid values. + d-i time/zone string Europe/Amsterdam + + # Controls whether to use NTP to set the clock during the install + d-i clock-setup/ntp boolean true +'); + +$client->vps()->installOperatingSystemUnattended('fooVps', 'debian-8', $base64InstallText); ```` #### Get IP addresses for a VPS. diff --git a/src/Api/Vps.php b/src/Api/Vps.php index fb704e3..71c9b96 100644 --- a/src/Api/Vps.php +++ b/src/Api/Vps.php @@ -450,7 +450,7 @@ public function installOperatingSystem($vpsName, $operatingSystemName, $hostname } /** - * Install an operating system on a vps with a unattended installfile. + * Install an operating system on a vps with a unattended install file. * * @param string $vpsName The name of the VPS * @param string $operatingSystemName The name of the operating to install