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


The following commit has been merged in the master branch:
commit 824ef89ef915f391f3a851caa1f2029da9cba33a
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Wed Feb 27 15:16:35 2013 -0800

    Implement SetDesiredCapacity
    
    Fixes TOOLS-206

diff --git a/bin/kilo-set-desired-capacity b/bin/kilo-set-desired-capacity
new file mode 100755
index 0000000..46cc281
--- /dev/null
+++ b/bin/kilo-set-desired-capacity
@@ -0,0 +1,6 @@
+#!/usr/bin/python -tt
+
+import euca2ools.commands.autoscaling.setdesiredcapacity
+
+if __name__ == '__main__':
+    euca2ools.commands.autoscaling.setdesiredcapacity.SetDesiredCapacity.run()
diff --git a/euca2ools/commands/autoscaling/deleteautoscalinggroup.py b/euca2ools/commands/autoscaling/setdesiredcapacity.py
similarity index 68%
copy from euca2ools/commands/autoscaling/deleteautoscalinggroup.py
copy to euca2ools/commands/autoscaling/setdesiredcapacity.py
index d11061c..d76d75e 100644
--- a/euca2ools/commands/autoscaling/deleteautoscalinggroup.py
+++ b/euca2ools/commands/autoscaling/setdesiredcapacity.py
@@ -28,18 +28,21 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-import argparse
 from requestbuilder import Arg
 from euca2ools.commands.autoscaling import AutoScalingRequest
 
 
-class DeleteAutoScalingGroup(AutoScalingRequest):
-    DESCRIPTION = 'Delete an auto-scaling group'
+class SetDesiredCapacity(AutoScalingRequest):
+    DESCRIPTION = "Set an auto-scaling group's desired capacity"
     ARGS = [Arg('AutoScalingGroupName', metavar='NAME',
-                help='name of the auto-scaling group to delete (required)'),
-            Arg('-d', '--force-delete', dest='ForceDelete',
+                help='name of the auto-scaling group to update (required)'),
+            Arg('-c', '--desired-capacity', dest='DesiredCapacity', type=int,
+                required=True,
+                help='new capacity setting for the group (required)'),
+            Arg('-h', '--honor-cooldown', dest='HonorCooldown',
                 action='store_const', const='true',
-                help='''delete the group and all of its instances without
-                waiting for all instances to terminate'''),
-            Arg('-f', '--force', action='store_true', route_to=None,
-                help=argparse.SUPPRESS)]  # for compatibility
+                help='''reject the request if the group is in cooldown
+                (default: override any cooldown period)'''),
+            Arg('-H', '--no-honor-cooldown', dest='HonorCooldown',
+                action='store_const', const='false',
+                help='override any cooldown period (this is the default)')]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list