From: Luke Kanies <[email protected]> This allows you to ask for a node's catalog in dot format, for inputting into graphviz et al.
Signed-off-by: Luke Kanies <[email protected]> --- lib/puppet/network/formats.rb | 3 +++ spec/unit/network/formats.rb | 10 ++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/lib/puppet/network/formats.rb b/lib/puppet/network/formats.rb index a98dcbc..fb328a3 100644 --- a/lib/puppet/network/formats.rb +++ b/lib/puppet/network/formats.rb @@ -186,3 +186,6 @@ Puppet::Network::FormatHandler.create(:pson, :mime => "text/pson", :weight => 10 klass.from_pson(data) end end + +# This is really only ever going to be used for Catalogs. +Puppet::Network::FormatHandler.create(:dot, :mime => "text/dot", :required_methods => [:render_method]) diff --git a/spec/unit/network/formats.rb b/spec/unit/network/formats.rb index a241306..bb4de4f 100755 --- a/spec/unit/network/formats.rb +++ b/spec/unit/network/formats.rb @@ -259,6 +259,16 @@ describe "Puppet Network Format" do end end + describe "dot" do + before do + @dot = Puppet::Network::FormatHandler.format(:dot) + end + + it "should have its mimetype set to text/dot" do + @dot.mime.should == "text/dot" + end + end + describe Puppet::Network::FormatHandler.format(:raw) do before do @format = Puppet::Network::FormatHandler.format(:raw) -- 1.6.1 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
