From 5bf34797134655c3fdc508aa7678394b6b31935e Mon Sep 17 00:00:00 2001 From: Roel Dijkstra Date: Fri, 27 Oct 2023 12:21:43 +0000 Subject: [PATCH] Add Action for Operating System Install call --- CHANGELOG.md | 5 +++++ src/Repository/Vps/OperatingSystemRepository.php | 5 +++-- src/TransipAPI.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8463aef..7f73521 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ CHANGELOG ========= + +6.49.0 +--- +* Added ability to fetch Action from Operating Install + 6.48.9 --- * Added `retentionType` backups property and getter diff --git a/src/Repository/Vps/OperatingSystemRepository.php b/src/Repository/Vps/OperatingSystemRepository.php index e963a5b..1500a8a 100644 --- a/src/Repository/Vps/OperatingSystemRepository.php +++ b/src/Repository/Vps/OperatingSystemRepository.php @@ -2,6 +2,7 @@ namespace Transip\Api\Library\Repository\Vps; +use Psr\Http\Message\ResponseInterface; use Transip\Api\Library\Entity\Vps\OperatingSystem; use Transip\Api\Library\Repository\ApiRepository; use Transip\Api\Library\Repository\VpsRepository; @@ -70,7 +71,7 @@ public function install( string $username = '', array $sshKeys = [], array $licenses = [] - ): void { + ): ResponseInterface { $parameters['operatingSystemName'] = $operatingSystemName; $parameters['hostname'] = $hostname; $parameters['base64InstallText'] = $base64InstallText; @@ -78,6 +79,6 @@ public function install( $parameters['username'] = $username; $parameters['sshKeys'] = $sshKeys; $parameters['licenses'] = $licenses; - $this->httpClient->post($this->getResourceUrl($vpsName), $parameters); + return $this->httpClient->post($this->getResourceUrl($vpsName), $parameters); } } diff --git a/src/TransipAPI.php b/src/TransipAPI.php index e9adfb1..caf7be1 100644 --- a/src/TransipAPI.php +++ b/src/TransipAPI.php @@ -100,7 +100,7 @@ class TransipAPI { public const TRANSIP_API_ENDPOINT = "https://api.transip.nl/v6"; - public const TRANSIP_API_LIBRARY_VERSION = "6.48.9"; + public const TRANSIP_API_LIBRARY_VERSION = "6.49.0"; public const TRANSIP_API_DEMO_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImN3MiFSbDU2eDNoUnkjelM4YmdOIn0.eyJpc3MiOiJhcGkudHJhbnNpcC5ubCIsImF1ZCI6ImFwaS50cmFuc2lwLm5sIiwianRpIjoiY3cyIVJsNTZ4M2hSeSN6UzhiZ04iLCJpYXQiOjE1ODIyMDE1NTAsIm5iZiI6MTU4MjIwMTU1MCwiZXhwIjoyMTE4NzQ1NTUwLCJjaWQiOiI2MDQ0OSIsInJvIjpmYWxzZSwiZ2siOmZhbHNlLCJrdiI6dHJ1ZX0.fYBWV4O5WPXxGuWG-vcrFWqmRHBm9yp0PHiYh_oAWxWxCaZX2Rf6WJfc13AxEeZ67-lY0TA2kSaOCp0PggBb_MGj73t4cH8gdwDJzANVxkiPL1Saqiw2NgZ3IHASJnisUWNnZp8HnrhLLe5ficvb1D9WOUOItmFC2ZgfGObNhlL2y-AMNLT4X7oNgrNTGm-mespo0jD_qH9dK5_evSzS3K8o03gu6p19jxfsnIh8TIVRvNdluYC2wo4qDl5EW5BEZ8OSuJ121ncOT1oRpzXB0cVZ9e5_UVAEr9X3f26_Eomg52-PjrgcRJ_jPIUYbrlo06KjjX2h0fzMr21ZE023Gw"; /**