So now it's possible to use ```'jobname' in jenkins``` syntax instead of
```jenkins.has_job('jobname')```.
:param jobname: string
:return: boolean
"""
- return jobname in self.get_jobs_list()
+ return jobname in self
def create_job(self, jobname, config):
"""
return Job(preferred_url, name, jenkins_obj=self)
raise UnknownJob(jobname)
+ def __contains__(self, jobname):
+ """
+ Does a job by the name specified exist
+ :param jobname: string
+ :return: boolean
+ """
+ return jobname in self.get_jobs_list()
+
def get_node_dict(self):
"""Get registered slave nodes on this instance"""
url = self.python_api_url(self.get_node_url())