summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/modules/view_list.py
diff options
context:
space:
mode:
authorThanh Ha <thanh.ha@linuxfoundation.org>2018-01-17 22:25:14 -0500
committerThanh Ha <thanh.ha@linuxfoundation.org>2018-01-17 22:25:42 -0500
commit06bc48c0fdaff03036e0854c0583ae6bd8d3d683 (patch)
tree40a867c4474707ad6f85587e0522ba8240b2ebce /jenkins_jobs/modules/view_list.py
parent705051658fabb8c0e92cd8dbad87015dfdda7f9f (diff)
downloadpython-jenkins-job-builder-06bc48c0fdaff03036e0854c0583ae6bd8d3d683.tar.gz
python-jenkins-job-builder-06bc48c0fdaff03036e0854c0583ae6bd8d3d683.tar.xz
python-jenkins-job-builder-06bc48c0fdaff03036e0854c0583ae6bd8d3d683.zip
Fix view definition documentation
View documentation was not properly being generated and linked in the index. Let's add that in. Change-Id: I6197dbecc89ddcf8c6f6b0e6a3d4c517224dc77b Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Diffstat (limited to 'jenkins_jobs/modules/view_list.py')
-rw-r--r--jenkins_jobs/modules/view_list.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/jenkins_jobs/modules/view_list.py b/jenkins_jobs/modules/view_list.py
index c4ab81de..098e5362 100644
--- a/jenkins_jobs/modules/view_list.py
+++ b/jenkins_jobs/modules/view_list.py
@@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import xml.etree.ElementTree as XML
-import jenkins_jobs.modules.base
-
-from jenkins_jobs.modules.helpers import convert_mapping_to_xml
-
"""
The view list module handles creating Jenkins List views.
@@ -38,8 +33,24 @@ to the :ref:`View-list` definition.
* **recurse** (`bool`): Recurse in subfolders.(default false)
* **status-filter** (`bool`): Filter job list by enabled/disabled
status. (optional)
+
+Example:
+
+ .. literalinclude::
+ /../../tests/views/fixtures/view_list001.yaml
+
+Example:
+
+ .. literalinclude::
+ /../../tests/views/fixtures/view_list002.yaml
"""
+import xml.etree.ElementTree as XML
+import jenkins_jobs.modules.base
+
+from jenkins_jobs.modules.helpers import convert_mapping_to_xml
+
+
COLUMN_DICT = {
'status': 'hudson.views.StatusColumn',
'weather': 'hudson.views.WeatherColumn',