[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:17 UTC 2013
The following commit has been merged in the master branch:
commit 3f9de0bef6f24baa97429ada97cc27c5bef3baac
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Tue May 7 14:35:40 2013 -0700
Complain when HTTP health check targets lack paths
Fixes TOOLS-304
diff --git a/euca2ools/commands/elasticloadbalancing/configurehealthcheck.py b/euca2ools/commands/elasticloadbalancing/configurehealthcheck.py
index ae62d51..253338d 100644
--- a/euca2ools/commands/elasticloadbalancing/configurehealthcheck.py
+++ b/euca2ools/commands/elasticloadbalancing/configurehealthcheck.py
@@ -30,6 +30,7 @@
from euca2ools.commands.elasticloadbalancing import ELBRequest
from requestbuilder import Arg
+from requestbuilder.exceptions import ArgumentError
from requestbuilder.mixins import TabifyingCommand
@@ -56,6 +57,17 @@ class ConfigureHealthCheck(ELBRequest, TabifyingCommand):
help='''number of consecutive failed health checks that will
mark instances as Unhealthy (required)''')]
+ def configure(self):
+ ELBRequest.configure(self)
+ target = self.args['HealthCheck.Target']
+ protocol, __, rest = target.partition(':')
+ if not rest:
+ raise ArgumentError('argument -t/--target: must have form '
+ 'PROTOCOL:PORT[/PATH]')
+ if protocol.lower() in ('http', 'https') and '/' not in rest:
+ raise ArgumentError('argument -t/--target: path is required for '
+ "protocol '{0}'".format(protocol))
+
def print_result(self, result):
check = result.get('HealthCheck', {})
print self.tabify(('HEALTH_CHECK', check.get('Target'),
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list