diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2011-02-08 16:24:30 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@puppetlabs.com> | 2011-02-08 16:24:30 -0800 |
| commit | efca35cbea836fac954fb655d76493f03b36e96f (patch) | |
| tree | bead559fb4a20391cac95a0ff650b7ef24ceb561 /lib/puppet/application | |
| parent | 025768fc69de268b3c01526a138f54dc5778b9c8 (diff) | |
| download | puppet-efca35cbea836fac954fb655d76493f03b36e96f.tar.gz puppet-efca35cbea836fac954fb655d76493f03b36e96f.tar.xz puppet-efca35cbea836fac954fb655d76493f03b36e96f.zip | |
Finishing migration from puppet repo
The whole system seems to work again, as long as
you run it against 2.6.next.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/data.rb | 13 | ||||
| -rw-r--r-- | lib/puppet/application/data_baseclass.rb | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/puppet/application/data.rb b/lib/puppet/application/data.rb index cfbf4305a..8d98d4416 100644 --- a/lib/puppet/application/data.rb +++ b/lib/puppet/application/data.rb @@ -52,6 +52,8 @@ class Puppet::Application::Data < Puppet::Application def setup Puppet::Util::Log.newdestination :console + load_applications # Call this to load all of the apps + @verb, @arguments = command_line.args @arguments ||= [] @@ -77,8 +79,15 @@ class Puppet::Application::Data < Puppet::Application end def actions(indirection) - return [] unless app = Puppet::Application.find(indirection) - return app.actions.sort { |a,b| a.to_s <=> b.to_s } + return [] unless interface = Puppet::Interface.interface(indirection) + interface.load_actions + return interface.actions.sort { |a,b| a.to_s <=> b.to_s } + end + + def load_applications + command_line.available_subcommands.each do |app| + command_line.require_application app + end end end diff --git a/lib/puppet/application/data_baseclass.rb b/lib/puppet/application/data_baseclass.rb index 95142b8ba..3f498f56f 100644 --- a/lib/puppet/application/data_baseclass.rb +++ b/lib/puppet/application/data_baseclass.rb @@ -60,6 +60,7 @@ class Puppet::Application::DataBaseclass < Puppet::Application @type = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym @interface = Puppet::Interface.interface(@type).new + @interface.format = format if format validate |
