From 1740fc87d3f7762401987c3d180b88526c932c0a Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Sat, 10 Jan 2015 01:21:56 +0200 Subject: [PATCH] buildservice: Add put_source_path API Added new API put_source_path to put content using source OBS API. This API will be used in job_sync_obs. Change-Id: Ia4c7246b0f1e93c729bf9ced2c81aedbd4d5aa1e Signed-off-by: Ed Bartosh --- common/buildservice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/buildservice.py b/common/buildservice.py index d9e9c41..906b48f 100644 --- a/common/buildservice.py +++ b/common/buildservice.py @@ -99,6 +99,12 @@ class BuildService(OSC): content += buf return content + def put_source_path(self, path, data, query=None): + """Put content to remote project/package/file path.""" + url = core.makeurl(self.apiurl, ['source', core.pathname2url(path)], + query=query) + self.core_http(core.http_PUT, url, data=data) + def get_sr_str(self, reqid): """Get the SR xml string by reqid """ -- 2.7.4