From ff9e6f022528fad5be9b3a8f2d57b4a1af7fa6c5 Mon Sep 17 00:00:00 2001 From: malle-pietje Date: Thu, 17 Oct 2024 16:41:45 +0200 Subject: [PATCH] merged #244 for a small change to the `start_rolling_upgrade()` method, contributed by @Jacobtims minor additional change to allow changes to the payload of the `start_rolling_upgrade()` method --- src/Client.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Client.php b/src/Client.php index c3313eb..61d8ed2 100755 --- a/src/Client.php +++ b/src/Client.php @@ -3107,13 +3107,14 @@ class Client /** * Start rolling upgrade. * - * @note updates all UniFi devices to the latest firmware known to the controller in a + * @note upgrades all UniFi devices to the latest firmware known to the controller in a * staggered/rolling fashion + * @param array $payload optional, array of device types to upgrade, default is all device types * @return bool true upon success */ - public function start_rolling_upgrade(): bool + public function start_rolling_upgrade(array $payload = ['uap', 'usw', 'ugw', 'uxg']): bool { - return $this->fetch_results_boolean('/api/s/' . $this->site . '/cmd/devmgr/set-rollupgrade', ['uap', 'usw', 'ugw', 'uxg']); + return $this->fetch_results_boolean('/api/s/' . $this->site . '/cmd/devmgr/set-rollupgrade', $payload); } /**