deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Replace DateTime with Time for ruby 1.8.7 compatibility
Date Tue, 06 Nov 2012 13:40:30 GMT
Updated Branches:
  refs/heads/master 56257a27c -> 8a8171ea4


Replace DateTime with Time for ruby 1.8.7 compatibility

DateTime.now.xmlschema --> Time.now.xmlschema

related to https://issues.apache.org/jira/browse/DTACLOUD-349


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

Branch: refs/heads/master
Commit: 8a8171ea455f68a2a78d9b89dccea4fb00ddff27
Parents: 56257a2
Author: marios <marios@redhat.com>
Authored: Tue Nov 6 15:36:08 2012 +0200
Committer: marios <marios@redhat.com>
Committed: Tue Nov 6 15:36:08 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/models/cloud_entry_point.rb        |    2 +-
 server/lib/cimi/models/credential.rb               |    2 +-
 server/lib/cimi/models/disk.rb                     |    2 +-
 server/lib/cimi/models/machine.rb                  |    2 +-
 server/lib/cimi/models/machine_configuration.rb    |    2 +-
 server/lib/cimi/models/machine_image.rb            |    2 +-
 server/lib/cimi/models/machine_volume.rb           |    2 +-
 server/lib/cimi/models/network_port_collection.rb  |    4 ++--
 .../network_port_configuration_collection.rb       |    2 +-
 .../models/network_port_template_collection.rb     |    2 +-
 server/lib/cimi/models/volume.rb                   |    2 +-
 server/lib/cimi/models/volume_configuration.rb     |    2 +-
 server/lib/cimi/models/volume_image.rb             |    2 +-
 13 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/cloud_entry_point.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/cloud_entry_point.rb b/server/lib/cimi/models/cloud_entry_point.rb
index f86e5ee..55b0a21 100644
--- a/server/lib/cimi/models/cloud_entry_point.rb
+++ b/server/lib/cimi/models/cloud_entry_point.rb
@@ -23,7 +23,7 @@ class CIMI::Model::CloudEntryPoint < CIMI::Model::Base
       :description => "Cloud Entry Point for the Deltacloud #{context.driver.name} driver",
       :id => context.cloudEntryPoint_url,
       :base_uri => context.base_uri,
-      :created => DateTime.now.xmlschema
+      :created => Time.now.xmlschema
     }))
   end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/credential.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/credential.rb b/server/lib/cimi/models/credential.rb
index 7e11a95..f363d06 100644
--- a/server/lib/cimi/models/credential.rb
+++ b/server/lib/cimi/models/credential.rb
@@ -55,7 +55,7 @@ class CIMI::Model::Credential < CIMI::Model::Base
       :password => key.is_password? ? key.password : key.fingerprint,
       :key => key.is_key? ? key.pem_rsa_key : nil,
       :id => context.credential_url(key.id),
-      :created => DateTime.now.xmlschema
+      :created => Time.now.xmlschema
     )
   end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/disk.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/disk.rb b/server/lib/cimi/models/disk.rb
index 6ca8792..40bd6e1 100644
--- a/server/lib/cimi/models/disk.rb
+++ b/server/lib/cimi/models/disk.rb
@@ -46,7 +46,7 @@ class CIMI::Model::Disk < CIMI::Model::Base
           :id => context.machine_url(instance.id)+"/disks/#{name}",
           :name => name,
           :description => "Disk for Machine #{instance.id}",
-          :created => instance.launch_time.nil? ? DateTime.now.xmlschema : DateTime.parse(instance.launch_time).xmlschema,
+          :created => instance.launch_time.nil? ? Time.now.xmlschema : Time.parse(instance.launch_time).xmlschema,
           :capacity => capacity
         )]
       end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/machine.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb
