added methods/functions start_rolling_upgrade() and cancel_rolling_upgrade()
This commit is contained in:
@@ -120,6 +120,8 @@ The class currently supports the following functions/methods to get/post/put/del
|
||||
- unset_locate_ap() (deprecated but still available as alias)
|
||||
- upgrade_device()
|
||||
- upgrade_device_external()
|
||||
- start_rolling_upgrade()
|
||||
- cancel_rolling_upgrade()
|
||||
|
||||
Internal functions, getters/setters:
|
||||
|
||||
|
||||
@@ -1060,7 +1060,8 @@ class Client
|
||||
* is true.
|
||||
*
|
||||
* NOTES:
|
||||
* after issuing a valid request, an invite will be sent to the email address provided
|
||||
* - after issuing a valid request, an invite will be sent to the email address provided
|
||||
* - issuing this command against an existing admin will trigger a "re-invite"
|
||||
*/
|
||||
public function invite_admin($name, $email, $enable_sso = true, $readonly = false, $device_adopt = false, $device_restart = false)
|
||||
{
|
||||
@@ -1915,24 +1916,6 @@ class Client
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade a device to the latest firmware
|
||||
* ---------------------------------------
|
||||
* return true on success
|
||||
* required parameter <device_mac> = MAC address of the device to upgrade
|
||||
*
|
||||
* NOTES:
|
||||
* - updates the device to the latest firmware known to the controller
|
||||
*/
|
||||
public function upgrade_device($device_mac)
|
||||
{
|
||||
if (!$this->is_loggedin) return false;
|
||||
$json = ['mac' => $device_mac];
|
||||
$json = json_encode($json);
|
||||
$response = $this->exec_curl('/api/s/'.$this->site.'/cmd/devmgr/upgrade', 'json='.$json);
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade a device to a specific firmware file
|
||||
* --------------------------------------------
|
||||
@@ -1953,6 +1936,38 @@ class Client
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start rolling upgrade
|
||||
* ---------------------
|
||||
* return true on success
|
||||
*
|
||||
* NOTES:
|
||||
* - updates all access points to the latest firmware known to the controller in a
|
||||
* staggered/rolling fashion
|
||||
*/
|
||||
public function start_rolling_upgrade()
|
||||
{
|
||||
if (!$this->is_loggedin) return false;
|
||||
$json = ['cmd' => 'set-rollupgrade'];
|
||||
$json = json_encode($json);
|
||||
$response = $this->exec_curl('/api/s/'.$this->site.'/cmd/devmgr', 'json='.$json);
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel rolling upgrade
|
||||
* ---------------------
|
||||
* return true on success
|
||||
*/
|
||||
public function cancel_rolling_upgrade()
|
||||
{
|
||||
if (!$this->is_loggedin) return false;
|
||||
$json = ['cmd' => 'unset-rollupgrade'];
|
||||
$json = json_encode($json);
|
||||
$response = $this->exec_curl('/api/s/'.$this->site.'/cmd/devmgr', 'json='.$json);
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Power-cycle the PoE output of a switch port
|
||||
* -------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user