deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Main <im...@redhat.com>
Subject [PATCH] Set name in hardware profile in openstack driver.
Date Thu, 01 Nov 2012 18:27:49 GMT
Name was not being set which is crucial for heat usage.

Signed-off-by: Ian Main <imain@redhat.com>
---
 server/lib/deltacloud/drivers/openstack/openstack_driver.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
index 5b29840..5c40425 100644
--- a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
+++ b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
@@ -363,12 +363,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)
-- 
1.7.11.7


Mime
View raw message