Method: Fog::OpenStack::Volume::V3::Snapshot#create

Defined in:
lib/fog/openstack/volume/v3/models/snapshot.rb

#createObject



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fog/openstack/volume/v3/models/snapshot.rb', line 28

def create
  requires :name

  # volume_id, name, description, force=false
  response = service.create_snapshot(attributes[:volume_id],
                                     attributes[:name],
                                     attributes[:description],
                                     attributes[:force])
  merge_attributes(response.body['snapshot'])

  self
end