You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2012/11/06 18:31:18 UTC
git commit: Fix for create_instance (hwp.name vs hwp.id) openstack
driver
Updated Branches:
refs/heads/master 1a2f1b64e -> 4822d37df
Fix for create_instance (hwp.name vs hwp.id) openstack driver
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/4822d37d
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/4822d37d
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/4822d37d
Branch: refs/heads/master
Commit: 4822d37df4f7d63edb92ee556e7b67d5d0dcdfec
Parents: 1a2f1b6
Author: marios <ma...@redhat.com>
Authored: Tue Nov 6 19:22:27 2012 +0200
Committer: marios <ma...@redhat.com>
Committed: Tue Nov 6 19:22:27 2012 +0200
----------------------------------------------------------------------
.../drivers/openstack/openstack_driver.rb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4822d37d/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 6977048..fc141b5 100644
--- a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
+++ b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
@@ -165,7 +165,7 @@ module Deltacloud
params[:name] = (opts[:name] && opts[:name].length>0)? opts[:name] : "server#{Time.now.to_s}"
params[:imageRef] = image_id
params[:flavorRef] = (opts[:hwp_id] && opts[:hwp_id].length>0) ?
- opts[:hwp_id] : hardware_profiles(credentials).first.name
+ opts[:hwp_id] : hardware_profiles(credentials).first.id
if opts[:password] && opts[:password].length > 0
params[:adminPass]=opts[:password]
end
@@ -377,8 +377,8 @@ private
storage flavor.send(op, :disk).to_i
cpu flavor.send(op, :vcpus).to_i
end
- hwp.name = flavor.send(op, :name)
- return hwp
+ hwp.name = flavor.send(op, :name)
+ return hwp
end
def convert_from_image(image, owner)