diff --git a/libraclient/v1_1/loadbalancer.py b/libraclient/v1_1/loadbalancer.py index 57bd437..4a13686 100644 --- a/libraclient/v1_1/loadbalancer.py +++ b/libraclient/v1_1/loadbalancer.py @@ -66,8 +66,8 @@ class LoadBalancer(Resource): def delete_node(self, node): return self.manager.delete_node(self, node) - def update_monitor(self, type_='CONNECT', delay=30, timeout=30, - attempts=2, path=None): + def update_monitor(self, type_, delay, timeout, + attempts, path=None): return self.manager.update_monitor( self, type_=type_, delay=delay, timeout=timeout, attempts=attempts, path=path) @@ -257,8 +257,8 @@ class LoadBalancerManager(Manager): url = '/loadbalancers/%s/healthmonitor' % getid(lb) return self._get(url, obj_class=Monitor) - def update_monitor(self, lb, type_='CONNECT', delay=30, timeout=30, - attempts=2, path=None): + def update_monitor(self, lb, type_, delay, timeout, + attempts, path=None): """ Update a Monitor in a LoadBalancer @@ -272,7 +272,7 @@ class LoadBalancerManager(Manager): data = {} data['type'] = type_ if timeout > delay: - raise ValueError('Timeout can\'t be greater then Delay') + raise ValueError('Timeout can\'t be greater than Delay') data['delay'] = delay data['timeout'] = timeout data['attemptsBeforeDeactivation'] = attempts diff --git a/libraclient/v1_1/shell.py b/libraclient/v1_1/shell.py index 78c5948..91cbe5c 100644 --- a/libraclient/v1_1/shell.py +++ b/libraclient/v1_1/shell.py @@ -246,26 +246,22 @@ def do_monitor_show(cs, args): @cliutils.arg( '--type', choices=['CONNECT', 'HTTP'], - default='CONNECT', - help='health monitor type') + help='health monitor type', required=True) @cliutils.arg( '--delay', type=int, - default=30, metavar='SECONDS', - help='time between health monitor calls') + help='time between health monitor calls', required=True) @cliutils.arg( '--timeout', type=int, - default=30, metavar='SECONDS', - help='time to wait before monitor times out') + help='time to wait before monitor times out', required=True) @cliutils.arg( '--attempts', type=int, - default=2, metavar='COUNT', - help='connection attempts before marking node as bad') + help='connection attempts before marking node as bad', required=True) @cliutils.arg( '--path', help='URI path for health check')