Class: Chef::Knife
- Defined in:
- lib/chef/knife/chop_base.rb,
lib/chef/knife/chop/ui.rb,
lib/chef/knife/chop_upload.rb,
lib/chef/knife/chop/logging.rb,
lib/chef/knife/chop_translate.rb,
lib/chef/knife/chop/chef_knife.rb
Overview
noinspection RubyTooManyInstanceVariablesInspection noinspection RubyTooManyMethodsInspection
Direct Known Subclasses
Defined Under Namespace
Modules: ChopBase, ChopLogging Classes: ChopTranslate, ChopUI, ChopUpload, CookbookUpload, DataBagFromFile, EnvironmentFromFile, RoleFromFile
Instance Attribute Summary collapse
-
#ALLACTIONS ⇒ Object
Returns the value of attribute ALLACTIONS.
-
#ALLPARTS ⇒ Object
Returns the value of attribute ALLPARTS.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#LOGLEVELS ⇒ Object
Returns the value of attribute LOGLEVELS.
-
#prec_max ⇒ Object
Returns the value of attribute prec_max.
-
#rsrctype ⇒ Object
readonly
Returns the value of attribute rsrctype.
-
#verbosity ⇒ Object
Returns the value of attribute verbosity.
Class Method Summary collapse
- .allactions ⇒ Object
- .allactions=(acts) ⇒ Object
- .allparts ⇒ Object
- .allparts=(parts) ⇒ Object
- .loglevels ⇒ Object
- .loglevels=(levels) ⇒ Object
Instance Method Summary collapse
-
#translate ⇒ Object
——————————————————————————————————————–.
Instance Attribute Details
#ALLACTIONS ⇒ Object
Returns the value of attribute ALLACTIONS.
34 35 36 |
# File 'lib/chef/knife/chop_base.rb', line 34 def ALLACTIONS @ALLACTIONS end |
#ALLPARTS ⇒ Object
Returns the value of attribute ALLPARTS.
33 34 35 |
# File 'lib/chef/knife/chop_base.rb', line 33 def ALLPARTS @ALLPARTS end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
39 40 41 |
# File 'lib/chef/knife/chop/chef_knife.rb', line 39 def location @location end |
#logger ⇒ Object
Returns the value of attribute logger.
30 31 32 |
# File 'lib/chef/knife/chop_base.rb', line 30 def logger @logger end |
#LOGLEVELS ⇒ Object
Returns the value of attribute LOGLEVELS.
32 33 34 |
# File 'lib/chef/knife/chop_base.rb', line 32 def LOGLEVELS @LOGLEVELS end |
#prec_max ⇒ Object
Returns the value of attribute prec_max.
35 36 37 |
# File 'lib/chef/knife/chop_base.rb', line 35 def prec_max @prec_max end |
#rsrctype ⇒ Object (readonly)
Returns the value of attribute rsrctype.
38 39 40 |
# File 'lib/chef/knife/chop/chef_knife.rb', line 38 def rsrctype @rsrctype end |
#verbosity ⇒ Object
Returns the value of attribute verbosity.
31 32 33 |
# File 'lib/chef/knife/chop_base.rb', line 31 def verbosity @verbosity end |
Class Method Details
.allactions ⇒ Object
57 58 59 |
# File 'lib/chef/knife/chop_base.rb', line 57 def self.allactions @ALLACTIONS end |
.allactions=(acts) ⇒ Object
45 46 47 |
# File 'lib/chef/knife/chop_base.rb', line 45 def self.allactions=(acts) @ALLACTIONS = acts || [:upload, :translate] end |
.allparts ⇒ Object
53 54 55 |
# File 'lib/chef/knife/chop_base.rb', line 53 def self.allparts @ALLPARTS end |
.allparts=(parts) ⇒ Object
41 42 43 |
# File 'lib/chef/knife/chop_base.rb', line 41 def self.allparts=(parts) @ALLPARTS = parts || [:environments, :roles, :databags, :cookbooks] end |
.loglevels ⇒ Object
49 50 51 |
# File 'lib/chef/knife/chop_base.rb', line 49 def self.loglevels @LOGLEVELS end |
.loglevels=(levels) ⇒ Object
37 38 39 |
# File 'lib/chef/knife/chop_base.rb', line 37 def self.loglevels=(levels) @LOGLEVELS = levels || [:trace, :debug, :step, :info, :warn, :error, :fatal, :todo] end |
Instance Method Details
#translate ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/chef/knife/chop/chef_knife.rb', line 42 def translate() if config[:all] translate_all() else if @name_args[0].nil? show_usage ui.fatal("You must specify a file to translate") exit 1 end @name_args.each do |arg| translate_one(arg) end end end |