1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/cloudsigma/requests/create_snapshot.rb
zephyrean 0eea58de12 [CloudSigma] add snapshots (#3491)
* [CloudSigma] add snapshots
2016-08-12 10:26:17 -03:00

27 lines
661 B
Ruby

module Fog
module Compute
class CloudSigma
class Real
def create_snapshot(data)
create_request("snapshots/", data)
end
end
class Mock
def create_snapshot(data)
uuid = self.class.random_uuid
defaults = {'uuid' => uuid,
'timestamp' => Time.now.strftime("%Y-%m-%d %H:%M:%S.%6N%z"),
'status' => 'creating',
'tags' => [],
'grantees' => [],
'allocated_size' => 0
}
mock_create(:snapshots, 201, data, uuid, defaults)
end
end
end
end
end