From: Ondrej Lichtner <olichtne(a)redhat.com>
This is now implemented in the PerfRepo master branch and will be very
usefull when used from the CLI application.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/PerfRepo.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lnst/Controller/PerfRepo.py b/lnst/Controller/PerfRepo.py
index 5c3b905..8ca47fb 100644
--- a/lnst/Controller/PerfRepo.py
+++ b/lnst/Controller/PerfRepo.py
@@ -867,6 +867,18 @@ class PerfRepoRESTAPI(object):
report.set_id(new_id)
return report
+ def report_update(self, report):
+ post_url = self._url + '/rest/report/update/%s' % report.get_id()
+
+ report.set_user(self._user)
+
+ response = self._session.post(post_url, data=report.to_xml_string())
+ if response.status_code != 201:
+ logging.debug(response.text)
+ return None
+ else:
+ return report
+
def report_delete(self, report_id):
#TODO not needed yet and therefore not tested
delete_url = self._url + '/rest/report/delete'
--
2.5.2