diff --git a/lib/fog/digitalocean/models/compute/server.rb b/lib/fog/digitalocean/models/compute/server.rb index b090ce34f..d478a7794 100644 --- a/lib/fog/digitalocean/models/compute/server.rb +++ b/lib/fog/digitalocean/models/compute/server.rb @@ -16,7 +16,7 @@ module Fog # available nevertheless attribute :public_ip_address, :aliases => 'ip_address' attribute :private_ip_address - attribute :backups_active + attribute :backups_active, :aliases => 'backups_enabled' attribute :created_at attr_writer :ssh_keys @@ -125,7 +125,8 @@ module Fog options[:ssh_key_ids] = @ssh_keys.map(&:id) end - options[:private_networking] = !!attributes[:private_networking] + options[:private_networking] = private_networking + options[:backups_active] = backups_active data = service.create_server name, flavor_id, diff --git a/lib/fog/digitalocean/requests/compute/create_server.rb b/lib/fog/digitalocean/requests/compute/create_server.rb index 1fca44277..131d1b316 100644 --- a/lib/fog/digitalocean/requests/compute/create_server.rb +++ b/lib/fog/digitalocean/requests/compute/create_server.rb @@ -24,6 +24,8 @@ module Fog end query_hash[:private_networking] = !!options[:private_networking] + # backups are enabled using backups_enabled query parameter! + query_hash[:backups_enabled] = !!options[:backups_active] request( :expects => [200],