projects
/
tools
/
python-jenkinsapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70dcaf1
)
add get_view_by_url for myview or Nested View,what ever
author
William Zhang
<jollychang@gmail.com>
Thu, 17 May 2012 03:23:41 +0000
(11:23 +0800)
committer
William Zhang
<jollychang@gmail.com>
Thu, 17 May 2012 03:23:41 +0000
(11:23 +0800)
jenkinsapi/jenkins.py
patch
|
blob
|
history
diff --git
a/jenkinsapi/jenkins.py
b/jenkinsapi/jenkins.py
index ed4e0de296339943f354d18d450c46d51328a608..6179f0e37c666560d85e234b431195b74c126927 100644
(file)
--- a/
jenkinsapi/jenkins.py
+++ b/
jenkinsapi/jenkins.py
@@
-155,6
+155,12
@@
class Jenkins(JenkinsBase):
view_api_url = self.python_api_url(view_url)
return View(view_api_url , str_view_name, jenkins_obj=self)
+ def get_view_by_url(self, str_url):
+ view_url = str_url
+ view_api_url = "%s/api/python/" % str_url
+ str_view_name = view_url.replace(self.baseurl, '')
+ return View(view_api_url, str_view_name, jenkins_obj=self)
+
def __getitem__(self, jobname):
"""
Get a job by name