From 97db41d762fa3ffe9d89a1a3e84910e9b741a02d Mon Sep 17 00:00:00 2001 From: Artur Zdolinski Date: Mon, 13 Mar 2023 20:19:59 +0100 Subject: [PATCH] Add Revert option As we have 'commit' option/ it would be nice to have also 'revert' option. --- aos/blueprint.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/aos/blueprint.py b/aos/blueprint.py index d367f48..7ad1bc9 100644 --- a/aos/blueprint.py +++ b/aos/blueprint.py @@ -2270,3 +2270,19 @@ def get_node_relationships( } return self.rest.json_resp_get(url, params=params)['relationships'] + + def revert(self, bp_id): + """ + Revert changes in Staged in a given blueprint. + + Parameters + ---------- + bp_id + (str) - ID of AOS Blueprint + + Returns + ---------- + (str) empty str + """ + path = f'/api/blueprints/{bp_id}/revert' + return self.rest.json_resp_post(uri=path)