Skip to content

Commit e33da43

Browse files
Merge pull request #1427 from caberos/issue1426
Allow modifying Timeout for LoadBalancers
2 parents 0558eab + 5d88288 commit e33da43

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

SoftLayer/CLI/loadbal/pools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def add(env, identifier, **args):
8484
@click.option('--method', '-m', help="Balancing Method",
8585
type=click.Choice(['ROUNDROBIN', 'LEASTCONNECTION', 'WEIGHTED_RR']))
8686
@click.option('--connections', '-c', type=int, help="Maximum number of connections to allow.")
87+
@click.option('--clientTimeout', '-t', type=int,
88+
help="maximum idle time in seconds(Range: 1 to 7200).")
8789
@click.option('--sticky', '-s', is_flag=True, callback=sticky_option, help="Make sessions sticky based on source_ip.")
8890
@click.option('--sslCert', '-x', help="SSL certificate ID. See `slcli ssl list`")
8991
@environment.pass_env
@@ -108,6 +110,7 @@ def edit(env, identifier, listener, **args):
108110
'method': 'loadBalancingMethod',
109111
'connections': 'maxConn',
110112
'sticky': 'sessionType',
113+
'clienttimeout': 'clientTimeout',
111114
'sslcert': 'tlsCertificateId'
112115
}
113116

SoftLayer/fixtures/SoftLayer_Network_LBaaS_LoadBalancer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
],
4949
'listeners': [
5050
{
51+
'clientTimeout': 15,
5152
'defaultPool': {
5253
'healthMonitor': {
5354
'uuid': '222222ab-bbcc-4f32-9b31-1b6d3a1959c8'
@@ -97,6 +98,7 @@
9798
'protocolPort': 110,
9899
'provisioningStatus': 'ACTIVE',
99100
'tlsCertificateId': None,
101+
'clientTimeout': 30,
100102
'uuid': 'a509723d-a3cb-4ae4-bc5b-5ecf04f890ff'}
101103
],
102104
'members': [

tests/CLI/modules/loadbal_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_delete_pool(self):
4949

5050
def test_edit_pool(self):
5151
result = self.run_command(['loadbal', 'pool-edit', '111111', '370a9f12-b3be-47b3-bfa5-8e460010000', '-f 510',
52-
'-b 256', '-c 5'])
52+
'-b 256', '-c 5', '-t 10'])
5353
self.assert_no_fail(result)
5454

5555
def test_add_7p(self):

0 commit comments

Comments
 (0)