From 26d98d0b5bf2ea483deccc950d7298418f1febe5 Mon Sep 17 00:00:00 2001 From: Daniel Reichert Date: Wed, 24 Jul 2013 11:09:46 -0700 Subject: [PATCH] Adding alarm delete coverage of API --- lib/fog/rackspace/monitoring.rb | 1 + .../requests/monitoring/delete_alarm.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 lib/fog/rackspace/requests/monitoring/delete_alarm.rb diff --git a/lib/fog/rackspace/monitoring.rb b/lib/fog/rackspace/monitoring.rb index 17f9a9d17..678c8e128 100644 --- a/lib/fog/rackspace/monitoring.rb +++ b/lib/fog/rackspace/monitoring.rb @@ -64,6 +64,7 @@ module Fog request :update_alarm request :delete_agent_token + request :delete_alarm request :delete_check request :delete_entity diff --git a/lib/fog/rackspace/requests/monitoring/delete_alarm.rb b/lib/fog/rackspace/requests/monitoring/delete_alarm.rb new file mode 100644 index 000000000..96faa8214 --- /dev/null +++ b/lib/fog/rackspace/requests/monitoring/delete_alarm.rb @@ -0,0 +1,18 @@ +module Fog + module Rackspace + class Monitoring + class Real + + def delete_alarm(entity_id, alarm_id) + request( + :expects => [204], + :method => 'DELETE', + :path => "entities/#{entity_id}/alarms/#{alarm_id}" + ) + end + + end + end + end +end +