class KnifeTopo::TopoCookbookCreate
knife topo cookbook create
Public Class Methods
new(args)
click to toggle source
Calls superclass method
# File lib/chef/knife/topo_cookbook_create.rb, line 44 def initialize(args) super @args = args end
Public Instance Methods
do_create_artifacts()
click to toggle source
# File lib/chef/knife/topo_cookbook_create.rb, line 66 def do_create_artifacts @processor.generate_artifacts( 'cmd_args' => @args, 'cmd' => self ) end
run()
click to toggle source
# File lib/chef/knife/topo_cookbook_create.rb, line 49 def run validate_args @topo = load_topo_from_file_or_exit(@topo_file) @processor = KnifeTopo::Processor.for_topo(@topo) do_create_artifacts end
validate_args()
click to toggle source
# File lib/chef/knife/topo_cookbook_create.rb, line 57 def validate_args unless @name_args[0] show_usage ui.fatal('You must specify a topology JSON file') exit 1 end @topo_file = @name_args[0] end