mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
27 lines
661 B
Ruby
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
|