diff options
author | Markus Roberts <Markus@reality.com> | 2009-10-19 09:25:55 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2009-10-19 20:20:31 -0700 |
commit | ae528f62e898fac37ea7d37c6fcff2e5c0954782 (patch) | |
tree | df1f2249434b194164d6645090dcad17e628daca /lib/puppet | |
parent | f59f8054dc0d1c86169b954fab96df650f38dd23 (diff) | |
download | puppet-ae528f62e898fac37ea7d37c6fcff2e5c0954782.tar.gz puppet-ae528f62e898fac37ea7d37c6fcff2e5c0954782.tar.xz puppet-ae528f62e898fac37ea7d37c6fcff2e5c0954782.zip |
Ticket #2734 PSON/JSON not serializing classes of a catalog
Now it does, there are tests to prove it, and the related tests
for tags and version have been strengthend.
Signed-off-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/resource/catalog.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb index 8ab788ed0..5bf9a8368 100644 --- a/lib/puppet/resource/catalog.rb +++ b/lib/puppet/resource/catalog.rb @@ -418,6 +418,10 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph end end + if classes = data['classes'] + result.add_class(*classes) + end + result end @@ -452,7 +456,8 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph 'name' => name, 'version' => version, 'resources' => vertices.collect { |v| v.to_pson_data_hash }, - 'edges' => edges. collect { |e| e.to_pson_data_hash } + 'edges' => edges. collect { |e| e.to_pson_data_hash }, + 'classes' => classes }, 'metadata' => { 'api_version' => 1 |