[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:55 UTC 2013
The following commit has been merged in the master branch:
commit ccf5f80b0100e51c53f39f42e7554323623b05e2
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Sun Mar 31 18:56:40 2013 -0700
Implement DescribeInstanceHealth
Fixes TOOLS-251
diff --git a/bin/euelb-describe-instance-health b/bin/euelb-describe-instance-health
new file mode 100755
index 0000000..2d3c417
--- /dev/null
+++ b/bin/euelb-describe-instance-health
@@ -0,0 +1,6 @@
+#!/usr/bin/python -tt
+
+import euca2ools.commands.elasticloadbalancing.describeinstancehealth
+
+if __name__ == '__main__':
+ euca2ools.commands.elasticloadbalancing.describeinstancehealth.DescribeInstanceHealth.run()
diff --git a/euca2ools/commands/elasticloadbalancing/deregisterinstancesfromloadbalancer.py b/euca2ools/commands/elasticloadbalancing/describeinstancehealth.py
similarity index 66%
copy from euca2ools/commands/elasticloadbalancing/deregisterinstancesfromloadbalancer.py
copy to euca2ools/commands/elasticloadbalancing/describeinstancehealth.py
index cdab494..900c3bf 100644
--- a/euca2ools/commands/elasticloadbalancing/deregisterinstancesfromloadbalancer.py
+++ b/euca2ools/commands/elasticloadbalancing/describeinstancehealth.py
@@ -38,17 +38,23 @@ def instance(inst_as_str):
return {'InstanceId': inst_as_str}
-class DeregisterInstancesFromLoadBalancer(ELBRequest, TabifyingCommand):
- DESCRIPTION = 'Remove one or more instances from a load balancer'
- ARGS = [Arg('LoadBalancerName', metavar='ELB',
- help='name of the load balancer to modify (required)'),
- Arg('--instances', dest='Instances.member', required=True,
+class DescribeInstanceHealth(ELBRequest, TabifyingCommand):
+ DESCRIPTION = 'Show the state of instances registered with a load balancer'
+ ARGS = [Arg('LoadBalancerName', metavar='ELB', help='''name of the load
+ balancer the to describe instances for (required)'''),
+ Arg('--instances', dest='Instances.member',
metavar='INSTANCE1,INSTANCE2,...',
type=delimited_list(',', item_type=instance),
- help='''IDs of the instances to remove from the load balancer
- (required)''')]
- LIST_TAGS = ['Instances']
+ help='limit results to specific instances'),
+ Arg('--show-long', action='store_true', route_to=None,
+ help="show all of the instances' info")]
+ LIST_TAGS = ['InstanceStates']
def print_result(self, result):
- for instance in result.get('Instances', []):
- print self.tabify(('INSTANCE', instance.get('InstanceId')))
+ for instance in result.get('InstanceStates', []):
+ bits = ['INSTANCE', instance.get('InstanceId'),
+ instance.get('State')]
+ if self.args['show_long']:
+ bits.append(instance.get('Description'))
+ bits.append(instance.get('ReasonCode'))
+ print self.tabify(bits)
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list