pyjen.view module
Primitives for interacting with Jenkins views
- class pyjen.view.View(api)[source]
Bases:
object
generic Jenkins views providing interfaces common to all view types
- Parameters
api (JenkinsAPI) – Pre-initialized connection to the Jenkins REST API
- property config_xml
the raw XML configuration for the view
Allows callers to manipulate the raw view configuration file as desired.
Warning
For advanced use only.
- Type
- classmethod get_supported_plugins()[source]
list: list of PyJen plugin classes that may be used to instantiate views on this Jenkins instance
- static instantiate(json_data, rest_api)[source]
Factory method for finding the appropriate PyJen view object based on data loaded from the Jenkins REST API
- Parameters
json_data (dict) – data loaded from the Jenkins REST API summarizing the view to be instantiated
rest_api (JenkinsAPI) – PyJen REST API configured for use by the parent container. Will be used to instantiate the PyJen view that is returned.
- Returns
PyJen view object wrapping the REST API for the given view
- Return type
- property jenkins_plugin_name
Extracts the name of the Jenkins plugin associated with this View
The data returned by this helper property is extracted from the config XML that defines this job.
- Type
- property jobs
list of 0 or more jobs associated with this view
Views are simply filters to help organize jobs on the Jenkins dashboard. This method returns the set of jobs that meet the requirements of the filter associated with this view.