[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:40 UTC 2013


The following commit has been merged in the master branch:
commit 267319c2e7c27249c2587f4961a172660ba126c6
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Thu Mar 7 21:20:03 2013 -0800

    Clean up auto-scaling metavars and formatting
    
    Fixes TOOLS-277

diff --git a/euca2ools/commands/autoscaling/__init__.py b/euca2ools/commands/autoscaling/__init__.py
index 72a0187..dfabe91 100644
--- a/euca2ools/commands/autoscaling/__init__.py
+++ b/euca2ools/commands/autoscaling/__init__.py
@@ -28,12 +28,13 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+from euca2ools.commands import Euca2ools
 from euca2ools.exceptions import AWSError
 from requestbuilder import Arg, SERVICE
 import requestbuilder.auth
 import requestbuilder.service
 import requestbuilder.request
-from .. import Euca2ools
+
 
 class AutoScaling(requestbuilder.service.BaseService):
     NAME = 'autoscaling'
@@ -45,6 +46,7 @@ class AutoScaling(requestbuilder.service.BaseService):
     def handle_http_error(self, response):
         raise AWSError(response)
 
+
 class AutoScalingRequest(requestbuilder.request.AWSQueryRequest):
     SUITE = Euca2ools
     SERVICE_CLASS = AutoScaling
diff --git a/euca2ools/commands/autoscaling/argtypes.py b/euca2ools/commands/autoscaling/argtypes.py
index 40d29d4..84b30ba 100644
--- a/euca2ools/commands/autoscaling/argtypes.py
+++ b/euca2ools/commands/autoscaling/argtypes.py
@@ -28,6 +28,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+
 def autoscaling_tag_def(tag_str):
     tag_dict = {}
     pieces = ','.split(tag_str)
@@ -54,5 +55,5 @@ def autoscaling_tag_def(tag_str):
             raise ValueError("unrecognized tag segment '{0}'".format(piece))
     if not tag_dict.get('Key'):
         raise ValueError(
-                "tag '{0}' must contain a 'k=' segment with a non-empty value")
+            "tag '{0}' must contain a 'k=' segment with a non-empty value")
     return tag_dict
diff --git a/euca2ools/commands/autoscaling/createautoscalinggroup.py b/euca2ools/commands/autoscaling/createautoscalinggroup.py
index b7b6a21..bed62cd 100644
--- a/euca2ools/commands/autoscaling/createautoscalinggroup.py
+++ b/euca2ools/commands/autoscaling/createautoscalinggroup.py
@@ -28,15 +28,15 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from euca2ools.commands.autoscaling.argtypes import autoscaling_tag_def
+from requestbuilder import Arg
 
 
 class CreateAutoScalingGroup(AutoScalingRequest):
     DESCRIPTION = 'Create a new auto-scaling group'
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the new auto-scaling group (required)'),
             Arg('-l', '--launch-configuration', dest='LaunchConfigurationName',
                 metavar='LAUNCHCONFIG', required=True, help='''name of the
@@ -60,7 +60,7 @@ class CreateAutoScalingGroup(AutoScalingRequest):
                 choices=('EC2', 'ELB'),
                 help='service to obtain health check status from'),
             Arg('--load-balancers', dest='LoadBalancerNames.member',
-                metavar='ELB,ELB,...', type=delimited_list(','),
+                metavar='ELB1,ELB2,...', type=delimited_list(','),
                 help='comma-separated list of load balancers to use'),
             Arg('--placement-group', dest='PlacementGroup',
                 help='placement group in which to launch new instances'),
@@ -75,15 +75,15 @@ class CreateAutoScalingGroup(AutoScalingRequest):
                 group.  A value for 'k=' is required for each tag.  The
                 remainders are optional.''')),
             Arg('--termination-policies', dest='TerminationPolicies.member',
-                metavar='POLICY,POLICY,...', type=delimited_list(','),
+                metavar='POLICY1,POLICY2,...', type=delimited_list(','),
                 help='''ordered list of termination policies.  The first has
                 the highest precedence.'''),
             Arg('--vpc-zone-identifier', dest='VPCZoneIdentifier',
-                metavar='ZONE,ZONE,...',
+                metavar='ZONE1,ZONE2,...',
                 help='''comma-separated list of subnet identifiers.  If you
                 specify availability zones as well, ensure the subnets'
                 availability zones match the ones you specified'''),
             Arg('-z', '--availability-zones', dest='AvailabilityZones.member',
-                metavar='ZONE,ZONE,...', type=delimited_list(','),
+                metavar='ZONE1,ZONE2,...', type=delimited_list(','),
                 help='''comma-separated list of availability zones for the new
                 group (required unless subnets are supplied)''')]
