puppetlabs/Razor — pull request #124 by ChrisLundquist (2012-07-08 20:04:42+00:00)
Title: Update model sclice cli

Brings Model#add_model inline with Policy#add_policy using yaml files and --option.

Changes tested by hand for the CLI. This should at least be a step in the right direction.

rake spec errors in my environment with
```
# rake spec
/usr/bin/ruby1.9.1 -S rspec spec/unit/slice_util/common_spec.rb spec/tagging/rz_tagging_spec.rb spec/slice/rz_slice_node_spec.rb spec/slice/rz_slice_broker_spec.rb spec/slice/rz_slice_bmc_spec.rb spec/slice/rz_slice_tag_spec.rb spec/slice/rz_slice_model_spec.rb spec/image_svc/rz_image_svc_spec.rb spec/policy/rz_policy_default_spec.rb spec/engine/rz_engine_spec.rb spec/engine/rz_engine_node_spec.rb spec/common/rz_data_spec.rb spec/persist/rz_persist_controller_spec.rb spec/ipmi_controller/rz_ipmi_controller_spec.rb --color
/var/lib/gems/1.9.1/gems/mocha-0.12.0/lib/mocha/integration.rb:39:in `': Test::Unit or MiniTest must be loaded *before* Mocha (use MOCHA_OPTIONS=skip_integration if you know what you are doing). (RuntimeError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/mocha-0.12.0/lib/mocha.rb:2:in `'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /opt/razor/spec/ipmi_controller/rz_ipmi_controller_spec.rb:7:in `'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/configuration.rb:780:in `load'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/configuration.rb:780:in `map'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/configuration.rb:780:in `load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/command_line.rb:22:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/runner.rb:69:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.11.0/lib/rspec/core/runner.rb:8:in `block in autorun'
rake aborted!
/usr/bin/ruby1.9.1 -S rspec spec/unit/slice_util/common_spec.rb spec/tagging/rz_tagging_spec.rb spec/slice/rz_slice_node_spec.rb spec/slice/rz_slice_broker_spec.rb spec/slice/rz_slice_bmc_spec.rb spec/slice/rz_slice_tag_spec.rb spec/slice/rz_slice_model_spec.rb spec/image_svc/rz_image_svc_spec.rb spec/policy/rz_policy_default_spec.rb spec/engine/rz_engine_spec.rb spec/engine/rz_engine_node_spec.rb spec/common/rz_data_spec.rb spec/persist/rz_persist_controller_spec.rb spec/ipmi_controller/rz_ipmi_controller_spec.rb --color failed
```