From c1ae641b21aedabfd37cdf95c780175c1d9f28bb Mon Sep 17 00:00:00 2001 From: Andrii Hazhur Date: Fri, 11 Nov 2022 11:53:03 +0200 Subject: [PATCH 1/5] feat: added new array transform path --- src/Transform/SoapTransform.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Transform/SoapTransform.php b/src/Transform/SoapTransform.php index 28eb1d6..fa45524 100644 --- a/src/Transform/SoapTransform.php +++ b/src/Transform/SoapTransform.php @@ -66,8 +66,6 @@ public function arrayToSoapVar(array $array): array $data[] = new SoapVar($this->arrayToSoapVar($childItem), SOAP_ENC_OBJECT, $typeName, null, $key); } - // unset($array[$key]); - $deepArraySet = true; } @@ -111,6 +109,7 @@ public function transformToArrayValues(stdClass $object, int $startIndex = 0, ?i ['layoutEx', 'snapshot'], ['layoutEx', 'snapshot', 'disk'], ['layoutEx', 'snapshot', 'disk', 'chain'], + ['layoutEx', 'snapshot', 'disk', 'chain', 'fileKey'], ['snapshot', 'rootSnapshotList'], ['snapshot', 'rootSnapshotList', 'childSnapshotList'], ]; From 056e802d7e48e99eb7d2a0c99d0854216f3b0d68 Mon Sep 17 00:00:00 2001 From: Andrii Hazhur Date: Wed, 16 Nov 2022 12:56:07 +0200 Subject: [PATCH 2/5] fix: fixed bug with cache update --- src/VmWareClientInit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VmWareClientInit.php b/src/VmWareClientInit.php index 8cd6cbd..ee56b56 100755 --- a/src/VmWareClientInit.php +++ b/src/VmWareClientInit.php @@ -86,7 +86,7 @@ private function createRestSession(): void $apiSessionId = $apiSessionId->value; } - Cache::add("vcenter-rest-session-$this->ip", [ + Cache::put("vcenter-rest-session-$this->ip", [ 'api_session_id' => $apiSessionId, 'expired_at' => Carbon::now()->addSeconds(config('vmware-php-client.session_ttl') * 60 - 30), ]); @@ -184,7 +184,7 @@ private function createSoapSession(): void $this->soapClient->__setCookie('vmware_soap_session', $soapSessionToken); } - Cache::add("vcenter-soap-session-$this->ip", [ + Cache::put("vcenter-soap-session-$this->ip", [ 'vmware_soap_session' => $soapSessionToken, 'expired_at' => Carbon::now()->addSeconds(config('vmware-php-client.session_ttl') * 60 - 30), ]); From a2082db54ec7e64feabf5ed566b8ac863df2fa4b Mon Sep 17 00:00:00 2001 From: Andrii Hazhur Date: Wed, 23 Nov 2022 11:55:58 +0200 Subject: [PATCH 3/5] fix: added parameter to block storage creation --- src/Traits/Soap/SoapStorageApis.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Traits/Soap/SoapStorageApis.php b/src/Traits/Soap/SoapStorageApis.php index 0e91a57..481b31a 100644 --- a/src/Traits/Soap/SoapStorageApis.php +++ b/src/Traits/Soap/SoapStorageApis.php @@ -64,6 +64,7 @@ public function createVStorage(string $name, int $capacityInMB, string $datastor 'type' => 'Datastore', '_' => $datastore, ], + 'provisioningType' => 'thin' ]), 'capacityInMB' => $capacityInMB, ], From c707f6e338a866e793569f4c914052a25af3671b Mon Sep 17 00:00:00 2001 From: gazhur94 Date: Wed, 23 Nov 2022 09:56:27 +0000 Subject: [PATCH 4/5] Fix styling --- src/Traits/Soap/SoapStorageApis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Soap/SoapStorageApis.php b/src/Traits/Soap/SoapStorageApis.php index 481b31a..d45990d 100644 --- a/src/Traits/Soap/SoapStorageApis.php +++ b/src/Traits/Soap/SoapStorageApis.php @@ -64,7 +64,7 @@ public function createVStorage(string $name, int $capacityInMB, string $datastor 'type' => 'Datastore', '_' => $datastore, ], - 'provisioningType' => 'thin' + 'provisioningType' => 'thin', ]), 'capacityInMB' => $capacityInMB, ], From 08c73de62816ca9a3f4e2661405ed8521c913bb6 Mon Sep 17 00:00:00 2001 From: Andrii Hazhur Date: Thu, 24 Nov 2022 16:50:19 +0200 Subject: [PATCH 5/5] fix: fixed list process in guest getter --- src/Traits/Soap/SoapGuestApis.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/Soap/SoapGuestApis.php b/src/Traits/Soap/SoapGuestApis.php index 7443bf1..cd43d62 100644 --- a/src/Traits/Soap/SoapGuestApis.php +++ b/src/Traits/Soap/SoapGuestApis.php @@ -306,8 +306,8 @@ public function getListProcessInGuest( ) { $body = [ '_this' => [ - 'type' => 'GuestFileManager', - '_' => 'guestOperationsFileManager', + 'type' => 'GuestProcessManager', + '_' => 'guestOperationsProcessManager', ], 'vm' => [ 'type' => 'VirtualMachine',