Skip to content

Commit

Permalink
merged #244 for a small change to the start_rolling_upgrade() metho…
Browse files Browse the repository at this point in the history
…d, contributed by @Jacobtims

minor additional change to allow changes to the payload of the `start_rolling_upgrade()` method
  • Loading branch information
malle-pietje committed Oct 17, 2024
1 parent 00a637d commit ff9e6f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -3107,13 +3107,14 @@ public function upgrade_device_external(string $firmware_url, $macs): bool
/**
* 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);
}

/**
Expand Down

0 comments on commit ff9e6f0

Please sign in to comment.