You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/05/22 22:19:37 UTC
[12/50] [abbrv] git commit: CIMI: Fixed feature loading in
entity_metadata model
CIMI: Fixed feature loading in entity_metadata model
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/866c0e39
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/866c0e39
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/866c0e39
Branch: refs/heads/master
Commit: 866c0e39974c1fbfe9620c6702b993afcc661399
Parents: e5acef5
Author: Michal Fojtik <mf...@redhat.com>
Authored: Fri May 18 21:56:59 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue May 22 22:17:38 2012 +0200
----------------------------------------------------------------------
server/lib/cimi/helpers.rb | 2 +-
server/lib/cimi/models/entity_metadata.rb | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/866c0e39/server/lib/cimi/helpers.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/helpers.rb b/server/lib/cimi/helpers.rb
index 05d2621..5fe8cf8 100644
--- a/server/lib/cimi/helpers.rb
+++ b/server/lib/cimi/helpers.rb
@@ -26,7 +26,7 @@ module CIMI
class FakeCollection
extend Sinatra::Rabbit::Features
- include Deltacloud::InstanceFeatures
+ include Deltacloud::Features
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/866c0e39/server/lib/cimi/models/entity_metadata.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/entity_metadata.rb b/server/lib/cimi/models/entity_metadata.rb
index 5455c75..c14f3c2 100644
--- a/server/lib/cimi/models/entity_metadata.rb
+++ b/server/lib/cimi/models/entity_metadata.rb
@@ -52,7 +52,8 @@ class CIMI::Model::EntityMetadata < CIMI::Model::Base
end
def self.metadata_from_deltacloud_features(cimi_entity, dcloud_entity, context)
- deltacloud_features = context.driver.class.features_for(dcloud_entity)
+ deltacloud_features = context.driver.class.features[dcloud_entity]
+ puts deltacloud_features.inspect
metadata_attributes = deltacloud_features.map{|f| attributes_from_feature(f)}
from_feature(cimi_entity, context, metadata_attributes.flatten!)
end