voxeldotnet/knife-voxel — Issue #1: Required options are not detected when passed?
Author: warwickp
Created: 2011-10-27 19:52:24+00:00
State: open

Here are my various versions:

$ ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03

$ gem list | egrep "chef|knife|ohai"
chef (0.10.4)
knife-voxel (0.0.7)
ohai (0.6.2)

When I run something like:

knife voxel voxcloud create --hostname a.hostname.of.some.kind --facility AMS2 --processing-cores 2 --disk-size 10 --image-id 92

The 'required' options such as hostname, facility, image_id fail validation and appear to be missing when the plugin enters the run method. However, if I remove the 'required => true' from these options and I add something like:

def run

puts config.inspect
exit

I receive confirmation that these options are in fact being passed to the method:

$ knife voxel voxcloud create --hostname a.hostname.of.some.kind --facility AMS2 --processing-cores 2 --disk-size 10 --image-id 92
{:run_list=>[], :no_color=>false, :hostname=>"a.hostname.of.some.kind", :facility=>"AMS2", :processing_cores=>"2" .. snipped

Any idea what's going on there? For now I have rerolled the gem locally making these options not required.