-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for remote
barman config-update
execution (#89)
So far we had only operations related with Barman servers in the API: * `RecoveryOperation`: to perform a `barman recover` of a Barman server * `ConfigSwitchOperation`: to perform a `barman config-switch` to a Barman server However, we needed to add an operation to the API which is performed at the Barman instance level (global), not to a specific Barman server: the `ConfigUpdateOperation`. With that in mind this PR changes the classes below so we will be able to create Barman instance operations: * `OperationServer`: turn `server_name` argument optional. When it is `None`, that is considered an instance operation. Thus, the `job` and `output` files will be written under the Barman home in that case instead of under a Barman server directory * `Operation`: turn `server_name` argument optional, so it creates `OperationServer` accordingly We also added a couple new endpoints to the API, so we can handle instance operations: * `/operations/<operation_id>`: used to get the status of an instance operation -- similar to what we have for server operations through `/servers/<server_name>/operations/<operation_id>`; * `/operations`: used to get a list of or instance operations, or to create a new instance operation -- similar to what we have for server operations through `/servers/<server_name>/operations`. The `BarmanConfigUpdate` operation has been created and uses the above API endpoints. Unit tests changed accordingly, so we check both server and instance operations, including the introduced operation. References: BAR-126.
- Loading branch information
1 parent
896957b
commit 510a2d7
Showing
8 changed files
with
686 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.