diff --git a/lib/fog/vsphere/compute.rb b/lib/fog/vsphere/compute.rb index db2ffe239..133805842 100644 --- a/lib/fog/vsphere/compute.rb +++ b/lib/fog/vsphere/compute.rb @@ -8,6 +8,9 @@ module Fog recognizes :vsphere_port, :vsphere_path, :vsphere_ns recognizes :vsphere_rev, :vsphere_ssl, :vsphere_expected_pubkey_hash + request_path 'fog/vsphere/requests/compute' + request :current_time + class Mock def initialize(options={}) diff --git a/lib/fog/vsphere/requests/compute/current_time.rb b/lib/fog/vsphere/requests/compute/current_time.rb new file mode 100644 index 000000000..9e50bd989 --- /dev/null +++ b/lib/fog/vsphere/requests/compute/current_time.rb @@ -0,0 +1,21 @@ +module Fog + module Compute + class Vsphere + class Real + + def current_time + @connection.serviceInstance.CurrentTime + end + + end + + class Mock + + def current_time + Time.now.utc + end + + end + end + end +end