template validation command displays additional blank line for description

Bug #1571971 reported by Kanagaraj Manickam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
New
Low
Unassigned

Bug Description

when the multi line char '> is removed from the description part as below, it displays properly.
template
---------------------
heat_template_version: 2016-04-08

description: > <<--- multi line char
  First heat hot template used to demonstrate the hot template sections.

output
----------
manickan@mrkanag-os:~/workspace/hot-tutorials$ openstack orchestration template validate -t hello-world-2.yaml
ERROR: The Resource Type (OS::Heat::RandonString) could not be found.
manickan@mrkanag-os:~/workspace/hot-tutorials$ openstack orchestration template validate -t hello-world-2.yaml
Description: 'First heat hot template used to demonstrate the hot template sections.
        <<<< --- addition line is reported here --->>>
  '
Parameters: {}

But when the multi line char '> is removed from the description part as below, it displays properly.
template
---------------------
heat_template_version: 2016-04-08

description: <<--- no multi line char
  First heat hot template used to demonstrate the hot template sections.

output
----------
manickan@mrkanag-os:~/workspace/hot-tutorials$ openstack orchestration template validate -t hello-world-2.yaml
Description: First heat hot template used to demonstrate the hot template sections.
Parameters: {}
manickan@mrkanag-os:~/workspace/hot-tutorials$

Thomas Herve (therve)
affects: heat → python-heatclient
Di XiaoLi (dixiaoli)
Changed in python-heatclient:
assignee: nobody → Di XiaoLi (dixiaobj)
Revision history for this message
Di XiaoLi (dixiaoli) wrote :

I can not reproduce the issue described above.

Changed in python-heatclient:
assignee: Di XiaoLi (dixiaobj) → nobody
Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

It looks like a pyyaml bug.

With semicolon only:

> yaml.load('description: First heat hot template used to demonstrate the hot template sections.\n\n\n\nfoo: bar'
{'description': 'First heat hot template used to demonstrate the hot template sections.',
 'foo': 'bar'}

With multi line char ">":

> yaml.load('description: >\n First heat hot template used to demonstrate the hot template sections.\n\n\n\nfoo: bar')
{'description': 'First heat hot template used to demonstrate the hot template sections.\n',
 'foo': 'bar'}

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.