41: def register_images
42: if @option.snapshot
43: opts = {
44: :name => @argv.first,
45: :architecture => @option.arch || 'i386',
46: :description => @option.description || 'Made with Rudy',
47: :root_device_name => "/dev/sda1",
48: :block_device_mapping => [{
49: :device_name => "/dev/sda1",
50: :ebs_snapshot_id => @option.snapshot,
51: :ebs_delete_on_termination => true
52: }]
53: }
54: opts[:kernel_id] = @option.kernel if @option.kernel
55: opts[:ramdisk_id] = @option.ramdisk if @option.ramdisk
56: else
57: opts = {
58: :image_location => @argv.first
59: }
60: end
61: p opts if Rudy.debug?
62: li Rudy::AWS::EC2::Images.register(opts)
63: end