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 2013/02/07 13:42:20 UTC
[1/2] git commit: The CIMI spec does not permit providers setting
properties on their own. They are strictly for use by the client.
The CIMI spec does not permit providers setting properties on their
own. They are strictly for use by the client.
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/23e7678c
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/23e7678c
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/23e7678c
Branch: refs/heads/master
Commit: 23e7678c86bfc1d7030315072c5ce393757b63b5
Parents: 06f042d
Author: David Lutterkort <lu...@redhat.com>
Authored: Thu Feb 7 11:43:06 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Thu Feb 7 11:43:06 2013 +0100
----------------------------------------------------------------------
server/lib/cimi/models/machine.rb | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/23e7678c/server/lib/cimi/models/machine.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb
index 6e075e8..214af42 100644
--- a/server/lib/cimi/models/machine.rb
+++ b/server/lib/cimi/models/machine.rb
@@ -145,11 +145,6 @@ class CIMI::Model::Machine < CIMI::Model::Base
cpu = memory = (instance.instance_profile.id == "opaque")? "n/a" : nil
machine_conf = CIMI::Model::MachineConfiguration.find(instance.instance_profile.name, context)
stored_attributes ||= load_attributes_for(instance)
- if stored_attributes[:property]
- stored_attributes[:property].merge!(convert_instance_properties(instance, context))
- else
- stored_attributes[:property] = convert_instance_properties(instance, context)
- end
machine_spec = {
:name => instance.name,
:created => instance.launch_time.nil? ? Time.now.xmlschema : Time.parse(instance.launch_time.to_s).xmlschema,
@@ -186,15 +181,6 @@ class CIMI::Model::Machine < CIMI::Model::Base
end
end
- def self.convert_instance_properties(instance, context)
- properties = {}
- properties["machine_image"] = context.machine_image_url(instance.image_id)
- if instance.respond_to? :keyname
- properties["credential"] = context.credential_url(instance.keyname)
- end
- properties
- end
-
def self.convert_instance_cpu(profile, context)
cpu_override = profile.overrides.find { |p, v| p == :cpu }
if cpu_override.nil?