diff --git a/euca2ools/commands/autoscaling/createlaunchconfiguration.py b/euca2ools/commands/autoscaling/createlaunchconfiguration.py
index e68670c..91eed7d 100644
--- a/euca2ools/commands/autoscaling/createlaunchconfiguration.py
+++ b/euca2ools/commands/autoscaling/createlaunchconfiguration.py
@@ -28,9 +28,11 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg, MutuallyExclusiveArgList
-from euca2ools.commands.argtypes import delimited_list, ec2_block_device_mapping
+from euca2ools.commands.argtypes import (delimited_list,
+                                         ec2_block_device_mapping)
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg, MutuallyExclusiveArgList
+
 
 class CreateLaunchConfiguration(AutoScalingRequest):
     DESCRIPTION = 'Create a new auto-scaling instance launch configuration'
@@ -43,18 +45,19 @@ class CreateLaunchConfiguration(AutoScalingRequest):
                 required=True,
                 help='instance type for use for instances (required)'),
             Arg('--block-device-mapping', dest='BlockDeviceMappings.member',
-                metavar='DEVICE=MAPPED,DEVICE=MAPPED,...',
-                type=delimited_list(','),
-                help='''a comma-separated list of block device mappings for the
-                image, in the form form DEVICE=MAPPED, where "MAPPED" is "none",
-                "ephemeral(0-3)", or "[SNAP-ID]:[SIZE]:[true|false]'''),
+                metavar='DEVICE1=MAPPED1,DEVICE2=MAPPED2,...',
+                type=delimited_list(','), help='''a comma-separated list of
+                block device mappings for the image, in the form DEVICE=MAPPED,
+                where "MAPPED" is "none", "ephemeral(0-3)", or
+                "[SNAP-ID]:[SIZE]:[true|false]'''),
             Arg('--ebs-optimized', dest='EbsOptimized', action='store_const',
                 const='true',
                 help='whether the instance is optimized for EBS I/O'),
-            Arg('--group', metavar='GROUP,GROUP,...', type=delimited_list(','),
-                route_to=None, help='''a comma-separated list of security
-                groups with which to associate instances.  Either all group
-                names or all group IDs are allowed, but not both.'''),
+            Arg('--group', metavar='GROUP1,GROUP2,...',
+                type=delimited_list(','), route_to=None,
+                help='''a comma-separated list of security groups with which
+                to associate instances.  Either all group names or all group
+                IDs are allowed, but not both.'''),
             Arg('--iam-instance-profile', dest='IamInstanceProfile',
                 metavar='PROFILE', help='''ARN of the instance profile
                 associated with instances' IAM roles'''),
@@ -76,8 +79,8 @@ class CreateLaunchConfiguration(AutoScalingRequest):
                 Arg('--user-data', dest='UserData', metavar='DATA',
                     help='data to make available to instances'),
                 Arg('--user-data-file', dest='UserData', metavar='FILE',
-                    type=open, help='''file containing data to make available to
-                    instances'''))]
+                    type=open, help='''file containing data to make available
+                    to instances'''))]
 
     def preprocess(self):
         if self.args.get('block_device_mapping'):