index 876ac0b..6758d4a 100644
--- a/server/lib/cimi/models/machine.rb
+++ b/server/lib/cimi/models/machine.rb
@@ -119,7 +119,7 @@ class CIMI::Model::Machine < CIMI::Model::Base
     self.new(
       :name => instance.id,
       :description => instance.name,
-      :created => instance.launch_time.nil? ? DateTime.now.xmlschema : DateTime.parse(instance.launch_time).xmlschema,
+      :created => instance.launch_time.nil? ? Time.now.xmlschema : Time.parse(instance.launch_time).xmlschema,
       :id => context.machine_url(instance.id),
       :state => convert_instance_state(instance.state),
       :cpu => cpu || convert_instance_cpu(instance.instance_profile, context),

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/machine_configuration.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine_configuration.rb b/server/lib/cimi/models/machine_configuration.rb
index 0296ccc..2ee4c5a 100644
--- a/server/lib/cimi/models/machine_configuration.rb
+++ b/server/lib/cimi/models/machine_configuration.rb
@@ -54,7 +54,7 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
       :description => "Machine Configuration with #{memory} KiB "+
         "of memory and #{cpu} CPU",
       :cpu => ( cpu if cpu ) ,
-      :created => DateTime.now.xmlschema,  # FIXME: DC hardware_profile has no mention
about created_at
+      :created => Time.now.xmlschema,  # FIXME: DC hardware_profile has no mention about
created_at
       :memory => (memory if memory),
       :disks => (  [ { :capacity => storage  } ] if storage ),
       :id => context.machine_configuration_url(profile.name)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/machine_image.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine_image.rb b/server/lib/cimi/models/machine_image.rb
index 64528f5..4f432fd 100644
--- a/server/lib/cimi/models/machine_image.rb
+++ b/server/lib/cimi/models/machine_image.rb
@@ -40,7 +40,7 @@ class CIMI::Model::MachineImage < CIMI::Model::Base
       :name => image.id,
       :id => context.machine_image_url(image.id),
       :description => image.description,
-      :created => DateTime.now.xmlschema,
+      :created => Time.now.xmlschema,
       :image_location => { :href => "#{context.driver.name}://#{image.id}" } # FIXME
     )
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/machine_volume.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine_volume.rb b/server/lib/cimi/models/machine_volume.rb
index 103a414..f5fa966 100644
--- a/server/lib/cimi/models/machine_volume.rb
+++ b/server/lib/cimi/models/machine_volume.rb
@@ -30,7 +30,7 @@ class CIMI::Model::MachineVolume < CIMI::Model::Base
           :id => context.machine_url(instance_id)+"/volumes/#{vol.id}",
           :name => vol.id,
           :description => "MachineVolume #{vol.id} for Machine #{instance_id}",
