[ https://issues.apache.org/jira/browse/DTACLOUD-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ronelle Landy updated DTACLOUD-501: ----------------------------------- Attachment: 0001-Deltacloud-fix-typo-in-metrics-model.patch Think this minor change should fix the the error. Please review. > GET /api/metrics - using "Accept:Application/json", returns "undefined method > `matric_url'" > ------------------------------------------------------------------------------------------- > > Key: DTACLOUD-501 > URL: https://issues.apache.org/jira/browse/DTACLOUD-501 > Project: DeltaCloud > Issue Type: Bug > Components: Native/Frontend > Environment: Deltacloud commit version: > d536f252b3bc2dab9bdb38a2f6ce590fdc2fdeee > mock provider > Reporter: Ronelle Landy > Attachments: 0001-Deltacloud-fix-typo-in-metrics-model.patch > > > >> curl -X GET -H "Accept:Application/json" --user "un:pw" > >> "http://localhost:3001/api/metrics" > {"code":500,"message":"undefined method `matric_url' for > #<Deltacloud::Collections::Metrics:0x00000001bdb810>","error":"NoMethodError"}[root@qeblade39 > deltacloud]# > **************** > E, [2013-02-26T11:18:51.808600 #16795] ERROR -- 500: [NoMethodError] > undefined method `matric_url' for > #<Deltacloud::Collections::Metrics:0x00000001bdb810> > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/models/metric.rb:47:in > `to_hash' > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/deltacloud_helper.rb:76:in > `block (3 levels) in filter_all' > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/deltacloud_helper.rb:76:in > `map' > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/deltacloud_helper.rb:76:in > `block (2 levels) in filter_all' > /home/dcloud/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:103:in > `call' > /home/dcloud/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:103:in > `respond_to' > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/deltacloud_helper.rb:73:in > `filter_all' > /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/rabbit_helper.rb:22:in > `block (2 levels) in standard_index_operation' > /usr/local/share/gems/gems/sinatra-rabbit-1.1.4/lib/sinatra/rabbit/base.rb:396:in > `instance_eval' > /usr/local/share/gems/gems/sinatra-rabbit-1.1.4/lib/sinatra/rabbit/base.rb:396:in > `block in control' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `call' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `block > in compile!' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `[]' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block (3 > levels) in route!' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:876:in > `route_eval' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block (2 > levels) in route!' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:897:in `block in > process_route' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in `catch' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in > `process_route' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:859:in `block in > route!' > /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in `each' > 127.0.0.1 - - [26/Feb/2013 11:18:51] "GET /api/metrics HTTP/1.1" 500 135 > 0.2685 > ***************** > Request XML returns output w/o error. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira