deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Set name in hardware profile in openstack driver.
Date Tue, 06 Nov 2012 16:30:16 GMT
Updated Branches:
  refs/heads/master 8a8171ea4 -> cf5a3ae7b


Set name in hardware profile in openstack driver.

Name was not being set which is crucial for heat usage.

Signed-off-by: Ian Main <imain@redhat.com>


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

Branch: refs/heads/master
Commit: cf5a3ae7b2e27b1e28d1e9cb33629e6ae8a9a824
Parents: 8a8171e
Author: Ian Main <imain@redhat.com>
Authored: Thu Nov 1 11:27:49 2012 -0700
Committer: marios <marios@redhat.com>
Committed: Tue Nov 6 18:29:23 2012 +0200

----------------------------------------------------------------------
 .../drivers/openstack/openstack_driver.rb          |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/cf5a3ae7/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
index 04bd409..6977048 100644
--- a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
+++ b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
@@ -371,12 +371,14 @@ private
 
         def convert_from_flavor(flavor)
           op = (flavor.class == Hash)? :fetch : :send
-          HardwareProfile.new(flavor.send(op, :id).to_s) do
+          hwp = HardwareProfile.new(flavor.send(op, :id).to_s) do
             architecture 'x86_64'
             memory flavor.send(op, :ram).to_i
             storage flavor.send(op, :disk).to_i
             cpu flavor.send(op, :vcpus).to_i
           end
+	  hwp.name = flavor.send(op, :name)
+	  return hwp
         end
 
         def convert_from_image(image, owner)


Mime
View raw message