-          :created => DateTime.parse(vol.created).xmlschema,
+          :created => Time.parse(vol.created).xmlschema,
           :initial_location => vol.device,
           :volume => {:href=>context.volume_url(vol.id)}
           ) if vol.instance_id == instance_id

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/network_port_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_collection.rb b/server/lib/cimi/models/network_port_collection.rb
index 112e92d..c5a848b 100644
--- a/server/lib/cimi/models/network_port_collection.rb
+++ b/server/lib/cimi/models/network_port_collection.rb
@@ -27,7 +27,7 @@ class CIMI::Model::NetworkPortCollection < CIMI::Model::Base
     self.new(
       :id => context.network_ports_url,
       :name => 'default',
-      :created => DateTime.now.xmlschema,
+      :created => Time.now.xmlschema,
       :description => "#{context.driver.name.capitalize} NetworkPortCollection",
       :count => network_ports.size,
       :network_ports => network_ports
@@ -41,7 +41,7 @@ class CIMI::Model::NetworkPortCollection < CIMI::Model::Base
     self.new(
       :id => net_url+"/network_ports",
       :name => 'default',
-      :created => DateTime.now.xmlschema,
+      :created => Time.now.xmlschema,
       :description => "#{context.driver.name.capitalize} NetworkPortCollection",
       :count => ports_collection.size,
       :network_ports => ports_collection

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/network_port_configuration_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_configuration_collection.rb b/server/lib/cimi/models/network_port_configuration_collection.rb
index fa790d8..b210c3b 100644
--- a/server/lib/cimi/models/network_port_configuration_collection.rb
+++ b/server/lib/cimi/models/network_port_configuration_collection.rb
@@ -25,7 +25,7 @@ class CIMI::Model::NetworkPortConfigurationCollection < CIMI::Model::Base
     self.new(
       :id => context.network_port_configurations_url,
       :name => 'default',
-      :created => DateTime.now.xmlschema,
+      :created => Time.now.xmlschema,
       :description => "#{context.driver.name.capitalize} NetworkPortConfigurationCollection",
       :count => network_port_configurations.size,
       :network_port_configurations => network_port_configurations

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/network_port_template_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_template_collection.rb b/server/lib/cimi/models/network_port_template_collection.rb
index 1ab54f2..934e5cf 100644
--- a/server/lib/cimi/models/network_port_template_collection.rb
+++ b/server/lib/cimi/models/network_port_template_collection.rb
@@ -27,7 +27,7 @@ class CIMI::Model::NetworkPortTemplateCollection < CIMI::Model::Base
     self.new(
       :id => context.network_port_templates_url,
       :name => 'default',
-      :created => DateTime.now.xmlschema,
+      :created => Time.now.xmlschema,
       :description => "#{context.driver.name.capitalize} NetworkPortTemplateCollection",
       :count => network_port_templates.size,
       :network_port_templates => network_port_templates

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/volume.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
index 5813cbd..7367d2f 100644
--- a/server/lib/cimi/models/volume.rb
+++ b/server/lib/cimi/models/volume.rb
@@ -90,7 +90,7 @@ class CIMI::Model::Volume < CIMI::Model::Base
   def self.from_storage_volume(volume, context)
     self.new( { :name => volume.id,
                 :description => volume.id,
-                :created => DateTime.parse(volume.created).xmlschema,
+                :created => Time.parse(volume.created).xmlschema,
                 :id => context.volume_url(volume.id),
                 :capacity => { :quantity=>volume.capacity, :units=>"gibibyte"  },
#FIXME... units will vary
                 :bootable => "false", #fixme ... will vary... ec2 doesn't expose this

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/volume_configuration.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/volume_configuration.rb b/server/lib/cimi/models/volume_configuration.rb
index f30222d..dd9f068 100644
--- a/server/lib/cimi/models/volume_configuration.rb
+++ b/server/lib/cimi/models/volume_configuration.rb
@@ -52,7 +52,7 @@ class CIMI::Model::VolumeConfiguration < CIMI::Model::Base
                 :id => context.volume_configuration_url(size),
                 :name => size,
                 :description => "volume configuration with #{size} GiB",
-                :created => DateTime.now.xmlschema,
+                :created => Time.now.xmlschema,
                 :capacity => {:quantity=>size, :units=>"gibibytes"},
                 :supports_snapshots => "true"
                 # FIXME :guest_interface => "NFS"

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8a8171ea/server/lib/cimi/models/volume_image.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/volume_image.rb b/server/lib/cimi/models/volume_image.rb
index 18090b0..5052ff5 100644
--- a/server/lib/cimi/models/volume_image.rb
+++ b/server/lib/cimi/models/volume_image.rb
@@ -41,7 +41,7 @@ class CIMI::Model::VolumeImage < CIMI::Model::Base
     self.new( {
                :name => snapshot.id,
                :description => snapshot.id,
-               :created => DateTime.parse(snapshot.created).xmlschema,
+               :created => Time.parse(snapshot.created).xmlschema,
                :id => context.volume_image_url(snapshot.id),
                :image_location => {:href=>context.volume_url(snapshot.storage_volume_id)},
                :bootable => "false"  #FIXME


Mime
View raw message