[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:30:47 UTC 2013


The following commit has been merged in the master branch:
commit 2462efc9a0f1b005c257c291a55a3205488ef1da
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Fri Mar 22 17:53:55 2013 -0700

    Implement SetAlarmState
    
    Fixes TOOLS-267

diff --git a/bin/euwatch-set-alarm-state b/bin/euwatch-set-alarm-state
new file mode 100755
index 0000000..e7277d7
--- /dev/null
+++ b/bin/euwatch-set-alarm-state
@@ -0,0 +1,6 @@
+#!/usr/bin/python -tt
+
+import euca2ools.commands.monitoring.setalarmstate
+
+if __name__ == '__main__':
+    euca2ools.commands.monitoring.setalarmstate.SetAlarmState.run()
diff --git a/euca2ools/commands/monitoring/deletealarms.py b/euca2ools/commands/monitoring/setalarmstate.py
similarity index 65%
copy from euca2ools/commands/monitoring/deletealarms.py
copy to euca2ools/commands/monitoring/setalarmstate.py
index a86d2ef..d8c0b2c 100644
--- a/euca2ools/commands/monitoring/deletealarms.py
+++ b/euca2ools/commands/monitoring/setalarmstate.py
@@ -28,14 +28,20 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-import argparse
 from euca2ools.commands.monitoring import CloudWatchRequest
 from requestbuilder import Arg
 
 
-class DeleteAlarms(CloudWatchRequest):
-    DESCRIPTION = 'Delete alarms'
-    ARGS = [Arg('AlarmNames.member', metavar='ALARM', nargs='+',
-                help='names of the alarms to delete'),
-            Arg('-f', '--force', action='store_true', route_to=None,
-                help=argparse.SUPPRESS)]  # for compatibility
+class SetAlarmState(CloudWatchRequest):
+    DESCRIPTION = 'Temporarily set the state of an alarm'
+    ARGS = [Arg('AlarmName', metavar='ALARM',
+                help='name of the alarm to update (required)'),
+            Arg('--state-value', dest='StateValue', required=True,
+                choices=('ALARM', 'INSUFFICIENT_DATA', 'OK'),
+                help='state to set the alarm to (required)'),
+            Arg('--state-reason', dest='StateReason', metavar='REASON',
+                required=True, help='''human-readable reason why the alarm was
+                set to this state (required)'''),
+            Arg('--state-reason-data', dest='StateReasonData', metavar='JSON',
+                help='''JSON-formatted reason why the alarm was set to this
+                state''')]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list