On Mar 29, 2011, at 1:41 AM, [email protected] wrote:
> We've had an XML representation of drivers supported by the server as a
> one-off page for a while now. In keeping with HATEAOS, the list of drivers
> should be reachable through the main API entry point.
>
> To make that possible, I turned drivers into their own toplevel
> collection. I also changed the XML format for a driver to emphasize the
> list of possible provider values more. For the EC2 driver the XML now is:
>
> <driver href="http://localhost:3001/api/drivers/ec2" id="ec2">
> <name>EC2</name>
>
> <provider id="us-west-1">
> <entrypoint kind="s3">s3-us-west-1.amazonaws.com</entrypoint>
> <entrypoint
> kind="elb">elasticloadbalancing.us-west-1.amazonaws.com</entrypoint>
> <entrypoint kind="ec2">ec2.us-west-1.amazonaws.com</entrypoint>
> </provider>
>
> .. similar provider tags for the other regions ..
> </driver>
It makes perfect sense to me to turn it to top-level entrypoints.
Review notes:
- Applied cleanely, 3/3 gave me some trailing whitespace warnings
- Test::Unit output (rake test):
1) Failure:
test_it_expose_available_drivers(DeltacloudUnitTest::ApiTest)
[/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/drivers/mock/api_test.rb:79:in `test_it_expose_available_drivers']:
expected: > 0,
got: 0
2) Failure:
test_it_expose_ec2_driver_entrypoints(DeltacloudUnitTest::ApiTest)
[/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/drivers/mock/api_test.rb:86:in
`test_it_expose_ec2_driver_entrypoints']:
expected: > 0,
got: 0
Seems like those tests need to be updated to this.
- Cucumber gave me 2 failures, related to top failures. Could you please
include a fix for this?
- Functionality:
* http://localhost:3001/api/drivers/opennebula -> missing HAML template
(HTML)
* Could you please also include JSON support for this collection?
-- Michal
------------------------------------------------------
Michal Fojtik, [email protected]
Deltacloud API: http://deltacloud.org