View and Views¶
Views¶
Module for jenkinsapi Views
- class jenkinsapi.views.Views(jenkins)[source]¶
Bases:
object
An abstraction on a Jenkins object’s views
- CATEGORIZED_VIEW = 'org.jenkinsci.plugins.categorizedview.CategorizedJobsView'¶
- DASHBOARD_VIEW = 'hudson.plugins.view.dashboard.Dashboard'¶
- LIST_VIEW = 'hudson.model.ListView'¶
- MY_VIEW = 'hudson.model.MyView'¶
- NESTED_VIEW = 'hudson.plugins.nested_view.NestedView'¶
- PIPELINE_VIEW = 'au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView'¶
- create(view_name, view_type='hudson.model.ListView', config=None)[source]¶
Create a view :param view_name: name of new view, str :param view_type: type of the view, one of the constants in Views, str :param config: XML configuration of the new view :return: new View obj or None if view was not created
View¶
Module for jenkinsapi views
- class jenkinsapi.view.View(url: str, name: str, jenkins_obj: Jenkins)[source]¶
Bases:
JenkinsBase
View class
- add_job(job_name: str, job=None) bool [source]¶
Add job to a view
- Parameters:
job_name – name of the job to be added
job – Job object to be added
- Returns:
True if job has been added, False if job already exists or job not known to Jenkins
- remove_job(job_name: str) bool [source]¶
Remove job from a view
- Parameters:
job_name – name of the job to be removed
- Returns:
True if job has been removed, False if job not assigned to this view
- property views¶