Method: Fog::Compute::Rackspace::Server#save

Defined in:
lib/fog/rackspace/models/compute/server.rb

#save(options = {}) ⇒ Object

Raises:



68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/fog/rackspace/models/compute/server.rb', line 68

def save(options = {})
  raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
  requires :flavor_id, :image_id
  options = {
    'metadata'    => ,
    'name'        => name,
    'personality' => personality
  }
  options = options.reject {|key, value| value.nil?}
  data = service.create_server(flavor_id, image_id, options)
  merge_attributes(data.body['server'])
  true
end