[EDP] Remove extra newlines following elements read from base workflow.xml

Bug #1265916 reported by Trevor McKay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Low
Trevor McKay

Bug Description

The base workflow is read from service/edp/resources/workflow.xml. This file contains (nicely formatted) xml and is used to create a base document that is extended when a workflow is generated for a job execution.

When extensions are added to the document, new elements are added without any newlines. Newlines are inserted later by doc.toprettyxml.

However, the formatting for the base elements is preserved and so doc.toprettyxml injects extra newlines for those original elements. The code that reads in the base document needs to remove the extra whitespace as the document is read from the resource file, so that the reource file can remain in human readable form but the extra newlines are not present when the extended documents are written out.

Trevor McKay (tmckay)
Changed in savanna:
assignee: nobody → Trevor McKay (tmckay)
Changed in savanna:
status: New → In Progress
Trevor McKay (tmckay)
Changed in savanna:
importance: Undecided → Low
Changed in savanna:
milestone: none → icehouse-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to savanna (master)

Reviewed: https://review.openstack.org/64857
Committed: https://git.openstack.org/cgit/openstack/savanna/commit/?id=eee7f402fe91db2b8ccb824e94347872f27fb518
Submitter: Jenkins
Branch: master

commit eee7f402fe91db2b8ccb824e94347872f27fb518
Author: Trevor McKay <email address hidden>
Date: Fri Jan 3 11:38:58 2014 -0500

    Eliminate extra newlines in generated workflow.xml

    When the base workflow in service/edp/resources/workflow.xml is read
    newlines are preserved in the text elements. Additional elements are
    added without newlines and newlines are inserted when the text is
    generated. This causes extra newlines after the original elements.

    This change strips whitespace from the beginning and end of each
    line in the base workflow file when it is first read, which eliminates
    the extra newlines in the text elements.

    Closes-Bug: #1265916

    Change-Id: Ibf75cdf54c3218df9d0085005624b3ee8d4c0ea5

Changed in savanna:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in savanna:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in sahara:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.