bin/sdc-createmachine in smartdc-0.3.0 vs bin/sdc-createmachine in smartdc-0.4.0
- old
+ new
@@ -8,16 +8,15 @@
opts.on('-n', '--name NAME', 'friendly name for this machine.') {|v| options[:name] = v }
opts.on('-e', '--dataset URN', 'dataset URN.') {|v| options[:dataset] = v }
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 'Datasets(urn):'
+ print "\n" + 'Datasets(urn):'
fixture('datasets').each do |dataset|
print ' ' + dataset['urn']
end
- puts
- print 'Packages(name):'
+ print "\n\n" + 'Packages(name):'
fixture('packages').each do |packages|
print ' ' + packages['name']
end
puts
exit
@@ -30,10 +29,11 @@
exit
end
end
begin
- client.request.return_variable = 'json'
puts client.machines.create options
-rescue => e
+rescue Smartdc::Error::Conflict => e
puts e
+rescue => e
+ puts e.inspect
end
\ No newline at end of file