| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | class Tools extends InitClass |
||
| 15 | { |
||
| 16 | use MOID; |
||
|
|
|||
| 17 | |||
| 18 | /** |
||
| 19 | * Get the properties of VMware Tools. |
||
| 20 | */ |
||
| 21 | public function tools($moid=null){ |
||
| 22 | return ApiResponse::BodyResponse($this->HttpClient->get("vcenter/vm/{$this->getMoid($moid)}/tools")); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Update the properties of VMware Tools. |
||
| 27 | */ |
||
| 28 | public function updateTools(array $body,$moid=null){ |
||
| 29 | return !ApiResponse::HasError($this->HttpClient->patch("vcenter/vm/{$this->getMoid($moid)}/tools",[ |
||
| 30 | RequestOptions::JSON=>$body |
||
| 31 | ])); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Begins the Tools upgrade process. To monitor the status of the Tools upgrade, clients should check the Tools status by calling Tools.get and examining Tools.Info.version-status and Tools.Info.run-state. |
||
| 36 | */ |
||
| 37 | public function upgradeTools($body, $moid=null){ |
||
| 43 | ])); |
||
| 44 | } |
||
| 45 | } |