Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0BB1DA2F for ; Mon, 1 Oct 2012 03:39:06 +0000 (UTC) Received: (qmail 26016 invoked by uid 500); 1 Oct 2012 03:39:06 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 25876 invoked by uid 500); 1 Oct 2012 03:39:01 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 25841 invoked by uid 99); 1 Oct 2012 03:39:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2012 03:38:59 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2012 03:38:52 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q913cUaL010418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 30 Sep 2012 23:38:30 -0400 Received: from [10.3.112.21] (ovpn-112-21.phx2.redhat.com [10.3.112.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q913cTIk025060 for ; Sun, 30 Sep 2012 23:38:29 -0400 Message-ID: <1349062708.24408.6.camel@avon.watzmann.net> Subject: Re: NoMethodError - undefined method `underscore' for CIMI::Model::ResourceMetadata:Class From: David Lutterkort To: dev@deltacloud.apache.org Date: Sun, 30 Sep 2012 20:38:28 -0700 In-Reply-To: <434A0ECB689CAF49A3A2321F30F2AB8322CDD4D5@FALEX03.au.fjanz.com> References: <434A0ECB689CAF49A3A2321F30F2AB8322CDD4D5@FALEX03.au.fjanz.com> Organization: Red Hat Inc Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 My bad .. I broke that with c6b642b0; CIMI::Model::root_entities is now an array of classes, rather than an array of names. To get the old array, you'll need to do something like CIMI::Model::root_entites.map do |klass| klass.name.split('::').last.pluralize.underscore end Unfortunately, this week looks pretty bad for me to come up with a proper fix; but if somebody else could cook up a patch, it would be much appreciated. David On Sat, 2012-09-29 at 18:02 +1000, Koper, Dies wrote: > ruby bin\start -u http://localhost:3001/cimi > > then access http://localhost:4001/cimi/cloudEntryPoint > gives me: > > NoMethodError - undefined method `underscore' for > CIMI::Model::ResourceMetadata:Class: > bin/../lib/entities/cloud_entry_point.rb:21:in `GET > /cimi/cloudEntryPoint' > bin/../lib/entities/cloud_entry_point.rb:21:in `map' > > Why? > > Server was started with ruby bin\deltacloudd -i fgcp -f cimi > And seems to have handled the request successfully: > > 127.0.0.1 - - [29/Sep/2012 17:55:01] "GET /cimi/cloudEntryPoint > HTTP/1.1" 200 861 0.0090 > > This is on Windows 7 with ruby 1.8.7 (2012-02-08 patchlevel 358) > [i386-mingw32] > And I ran bundle in the server and cimi client directories before > running the commands. > > Cimi client: > > Gems included by the bundle: > * bundler (1.0.22) > * haml (3.1.7) > * json (1.7.5) > * mime-types (1.19) > * nokogiri (1.5.5) > * rack (1.4.1) > * rack-accept (0.4.5) > * rack-protection (1.2.0) > * rest-client (1.6.7) > * sinatra (1.3.3) > * sinatra-content-for (0.1) > * tilt (1.3.3) > > Server: > > Gems included by the bundle: > * addressable (2.3.2) > * akami (1.2.0) > * aws (2.5.7) > * builder (3.1.3) > * bundler (1.0.22) > * cloudfiles (1.5.0.1) > * cloudservers (0.4.2) > * crack (0.3.1) > * daemons (1.1.9) > * deltacloud-core (1.0.3) > * eventmachine (1.0.0) > * excon (0.16.4) > * fog (1.6.0) > * formatador (0.2.3) > * gyoku (0.4.6) > * haml (3.1.7) > * http_connection (1.4.1) > * httpi (1.1.1) > * jruby-pageant (1.1.1) > * json (1.7.5) > * mime-types (1.19) > * minitest (4.0.0) > * multi_json (1.3.6) > * net-scp (1.0.4) > * net-ssh (2.6.0) > * nokogiri (1.5.5) > * nori (1.1.3) > * openstack (1.0.6) > * rack (1.4.1) > * rack-accept (0.4.5) > * rack-protection (1.2.0) > * rack-test (0.6.2) > * rake (0.9.2.2) > * rbovirt (0.0.12) > * rbvmomi (1.6.0) > * require_relative (1.0.3) > * rest-client (1.6.7) > * ruby-hmac (0.4.0) > * savon (1.2.0) > * simplecov (0.6.4) > * simplecov-html (0.5.3) > * sinatra (1.3.3) > * sinatra-rabbit (1.1.2) > * thin (1.5.0) > * tilt (1.3.3) > * trollop (2.0) > * uuidtools (2.1.3) > * vcr (2.2.5) > * wasabi (2.5.1) > * waz-storage (1.1.4) > * webmock (1.8.11) > * xml-simple (1.1.1) > > Cheers, > Dies Koper > >