[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:36 UTC 2013
The following commit has been merged in the master branch:
commit b03e423059fededd5b4933670a88b1d3b725a152
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Wed Mar 6 16:07:27 2013 -0800
Implement DescribeScheduledActions
Fixes TOOLS-222
diff --git a/bin/kilo-describe-scheduled-actions b/bin/kilo-describe-scheduled-actions
new file mode 100755
index 0000000..d342b42
--- /dev/null
+++ b/bin/kilo-describe-scheduled-actions
@@ -0,0 +1,6 @@
+#!/usr/bin/python -tt
+
+import euca2ools.commands.autoscaling.describescheduledactions
+
+if __name__ == '__main__':
+ euca2ools.commands.autoscaling.describescheduledactions.DescribeScheduledActions.run()
diff --git a/euca2ools/commands/autoscaling/describepolicies.py b/euca2ools/commands/autoscaling/describescheduledactions.py
similarity index 56%
copy from euca2ools/commands/autoscaling/describepolicies.py
copy to euca2ools/commands/autoscaling/describescheduledactions.py
index c243ee6..a43db25 100644
--- a/euca2ools/commands/autoscaling/describepolicies.py
+++ b/euca2ools/commands/autoscaling/describescheduledactions.py
@@ -34,18 +34,27 @@ from requestbuilder.mixins import TabifyingCommand
from requestbuilder.response import PaginatedResponse
-class DescribePolicies(AutoScalingRequest, TabifyingCommand):
- DESCRIPTION = 'Describe auto-scaling policies'
- ARGS = [Arg('PolicyNames.member', metavar='POLICY', nargs='*',
- help='limit results to specific auto-scaling policies'),
- Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName',
+class DescribeScheduledActions(AutoScalingRequest, TabifyingCommand):
+ DESCRIPTION = 'Describe scheduled auto-scaling group actions'
+ ARGS = [Arg('ScheduledActionNames.member', metavar='ACTION', nargs='*',
+ help='limit results to specific actions'),
+ Arg('-g', '--group', dest='AutoScalingGroupName',
metavar='ASGROUP'),
+ Arg('--start-time', dest='StartTime',
+ metavar='YYYY-MM-DDThh:mm:ssZ', help='''earliest start time to
+ return scheduled actions for. This is ignored when specific
+ action names are provided.'''),
+ Arg('--end-time', dest='EndTime',
+ metavar='YYYY-MM-DDThh:mm:ssZ', help='''latest start time to
+ return scheduled actions for. This is ignored when specific
+ action names are provided.'''),
Arg('--show-long', action='store_true', route_to=None,
- help="show all of the policies' info")]
- LIST_MARKERS = ['ScalingPolicies', 'Alarms']
+ help="show all of the scheduled actions' info")]
+ LIST_MARKERS = ['ScheduledUpdateGroupActions']
def main(self):
- return PaginatedResponse(self, (None,), ('ScalingPolicies',))
+ return PaginatedResponse(self, (None,),
+ ('ScheduledUpdateGroupActions',))
def prepare_for_page(self, page):
# Pages are defined by NextToken
@@ -55,15 +64,15 @@ class DescribePolicies(AutoScalingRequest, TabifyingCommand):
return response.get('NextToken') or None
def print_result(self, result):
- for policy in result.get('ScalingPolicies', []):
- bits = ['SCALING-POLICY']
- bits.append(policy.get('AutoScalingGroupName'))
- bits.append(policy.get('PolicyName'))
- bits.append(policy.get('ScalingAdjustment'))
+ for action in result.get('ScheduledUpdateGroupActions', []):
+ bits = ['UPDATE-GROUP-ACTION']
+ bits.append(action.get('AutoScalingGroupName'))
+ bits.append(action.get('ScheduledActionName'))
+ bits.append(action.get('StartTime'))
+ bits.append(action.get('Recurrence'))
+ bits.append(action.get('MinSize'))
+ bits.append(action.get('MaxSize'))
+ bits.append(action.get('DesiredCapacity'))
if self.args['show_long']:
- bits.append(policy.get('MinAdjustmentStep'))
- bits.append(policy.get('AdjustmentType'))
- if self.args['show_long']:
- bits.append(policy.get('Cooldown'))
- bits.append(policy.get('PolicyARN'))
+ bits.append(action.get('ScheduledActionARN'))
print self.tabify(bits)
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list