pyjen.plugins.sectionedview module

Primitives for working on Jenkins views of type ‘SectionedView’

pyjen.plugins.sectionedview.PluginClass

alias of pyjen.plugins.sectionedview.SectionedView

class pyjen.plugins.sectionedview.SectionedView(api)[source]

Bases: pyjen.view.View

Interface to Jenkins views of type “SectionedView”

Views of this type support groupings of jobs into ‘sections’ which each have their own filters

Parameters

api (JenkinsAPI) – Pre-initialized connection to the Jenkins REST API

add_section(section_type, name)[source]

Adds a new section to the sectioned view

Parameters
  • section_type (str) – name of class used to implement the new section to add

  • name (str) – descriptive text to appear in the title area of the section

static get_jenkins_plugin_name()[source]

str: 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

property sections

list of sections contained within this view

Type

list (XMLPlugin)

class pyjen.plugins.sectionedview.SectionedViewXML(api)[source]

Bases: pyjen.utils.viewxml.ViewXML

raw config.xml parser for a Jenkins view of type ‘Sectioned View’

Parameters

api (JenkinsAPI) – Rest API for the Jenkins XML configuration managed by this object

add_section(section_type, name)[source]

Adds a new section to the sectioned view

Parameters
  • section_type (str) – name of class used to implement the new section to add

  • name (str) – descriptive text to appear in the title area of the section

property sections

list of all ‘section’ objects contained in this view

Type

list (XMLPlugin)