Sha256: a78c138e02ab1504601edc6bbacddf8a59b6fff09cde20d30663ee8d49c90911

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'cli_helper'

options = {}
OptionParser.new do |opts|
  opts.banner = "Usage: #{File.basename($0)} machine.id [options]"
  opts.on('-p', '--package NAME', 'Name of the package to use on provisioning.') {|v| options[:package] = v }
  opts.on('-h','--help') do
    puts opts
    print "\n" + 'Packages(name):'
    fixture('packages').each do |packages|
      print ' ' + packages['name']
    end
    puts
    exit
  end

  begin
    opts.parse!(ARGV)
  rescue => e
    puts e.to_s << "\n" << opts.to_s
    exit
  end
end

begin
  client.machines(ARGV[0]).resize options
rescue => e
  puts e.inspect
else
  puts "Success"  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smartdc-0.4.0 bin/sdc-resizemachine