Class Puppet::Application
In: lib/puppet/application.rb
Parent: Object

Methods

Included Modules

Puppet::Util Puppet::Util

Constants

DOCPATTERN = File.expand_path(File.dirname(__FILE__) + "/util/command_line/*" )

Attributes

command_line  [R] 
options  [R] 
run_status  [RW] 

Public Class methods

Indicates that Puppet::Application believes that it‘s in usual running run_mode (no stop/restart request currently active).

Only executes the given block if the run status of Puppet::Application is clear (no restarts, stops, etc. requested). Upon block execution, checks the run status again; if a restart has been requested during the block‘s execution, then controlled_run will send a new HUP signal to the current process. Thus, long-running background processes can potentially finish their work before a restart.

this is used for testing

Indicates that one of stop! or start! was invoked on Puppet::Application, and some kind of process shutdown/short-circuit may be necessary.

used to declare code that handle an option

Indicates that Puppet::Application.restart! has been invoked and components should do what is necessary to facilitate a restart.

Sets or gets the run_mode name. Sets the run_mode name if a mode_name is passed. Otherwise, gets the run_mode or a default run_mode

Indicates that Puppet::Application.stop! has been invoked and components should do what is necessary for a clean stop.

Public Instance methods

override to execute code before running anything else

This is the main application entry point

WARNING: This is a totally scary, frightening, and nasty internal API. We strongly advise that you do not use this, and if you insist, we will politely allow you to keep both pieces of your broken code.

We plan to provide a supported, long-term API to deliver this in a way that you can use. Please make sure that you let us know if you do require this, and this message is still present in the code. —daniel 2011-02-03

[Validate]