deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [1/3] git commit: CIMI: include id and name attributes in collections
Date Wed, 26 Sep 2012 22:38:14 GMT
Updated Branches:
  refs/heads/master 779cc3908 -> 97db199f9


CIMI: include id and name attributes in collections


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/97db199f
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/97db199f
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/97db199f

Branch: refs/heads/master
Commit: 97db199f908eb9fcd7780d904e7161fb7c60bac5
Parents: a935cb9
Author: David Lutterkort <lutter@redhat.com>
Authored: Fri Sep 21 15:56:25 2012 -0700
Committer: David Lutterkort <lutter@redhat.com>
Committed: Wed Sep 26 15:23:05 2012 -0700

----------------------------------------------------------------------
 server/lib/cimi/models/collection.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/97db199f/server/lib/cimi/models/collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/collection.rb b/server/lib/cimi/models/collection.rb
index 6053f9f..47c92f2 100644
--- a/server/lib/cimi/models/collection.rb
+++ b/server/lib/cimi/models/collection.rb
@@ -86,7 +86,9 @@ module CIMI::Model
       def list(context)
         entries = find(:all, context)
         desc = "#{self.name.split("::").last} Collection for the #{context.driver.name.capitalize}
driver"
-        collection_class.new(:count => entries.size,
+        id = context.send("#{collection_class.entry_name}_url")
+        collection_class.new(:id => id, :name => 'default',
+                             :count => entries.size,
                              :entries => entries,
                              :description => desc)
       end


Mime
View raw message