deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [3/4] git commit: VSphere: Make the 'name' parameter optional
Date Wed, 02 Jan 2013 14:41:10 GMT
VSphere: Make the 'name' parameter optional

In case 'name' is not sent, use the default "inst#{Time.now.to_i}"
name.


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

Branch: refs/heads/master
Commit: 96263010d39912a6ec98b5db6bd8d5eb22142ea8
Parents: f289668
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Jan 2 14:57:52 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Jan 2 14:57:52 2013 +0100

----------------------------------------------------------------------
 .../deltacloud/drivers/vsphere/vsphere_driver.rb   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/96263010/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
index 5bc7088..2ddd43a 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
@@ -290,7 +290,7 @@ module Deltacloud::Drivers::Vsphere
           :config => RbVmomi::VIM.VirtualMachineConfigSpec(machine_config)
         )
         instance_profile = InstanceProfile::new('default', :hwp_memory => opts[:hwp_memory],
:hwp_cpu => opts[:hwp_cpu])
-        task = vm[:instance].CloneVM_Task(:folder => vm[:instance].parent, :name =>
opts[:name], :spec => spec)
+        task = vm[:instance].CloneVM_Task(:folder => vm[:instance].parent, :name =>
opts[:name] || "inst#{Time.now.to_i}", :spec => spec)
         new_instance = Instance::new(
           :id => opts[:name],
           :name => opts[:name],


Mime
View raw message