Skip to content

Commit 9b522be

Browse files
committed
Testing retrieve
1 parent a49a903 commit 9b522be

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/Compute/v2/Api.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,4 +663,13 @@ public function getHypervisorsDetail(): array
663663
$definition['path'] .= '/detail';
664664
return $definition;
665665
}
666+
667+
public function getHypervisor(): array
668+
{
669+
return [
670+
'method' => 'GET',
671+
'path' => 'os-hypervisor/{id}',
672+
'params' => ['id' => $this->params->urlId('hypervisor')]
673+
];
674+
}
666675
}

src/Compute/v2/Models/Hypervisor.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,13 @@ class Hypervisor extends OperatorResource implements
6767
protected $resourceKey = 'hypervisor';
6868
protected $resourcesKey = 'hypervisors';
6969
protected $markerKey = 'id';
70+
71+
/**
72+
* {@inheritDoc}
73+
*/
74+
public function retrieve()
75+
{
76+
$response = $this->execute($this->api->getHypervisor(), $this->getAttrs(['id']));
77+
$this->populateFromResponse($response);
78+
}
7079
}

0 commit comments

Comments
 (0)