incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Main <im...@redhat.com>
Subject [PATCH] Use UUIDTools instead of UUID in condor driver
Date Thu, 29 Sep 2011 18:49:08 GMT
This patch updates the condor driver to use UUIDTools as this already
exists in fedora.  I also added the dependency to the gem list.  The RPM
will have to be updated for this dependency as well.

Signed-off-by: Ian Main <imain@redhat.com>
---
 server/deltacloud-core.gemspec                     |    1 +
 .../lib/deltacloud/drivers/condor/condor_driver.rb |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 1c06542..0fec7c6 100644
--- a/server/deltacloud-core.gemspec
+++ b/server/deltacloud-core.gemspec
@@ -74,6 +74,7 @@ Gem::Specification.new do |s|
   s.add_dependency('net-ssh', '>= 2.0.0')
   s.add_dependency('thin', '>= 1.2.5')
   s.add_dependency('nokogiri', '>= 1.4.3')
+  s.add_dependency('uuidtools', '>= 2.1.1')
 
 # dependencies for various cloud providers:
 # Amazon EC2 S3
diff --git a/server/lib/deltacloud/drivers/condor/condor_driver.rb b/server/lib/deltacloud/drivers/condor/condor_driver.rb
index 7a61bde..ad444d5 100644
--- a/server/lib/deltacloud/drivers/condor/condor_driver.rb
+++ b/server/lib/deltacloud/drivers/condor/condor_driver.rb
@@ -36,7 +36,7 @@ module Deltacloud
     module Condor
 
       require 'base64'
-      require 'uuid'
+      require 'uuidtools'
       require 'fileutils'
 
       class CondorDriver < Deltacloud::BaseDriver
@@ -139,7 +139,7 @@ module Deltacloud
               config_server_address = nil
             end
           end
-          vm_uuid ||= UUID::new.generate
+          vm_uuid ||= UUIDTools::UUID.random_create.to_s
           vm_otp ||= vm_uuid[0..7]
           new_client(credentials) do |condor|
             config_server_address ||= condor.ip_agent.address
-- 
1.7.6.2


Mime
View raw message