diff --git a/euca2ools/commands/autoscaling/deleteautoscalinggroup.py b/euca2ools/commands/autoscaling/deleteautoscalinggroup.py
index d11061c..c4cea71 100644
--- a/euca2ools/commands/autoscaling/deleteautoscalinggroup.py
+++ b/euca2ools/commands/autoscaling/deleteautoscalinggroup.py
@@ -29,13 +29,13 @@
 # POSSIBILITY OF SUCH DAMAGE.
 
 import argparse
-from requestbuilder import Arg
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class DeleteAutoScalingGroup(AutoScalingRequest):
     DESCRIPTION = 'Delete an auto-scaling group'
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to delete (required)'),
             Arg('-d', '--force-delete', dest='ForceDelete',
                 action='store_const', const='true',
diff --git a/euca2ools/commands/autoscaling/deletelaunchconfiguration.py b/euca2ools/commands/autoscaling/deletelaunchconfiguration.py
index 61a1dac..60331ce 100644
--- a/euca2ools/commands/autoscaling/deletelaunchconfiguration.py
+++ b/euca2ools/commands/autoscaling/deletelaunchconfiguration.py
@@ -29,8 +29,9 @@
 # POSSIBILITY OF SUCH DAMAGE.
 
 import argparse
-from requestbuilder import Arg
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
+
 
 class DeleteLaunchConfiguration(AutoScalingRequest):
     DESCRIPTION = 'Delete an auto-scaling instance launch configuration'
diff --git a/euca2ools/commands/autoscaling/deletepolicy.py b/euca2ools/commands/autoscaling/deletepolicy.py
index e0d13ad..2371171 100644
--- a/euca2ools/commands/autoscaling/deletepolicy.py
+++ b/euca2ools/commands/autoscaling/deletepolicy.py
@@ -38,7 +38,8 @@ class DeletePolicy(AutoScalingRequest):
     ARGS = [Arg('PolicyName', metavar='POLICY',
                 help='name of the policy to delete (required)'),
             Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName',
-                metavar='ASGROUP', required=True, help='''name of the
-                auto-scaling group the policy is associated with (required)'''),
+                metavar='ASGROUP', required=True,
+                help='''name of the auto-scaling group the policy is associated
+                with (required)'''),
             Arg('-f', '--force', route_to=None, action='store_true',
                 help=argparse.SUPPRESS)]  # for compatibility
diff --git a/euca2ools/commands/autoscaling/describeadjustmenttypes.py b/euca2ools/commands/autoscaling/describeadjustmenttypes.py
index d09d6cd..f64cb71 100644
--- a/euca2ools/commands/autoscaling/describeadjustmenttypes.py
+++ b/euca2ools/commands/autoscaling/describeadjustmenttypes.py
@@ -31,6 +31,7 @@
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from requestbuilder.mixins import TabifyingCommand
 
