# Copyright 2008-2014 Amazon.com, Inc. or its affiliates. All Rights # Reserved. Licensed under the Amazon Software License (the # "License"). You may not use this file except in compliance with the # License. A copy of the License is located at # http://aws.amazon.com/asl or in the "license" file accompanying this # file. This file is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See # the License for the specific language governing permissions and # limitations under the License. require 'ec2/amitools/bundle' require 'ec2/amitools/bundlevolparameters' require 'ec2/platform/current' require 'ec2/amitools/syschecks' require 'ec2/amitools/bundle_base' BUNDLE_VOL_NAME = 'ec2-bundle-vol' BUNDLE_VOL_MANUAL=< p.kernel_id, :ramdisk_id => p.ramdisk_id, :product_codes => p.product_codes, :ancestor_ami_ids => p.ancestor_ami_ids, :block_device_mapping => p.block_device_mapping } Bundle.bundle_image(image_file, p.user, p.arch, Bundle::ImageType::VOLUME, p.destination, p.user_pk_path, p.user_cert_path, p.ec2_cert_path, nil, # prefix optional_args, @debug, p.inherit) end $stdout.puts("#{BUNDLE_VOL_NAME} complete.") end #------------------------------------------------------------------------------# # Overrides #------------------------------------------------------------------------------# def get_manual() BUNDLE_VOL_MANUAL end def get_name() BUNDLE_VOL_NAME end def main(p) bundle_vol(p) end end #------------------------------------------------------------------------------# # Script entry point. Execute only if this file is being executed. if __FILE__ == $0 || $0.match(/bin\/ec2-bundle-vol/) VolBundler.new().run(BundleVolParameters) end