class KnifeTopo::TopoCookbookUpload
knife topo cookbook upload
Public Class Methods
new(args)
click to toggle source
Calls superclass method
# File lib/chef/knife/topo_cookbook_upload.rb, line 45 def initialize(args) super @args = args # All called commands need to accept union of options Chef::Knife::CookbookUpload.options = options end
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/topo_cookbook_upload.rb, line 53 def run validate_args # Load the topology data @topo = load_local_topo_or_exit(@topo_name) # Run cookbook upload command on the topology cookbook @processor = KnifeTopo::Processor.for_topo(@topo) @processor.upload_artifacts('cmd' => self, 'cmd_args' => @args) end
validate_args()
click to toggle source
# File lib/chef/knife/topo_cookbook_upload.rb, line 64 def validate_args unless @name_args[0] show_usage ui.fatal('You must specify the name of a topology') exit 1 end @topo_name = @name_args[0] end