pyjen.plugins.nestedview module¶
Primitives for working with Jenkins views of type ‘NestedView’
-
class
pyjen.plugins.nestedview.
NestedView
(api)[source]¶ Bases:
pyjen.view.View
all Jenkins related ‘view’ information for views of type NestedView
Instances of this class are typically instantiated directly or indirectly through
pyjen.View.create()
-
all_views
¶ Gets all views contained within this view, recursively
- Returns
list of all views contained within this view and it’s children, recursively
- Return type
list
ofpyjen.view.View
-
create_view
(view_name, view_class)[source]¶ Creates a new sub-view within this nested view
- Parameters
view_name (str) – name of the new sub-view to create
view_class – PyJen plugin class associated with the type of view to be created
- Returns
reference to the newly created view
- Return type
-
find_all_views
(view_name)[source]¶ Attempts to locate a sub-view under this nested view by name, recursively
NOTE: Seeing as how view names need only be unique within a single parent view, there may be multiple nested views with the same name. To reflect this requirement this method will return a list of views nested within this one that have the name given. If the list is empty then there are no matches for the given name anywhere in this view’s sub-tree.
- Parameters
view_name (str) – the name of the sub-view to locate
- Returns
List of 0 or more views with the given name
- Return type
list
ofpyjen.view.View
-
find_view
(view_name)[source]¶ Attempts to locate a sub-view under this nested view by name
NOTE: Seeing as how view names need only be unique within a single parent view, there may be multiple nested views with the same name. To reflect this requirement this method will return a list of views nested within this one that have the name given. If the list is empty then there are no matches for the given name anywhere in this view’s sub-tree.
- Parameters
view_name (str) – the name of the sub-view to locate
- Returns
List of 0 or more views with the given name
- Return type
list
ofpyjen.view.View
-
static
get_jenkins_plugin_name
()[source]¶ Gets the name of the Jenkins plugin associated with this PyJen plugin
This static method is used by the PyJen plugin API to associate this class with a specific Jenkins plugin, as it is encoded in the config.xml
- Return type
str
-
views
¶ Gets all views contained within this view, non-recursively
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
ofpyjen.view.View
-
-
pyjen.plugins.nestedview.
PluginClass
¶ alias of
pyjen.plugins.nestedview.NestedView