+
 class DescribeAdjustmentTypes(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = ('Describe policy adjustment types usable with scaling '
                    'policies')
diff --git a/euca2ools/commands/autoscaling/describeautoscalinggroups.py b/euca2ools/commands/autoscaling/describeautoscalinggroups.py
index 23d1431..b903c52 100644
--- a/euca2ools/commands/autoscaling/describeautoscalinggroups.py
+++ b/euca2ools/commands/autoscaling/describeautoscalinggroups.py
@@ -33,6 +33,7 @@ from requestbuilder import Arg
 from requestbuilder.mixins import TabifyingCommand
 from requestbuilder.response import PaginatedResponse
 
+
 class DescribeAutoScalingGroups(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'Describe auto-scaling groups'
     ARGS = [Arg('AutoScalingGroupNames.member', metavar='ASGROUP',
diff --git a/euca2ools/commands/autoscaling/describeautoscalinginstances.py b/euca2ools/commands/autoscaling/describeautoscalinginstances.py
index 1317822..9b23a93 100644
--- a/euca2ools/commands/autoscaling/describeautoscalinginstances.py
+++ b/euca2ools/commands/autoscaling/describeautoscalinginstances.py
@@ -34,6 +34,7 @@ from requestbuilder import Arg
 from requestbuilder.mixins import TabifyingCommand
 from requestbuilder.response import PaginatedResponse
 
+
 class DescribeAutoScalingInstances(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'Describe instances in auto-scaling groups'
     ARGS = [Arg('InstanceIds.member', metavar='INSTANCE', nargs='*',
diff --git a/euca2ools/commands/autoscaling/describeautoscalingnotificationtypes.py b/euca2ools/commands/autoscaling/describeautoscalingnotificationtypes.py
index f3480bc..e2e7818 100644
--- a/euca2ools/commands/autoscaling/describeautoscalingnotificationtypes.py
+++ b/euca2ools/commands/autoscaling/describeautoscalingnotificationtypes.py
@@ -31,6 +31,7 @@
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from requestbuilder.mixins import TabifyingCommand
 
+
 class DescribeAutoScalingNotificationTypes(AutoScalingRequest,
                                            TabifyingCommand):
     DESCRIPTION = 'List all notification types supported by the service'
diff --git a/euca2ools/commands/autoscaling/describelaunchconfigurations.py b/euca2ools/commands/autoscaling/describelaunchconfigurations.py
index 83e9f26..61357c5 100644
--- a/euca2ools/commands/autoscaling/describelaunchconfigurations.py
+++ b/euca2ools/commands/autoscaling/describelaunchconfigurations.py
@@ -33,6 +33,7 @@ from requestbuilder import Arg
 from requestbuilder.mixins import TabifyingCommand
 from requestbuilder.response import PaginatedResponse
 
+
 class DescribeLaunchConfigurations(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'Describe auto-scaling instance launch configurations'
     ARGS = [Arg('LaunchConfigurationNames.member', metavar='LAUNCHCONFIG',
@@ -71,7 +72,8 @@ class DescribeLaunchConfigurations(AutoScalingRequest, TabifyingCommand):
                     bits.append(None)
                 bits.append(','.join(config.get('SecurityGroups', [])) or None)
                 bits.append(config.get('CreatedTime'))
-                bits.append(config.get('InstanceMonitoring', {}).get('Enabled'))
+                bits.append(config.get('InstanceMonitoring', {}).get(
+                    'Enabled'))
                 bits.append(config.get('LaunchConfigurationARN'))
             bits.append(config.get('SpotPrice'))
             bits.append(config.get('IamInstanceProfile'))
@@ -87,5 +89,6 @@ def convert_block_mapping_to_str(mapping):
     elif mapping.get('VirtualName'):
         mapped = mapping['VirtualName']
     else:
-        raise ValueError('unexpected block device mapping: {0}'.format(mapping))
+        raise ValueError('unexpected block device mapping: {0}'.format(
+            mapping))
     return mapping['DeviceName'] + '=' + mapped
diff --git a/euca2ools/commands/autoscaling/describemetriccollectiontypes.py b/euca2ools/commands/autoscaling/describemetriccollectiontypes.py
index eaa2a2d..d9c5cac 100644
--- a/euca2ools/commands/autoscaling/describemetriccollectiontypes.py
+++ b/euca2ools/commands/autoscaling/describemetriccollectiontypes.py
@@ -31,6 +31,7 @@
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from requestbuilder.mixins import TabifyingCommand
 
+
 class DescribeMetricCollectionTypes(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'Describe auto-scaling metrics and granularities'
     LIST_MARKERS = ['Metrics', 'Granularities']
diff --git a/euca2ools/commands/autoscaling/describenotificationconfigurations.py b/euca2ools/commands/autoscaling/describenotificationconfigurations.py
index 4525200..67346f6 100644
--- a/euca2ools/commands/autoscaling/describenotificationconfigurations.py
+++ b/euca2ools/commands/autoscaling/describenotificationconfigurations.py
@@ -33,6 +33,7 @@ from requestbuilder import Arg
 from requestbuilder.mixins import TabifyingCommand
 from requestbuilder.response import PaginatedResponse
 
+
 class DescribeNotificationConfigurations(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = ('Describe notification actions associated with '
                    'auto-scaling groups')
@@ -42,7 +43,8 @@ class DescribeNotificationConfigurations(AutoScalingRequest, TabifyingCommand):
     LIST_MARKERS = ['NotificationConfigurations']
 
     def main(self):
-        return PaginatedResponse(self, (None,), ('NotificationConfigurations',))
+        return PaginatedResponse(self, (None,),
+                                 ('NotificationConfigurations',))
 
     def prepare_for_page(self, page):
         # Pages are defined by NextToken
diff --git a/euca2ools/commands/autoscaling/describescalingprocesstypes.py b/euca2ools/commands/autoscaling/describescalingprocesstypes.py
index 0fa8ffd..15e867c 100644
--- a/euca2ools/commands/autoscaling/describescalingprocesstypes.py
+++ b/euca2ools/commands/autoscaling/describescalingprocesstypes.py
@@ -31,6 +31,7 @@
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from requestbuilder.mixins import TabifyingCommand
 
+
 class DescribeScalingProcessTypes(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'List all types of scaling processes'
     LIST_MARKERS = ['Processes']
diff --git a/euca2ools/commands/autoscaling/describeterminationpolicytypes.py b/euca2ools/commands/autoscaling/describeterminationpolicytypes.py
index da19795..a8e2d3d 100644
--- a/euca2ools/commands/autoscaling/describeterminationpolicytypes.py
+++ b/euca2ools/commands/autoscaling/describeterminationpolicytypes.py
@@ -31,6 +31,7 @@
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from requestbuilder.mixins import TabifyingCommand
 
+
 class DescribeTerminationPolicyTypes(AutoScalingRequest, TabifyingCommand):
     DESCRIPTION = 'List all termination policies supported by the service'
     LIST_MARKERS = ['TerminationPolicyTypes']
diff --git a/euca2ools/commands/autoscaling/disablemetricscollection.py b/euca2ools/commands/autoscaling/disablemetricscollection.py
index a29572b..78b9084 100644
--- a/euca2ools/commands/autoscaling/disablemetricscollection.py
+++ b/euca2ools/commands/autoscaling/disablemetricscollection.py
@@ -28,9 +28,9 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class DisableMetricsCollection(AutoScalingRequest):
@@ -38,5 +38,5 @@ class DisableMetricsCollection(AutoScalingRequest):
     ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('-m', '--metrics', dest='Metrics.member',
-                metavar='METRIC,METRIC,...', type=delimited_list(','),
+                metavar='METRIC1,METRIC2,...', type=delimited_list(','),
                 help='list of metrics to disable (default: all metrics)')]
diff --git a/euca2ools/commands/autoscaling/enablemetricscollection.py b/euca2ools/commands/autoscaling/enablemetricscollection.py
index 767ac08..08bb2c8 100644
--- a/euca2ools/commands/autoscaling/enablemetricscollection.py
+++ b/euca2ools/commands/autoscaling/enablemetricscollection.py
@@ -28,9 +28,9 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class EnableMetricsCollection(AutoScalingRequest):
@@ -40,5 +40,5 @@ class EnableMetricsCollection(AutoScalingRequest):
             Arg('-g', '--granularity', dest='Granularity', required=True,
                 help='granularity at which to collect metrics (required)'),
             Arg('-m', '--metrics', dest='Metrics.member',
-                metavar='METRIC,METRIC,...', type=delimited_list(','),
+                metavar='METRIC1,METRIC2,...', type=delimited_list(','),
                 help='list of metrics to collect (default: all metrics)')]
diff --git a/euca2ools/commands/autoscaling/putnotificationconfiguration.py b/euca2ools/commands/autoscaling/putnotificationconfiguration.py
index 0c59619..059b997 100644
--- a/euca2ools/commands/autoscaling/putnotificationconfiguration.py
+++ b/euca2ools/commands/autoscaling/putnotificationconfiguration.py
@@ -28,9 +28,9 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class PutNotificationConfiguration(AutoScalingRequest):
@@ -39,9 +39,9 @@ class PutNotificationConfiguration(AutoScalingRequest):
     ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('-n', '--notification-types', dest='NotificationTypes.member',
-                metavar='TYPE,TYPE,...', type=delimited_list(','),
+                metavar='TYPE1,TYPE2,...', type=delimited_list(','),
                 required=True, help=('''comma-separated list of event types
                 that will trigger notification (required)''')),
-            Arg('-t', '--topic-arn', dest='TopicARN', metavar='ARN',
+            Arg('-t', '--topic-arn', dest='TopicARN', metavar='TOPIC',
                 required=True, help='''ARN of the SNS topic to publish
                 notifications to (required)''')]
diff --git a/euca2ools/commands/autoscaling/putscalingpolicy.py b/euca2ools/commands/autoscaling/putscalingpolicy.py
index 7eb4c11..fd3cac7 100644
--- a/euca2ools/commands/autoscaling/putscalingpolicy.py
+++ b/euca2ools/commands/autoscaling/putscalingpolicy.py
@@ -28,9 +28,9 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class PutScalingPolicy(AutoScalingRequest):
@@ -38,12 +38,14 @@ class PutScalingPolicy(AutoScalingRequest):
     ARGS = [Arg('PolicyName', metavar='POLICY',
                 help='name of the policy to create or update (required)'),
             Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName',
-                metavar='ASGROUP', required=True, help='''name of the
-                auto-scaling group the policy is associated with (required)'''),
-            Arg('-a', '--adjustment', dest='ScalingAdjustment', metavar='SCALE',
-                type=int, required=True, help='''amount to scale the group's
-                capacity of the group.  Use a negative value, as in
-                "--adjustment=-1", to decrease capacity. (required)'''),
+                metavar='ASGROUP', required=True,
+                help='''name of the auto-scaling group the policy is associated
+                with (required)'''),
+            Arg('-a', '--adjustment', dest='ScalingAdjustment',
+                metavar='SCALE', type=int, required=True,
+                help='''amount to scale the group's capacity of the group.  Use
+                a negative value, as in "--adjustment=-1", to decrease
+                capacity. (required)'''),
             Arg('-t', '--type', dest='AdjustmentType', required=True,
                 choices=('ChangeInCapacity', 'ExactCapacity',
                          'PercentChangeInCapacity'), help='''whether the
@@ -52,7 +54,8 @@ class PutScalingPolicy(AutoScalingRequest):
                 number or a percentage of current capacity.  (required)'''),
             Arg('--cooldown', dest='Cooldown', metavar='SECONDS', type=int,
                 help='''waiting period after successful auto-scaling activities
-                during which later auto-scaling activities will not execute'''),
+                during which later auto-scaling activities will not
+                execute'''),
             Arg('-s', '--min-adjustment-step', dest='MinAdjustmentStep',
                 type=int, metavar='PERCENT',
                 help='''for a PercentChangeInCapacity type policy, guarantee
diff --git a/euca2ools/commands/autoscaling/putscheduledupdategroupaction.py b/euca2ools/commands/autoscaling/putscheduledupdategroupaction.py
index 26a26c2..b618f7a 100644
--- a/euca2ools/commands/autoscaling/putscheduledupdategroupaction.py
+++ b/euca2ools/commands/autoscaling/putscheduledupdategroupaction.py
@@ -34,11 +34,11 @@ from requestbuilder import Arg
 
 class PutScheduledUpdateGroupAction(AutoScalingRequest):
     DESCRIPTION = 'Schedule a scaling action for an auto-scaling group'
-    ARGS = [Arg('ScheduledActionName', metavar='NAME',
+    ARGS = [Arg('ScheduledActionName', metavar='ACTION',
                 help='name of the new scheduled action'),
             Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName',
-                metavar='ASGROUP', required=True, help='''auto-scaling group the
-                new action should affect (required)'''),
+                metavar='ASGROUP', required=True, help='''auto-scaling group
+                the new action should affect (required)'''),
             Arg('-b', '--start-time', dest='StartTime',
                 metavar='YYYY-MM-DDThh:mm:ssZ',
                 help='time for this action to start'),
@@ -46,8 +46,8 @@ class PutScheduledUpdateGroupAction(AutoScalingRequest):
                 metavar='YYYY-MM-DDThh:mm:ssZ',
                 help='time for this action to end'),
             Arg('-r', '--recurrence', dest='Recurrence',
-                metavar='"MIN HOUR DATE MONTH DAY"', help='''time when recurring
-                future actions will start, in crontab format'''),
+                metavar='"MIN HOUR DATE MONTH DAY"', help='''time when
+                recurring future actions will start, in crontab format'''),
             Arg('--desired-capacity', dest='DesiredCapacity', metavar='COUNT',
                 type=int, help='new capacity setting for the group'),
             Arg('--max-size', dest='MaxSize', metavar='COUNT', type=int,
diff --git a/euca2ools/commands/autoscaling/resumeprocesses.py b/euca2ools/commands/autoscaling/resumeprocesses.py
index 6bf8859..59394c2 100644
--- a/euca2ools/commands/autoscaling/resumeprocesses.py
+++ b/euca2ools/commands/autoscaling/resumeprocesses.py
@@ -28,16 +28,16 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class ResumeProcesses(AutoScalingRequest):
     DESCRIPTION = "Resume an auto-scaling group's auto-scaling processes"
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('--processes', dest='ScalingProcesses.member',
-                metavar='PROCESS,PROCESS,...', type=delimited_list(','),
+                metavar='PROCESS1,PROCESS2,...', type=delimited_list(','),
                 help='''comma-separated list of auto-scaling processes to
                 resume (default: all processes)''')]
diff --git a/euca2ools/commands/autoscaling/setdesiredcapacity.py b/euca2ools/commands/autoscaling/setdesiredcapacity.py
index d76d75e..1c3e3b0 100644
--- a/euca2ools/commands/autoscaling/setdesiredcapacity.py
+++ b/euca2ools/commands/autoscaling/setdesiredcapacity.py
@@ -28,13 +28,13 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class SetDesiredCapacity(AutoScalingRequest):
     DESCRIPTION = "Set an auto-scaling group's desired capacity"
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('-c', '--desired-capacity', dest='DesiredCapacity', type=int,
                 required=True,
diff --git a/euca2ools/commands/autoscaling/setinstancehealth.py b/euca2ools/commands/autoscaling/setinstancehealth.py
index 95c493d..2de4bc5 100644
--- a/euca2ools/commands/autoscaling/setinstancehealth.py
+++ b/euca2ools/commands/autoscaling/setinstancehealth.py
@@ -28,8 +28,8 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class SetInstanceHealth(AutoScalingRequest):
@@ -37,11 +37,12 @@ class SetInstanceHealth(AutoScalingRequest):
     ARGS = [Arg('InstanceId', metavar='INSTANCE',
                 help='ID of the instance to update (required)'),
             Arg('-s', '--status', dest='HealthStatus', required=True,
-                choices=('Healthy', 'Unhealthy'), help='new status (required)'),
+                choices=('Healthy', 'Unhealthy'),
+                help='new status (required)'),
             Arg('--respect-grace-period', dest='ShouldRespectGracePeriod',
                 action='store_const', const='true',
-                help="""respect the associated auto-scaling group's grace period
-                (this is the default)"""),
+                help="""respect the associated auto-scaling group's grace
+                period (this is the default)"""),
             Arg('--no-respect-grace-period', dest='ShouldRespectGracePeriod',
                 action='store_const', const='false',
                 help="""ignore the associated auto-scaling group's grace period
diff --git a/euca2ools/commands/autoscaling/suspendprocesses.py b/euca2ools/commands/autoscaling/suspendprocesses.py
index 4d677f1..8c30684 100644
--- a/euca2ools/commands/autoscaling/suspendprocesses.py
+++ b/euca2ools/commands/autoscaling/suspendprocesses.py
@@ -28,16 +28,16 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class SuspendProcesses(AutoScalingRequest):
     DESCRIPTION = "Suspend an auto-scaling group's auto-scaling processes"
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('--processes', dest='ScalingProcesses.member',
-                metavar='PROCESS,PROCESS,...', type=delimited_list(','),
+                metavar='PROCESS1,PROCESS2,...', type=delimited_list(','),
                 help='''comma-separated list of auto-scaling processes to
                 suspend (default: all processes)''')]
diff --git a/euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py b/euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
index d2ce3f5..037f0c2 100644
--- a/euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
+++ b/euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
@@ -34,7 +34,8 @@ from requestbuilder import Arg, MutuallyExclusiveArgList
 from requestbuilder.mixins import TabifyingCommand
 
 
-class TerminateInstanceInAutoScalingGroup(AutoScalingRequest, TabifyingCommand):
+class TerminateInstanceInAutoScalingGroup(AutoScalingRequest,
+                                          TabifyingCommand):
     DESCRIPTION = "Manually terminate an auto-scaling instance"
     ARGS = [Arg('InstanceId', metavar='INSTANCE',
                 help='ID of the instance to terminate (required)'),
@@ -43,11 +44,12 @@ class TerminateInstanceInAutoScalingGroup(AutoScalingRequest, TabifyingCommand):
                     dest='ShouldDecrementDesiredCapacity', const='true',
                     help='''also reduce the desired capacity of the
                     auto-scaling group by 1'''),
-                Arg('-D', '--no-decrement-desired-capacity', const='false',
-                    dest='ShouldDecrementDesiredCapacity', action='store_const',
+                Arg('-D', '--no-decrement-desired-capacity',
+                    dest='ShouldDecrementDesiredCapacity',
+                    action='store_const', const='false',
                     help='''leave the auto-scaling group's desired capacity
-                            as-is.  A new instance will be launched to
-                            compensate for this one.''')),
+                    as-is.  A new instance may be launched to compensate for
+                    the one being terminated.''')),
             Arg('--show-long', action='store_true', route_to=None,
                 help='show extra info about the instance being terminated'),
             Arg('-f', '--force', action='store_true', route_to=None,
diff --git a/euca2ools/commands/autoscaling/updateautoscalinggroup.py b/euca2ools/commands/autoscaling/updateautoscalinggroup.py
index e0e2b9f..d6e200f 100644
--- a/euca2ools/commands/autoscaling/updateautoscalinggroup.py
+++ b/euca2ools/commands/autoscaling/updateautoscalinggroup.py
@@ -28,14 +28,14 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from requestbuilder import Arg
 from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
+from requestbuilder import Arg
 
 
 class UpdateAutoScalingGroup(AutoScalingRequest):
     DESCRIPTION = "Update an auto-scaling group's parameters"
-    ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
+    ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP',
                 help='name of the auto-scaling group to update (required)'),
             Arg('--default-cooldown', dest='DefaultCooldown',
                 metavar='SECONDS', type=int,
@@ -61,15 +61,15 @@ class UpdateAutoScalingGroup(AutoScalingRequest):
             Arg('--placement-group', dest='PlacementGroup',
                 help='placement group in which to launch new instances'),
             Arg('--termination-policies', dest='TerminationPolicies.member',
-                metavar='POLICY,POLICY,...', type=delimited_list(','),
+                metavar='POLICY1,POLICY2,...', type=delimited_list(','),
                 help='''ordered list of termination policies.  The first has
                 the highest precedence.'''),
             Arg('--vpc-zone-identifier', dest='VPCZoneIdentifier',
-                metavar='ZONE,ZONE,...',
+                metavar='ZONE1,ZONE2,...',
                 help='''comma-separated list of subnet identifiers.  If you
                 specify availability zones as well, ensure the subnets'
                 availability zones match the ones you specified'''),
             Arg('-z', '--availability-zones', dest='AvailabilityZones.member',
-                metavar='ZONE,ZONE,...', type=delimited_list(','),
+                metavar='ZONE1,ZONE2,...', type=delimited_list(','),
                 help='''comma-separated list of availability zones for the new
                 group (required unless subnets are supplied)''')]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list