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


The following commit has been merged in the master branch:
commit 2ba4865d065567664163fa7cdd953d7e984845c5
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Tue Apr 30 17:31:48 2013 -0700

    Fix auto-scaling tag help strings

diff --git a/euca2ools/commands/autoscaling/arghelpers.py b/euca2ools/commands/autoscaling/arghelpers.py
index de4a484..266f78f 100644
--- a/euca2ools/commands/autoscaling/arghelpers.py
+++ b/euca2ools/commands/autoscaling/arghelpers.py
@@ -28,22 +28,24 @@
 # 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.argtypes import autoscaling_tag_def
+from requestbuilder import Arg
 
 
 class TagArg(Arg):
     def __init__(self, required=False):
-        super(TagArg, self).__init__('--tag', dest='Tags.member',
-                                     type=autoscaling_tag_def,
-                                     action='append', required=required,
-                                     metavar=('"k=VALUE, id=VALUE, t=VALUE, '
-                                              'v=VALUE, p={true,false}"'), help=('''
-                tags to create or update.  Tags follow the following format:
-                "id=resource-name, t=resource-type, k=tag-key, v=tag-val,
-                p=propagate-at-launch-flag", where k is the tag's name, v is
-                the tag's value, id is a resource ID, t is a resource type, and
-                p is whether to propagate tags to instances created by the new
-                group.  A value for 'k=' is required for each tag.  The
-                remainders are optional.'''))
+        helpstr = '''attributes of a tag to affect.  Tags follow the following
+        format: "id=resource-name, t=resource-type, k=tag-key, v=tag-val,
+        p=propagate-at-launch-flag", where k is the tag's name, v is the tag's
+        value, id is a resource ID, t is a resource type, and p is whether to
+        propagate tags to instances created by the group.  A value for 'k=' is
+        required for each tag.  The rest are optional.  This argument may be
+        used more than once.  Each time affects a different tag.'''
+
+        if required:
+            helpstr += '  (at least 1 required)'
+
+        Arg.__init__(self, '--tag', dest='Tags.member', required=required,
+                     action='append', type=autoscaling_tag_def, help=helpstr,
+                     metavar=('"k=VALUE, id=VALUE, t=VALUE, v=VALUE, '
+                              'p={true,false}"'))
diff --git a/euca2ools/commands/autoscaling/createorupdatetags.py b/euca2ools/commands/autoscaling/createorupdatetags.py
index c41736e..0cb69cf 100644
--- a/euca2ools/commands/autoscaling/createorupdatetags.py
+++ b/euca2ools/commands/autoscaling/createorupdatetags.py
@@ -28,11 +28,10 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-from euca2ools.commands.argtypes import delimited_list
 from euca2ools.commands.autoscaling import AutoScalingRequest
 from euca2ools.commands.autoscaling.arghelpers import TagArg
 
 
 class CreateOrUpdateTags(AutoScalingRequest):
-    DESCRIPTION = 'Creates new tags or updates existing tags'
+    DESCRIPTION = 'Create or update one or more resource tags'
     ARGS = [TagArg(required=True)]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list