You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2013/03/14 19:19:04 UTC

[1/15] git commit: CIMI Models: rename hash in DSL to hash_map

CIMI Models: rename hash in DSL to hash_map

Since 'hash' is used for putting objects into Hash, overriding it as a
class method causes surprises when a class is used as a hash key.


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

Branch: refs/heads/master
Commit: 793da8ef10121a731c603f905132fe96b2609fcb
Parents: a06672f
Author: David Lutterkort <lu...@redhat.com>
Authored: Mon Mar 11 15:36:43 2013 -0700
Committer: David Lutterkort <lu...@redhat.com>
Committed: Wed Mar 13 17:16:22 2013 -0700

----------------------------------------------------------------------
 server/lib/cimi/models/base.rb            |    2 +-
 server/lib/cimi/models/schema.rb          |    2 +-
 server/lib/cimi/models/system_template.rb |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/793da8ef/server/lib/cimi/models/base.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index e8c1104..a207bed 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -121,7 +121,7 @@ module CIMI::Model
     # Common attributes for all resources
     #
     text :id, :name, :description, :created, :updated
-    hash :property
+    hash_map :property
 
     def initialize(values = {})
       super(values)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/793da8ef/server/lib/cimi/models/schema.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/schema.rb b/server/lib/cimi/models/schema.rb
index 4ce16b9..b4e9377 100644
--- a/server/lib/cimi/models/schema.rb
+++ b/server/lib/cimi/models/schema.rb
@@ -461,7 +461,7 @@ class CIMI::Model::Schema
       add_attributes!([name, opts], Ref)
     end
 
-    def hash(name)
+    def hash_map(name)
       add_attributes!([name, {}], Hash)
     end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/793da8ef/server/lib/cimi/models/system_template.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/system_template.rb b/server/lib/cimi/models/system_template.rb
index 09cd9b0..6a6e1f2 100644
--- a/server/lib/cimi/models/system_template.rb
+++ b/server/lib/cimi/models/system_template.rb
@@ -19,7 +19,7 @@ class CIMI::Model::SystemTemplate < CIMI::Model::Base
 
   array :component_descriptors do
     text :name, :description
-    hash :properties
+    hash_map :properties
     text :type
     #component_template, comprises:
 #    struct :machine_template, :class => CIMI::Model::MachineTemplate