We want the canonical data files to have repeated information to make
it easy for human readers to understand the content, so do not emit
aliases to blocks of repeated data.
Change-Id: Ib6bf3f3683fae2edb94910bea86971e591b5b87c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The default is to use true/false but most of our data is already yes/no.
Change-Id: I9b6573e8e5a7c4acd0d33a9cf0790b58d4e60662
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Update the reformatter to always put quotes around strings that look
like they are numbers. A value like x.y.z is clearly not a float so
the library does the right thing but x.y seems like a float so it
leaves the quotes off, then later when we parse the file again we get
a number not a string.
Change-Id: I6126f59d09d169a2dde1cdffcecd15f8c65c2e65
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I83997d0c43826c9d5b06a72d93365e8e9b4587af
When a string is found (and about to be output) that
already has newlines in it (say it was read in previously)
we shouldn't be trying to reformat that string when
writing it back out; so avoid doing this by searching for
existing newlines and not re-wrapping things when they
already exist.
Change-Id: Ic310677314172f46b360c90197539993eb5bcc99
Do note this will lose comments, if pyyaml ever supports
not losing those then this can avoid losing those.
Change-Id: I4b26362f7cab42eb40804751c86d9145490c78d9