pyjen.plugins.nestedview module¶
Primitives for working with Jenkins views of type ‘NestedView’
- class pyjen.plugins.nestedview.NestedView(controller, jenkins_master)[source]¶
Bases: pyjen.view.View
Interface to Jenkins views of type “NestedView”
Views of this type contain other views as sub-views
To instantiate an instance of this class using auto-generated configuration parameters, see the easy_connect() method
Parameters: - controller (DataRequester) – class capable of handling common HTTP IO requests sent by this object to the Jenkins REST API
- jenkins_master (Jenkins) – Reference to Jenkins object associated with the master instance managing this job
- all_views[source]¶
Gets all views contained within this view and it’s children, recursively
Returns: list of all views contained within this view and it’s children, recursively Return type: list
- clone_subview(existing_view, new_view_name)[source]¶
Creates a clone of an existing view under this nested view
Parameters: Returns: reference to new PyJen view object
Return type:
- create_view(view_name, view_type)[source]¶
Creates a new sub-view within this nested view
Parameters:
- find_view(view_name)[source]¶
Attempts to locate a sub-view under this nested view with the given name
Parameters: view_name (str) – the name of the sub-view to locate Returns: Reference to View object for the view with the given name, or None if no view with that name exists Return type: Object derived from View
- has_view(view_name)[source]¶
Checks to see whether a view with the given name already exists under this view
Parameters: view_name (str) – the name of the view to look for Returns: True if a view with that name already exists, otherwise false Return type: bool
- move_view(existing_view)[source]¶
Moves an existing view to a new location
NOTE: The original view object becomes obsolete after executing this operation
Parameters: existing_view (View) – Instance of a PyJen view to be moved Returns: reference to new, relocated view object Return type: View
- type = 'hudson.plugins.nested__view.NestedView'¶
- views[source]¶
Gets all views contained within this view
To get a recursive list of all child views and their children use all_views().
Returns: list of all views contained within this view Return type: list