Skip to content

Commit d63f92a

Browse files
Merge pull request #1055 from felixonmars/new-click
Update to use click 7
2 parents 17cae65 + 3b76899 commit d63f92a

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

SoftLayer/CLI/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def cli(env,
137137

138138
@cli.resultcallback()
139139
@environment.pass_env
140-
def output_diagnostics(env, verbose=0, **kwargs):
140+
def output_diagnostics(env, result, verbose=0, **kwargs):
141141
"""Output diagnostic information."""
142142

143143
if verbose > 0:

SoftLayer/CLI/vpn/ipsec/subnet/add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
type=int,
1919
help='Subnet identifier to add')
2020
@click.option('-t',
21-
'--type',
2221
'--subnet-type',
22+
'--type',
2323
required=True,
2424
type=click.Choice(['internal', 'remote', 'service']),
2525
help='Subnet type to add')
2626
@click.option('-n',
27-
'--network',
2827
'--network-identifier',
28+
'--network',
2929
default=None,
3030
type=NetworkParamType(),
3131
help='Subnet network identifier to create')

SoftLayer/CLI/vpn/ipsec/subnet/remove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
type=int,
1717
help='Subnet identifier to remove')
1818
@click.option('-t',
19-
'--type',
2019
'--subnet-type',
20+
'--type',
2121
required=True,
2222
type=click.Choice(['internal', 'remote', 'service']),
2323
help='Subnet type to add')

SoftLayer/CLI/vpn/ipsec/update.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,48 @@
2020
@click.option('--preshared-key',
2121
default=None,
2222
help='Preshared key value')
23-
@click.option('--p1-auth',
24-
'--phase1-auth',
23+
@click.option('--phase1-auth',
24+
'--p1-auth',
2525
default=None,
2626
type=click.Choice(['MD5', 'SHA1', 'SHA256']),
2727
help='Phase 1 authentication value')
28-
@click.option('--p1-crypto',
29-
'--phase1-crypto',
28+
@click.option('--phase1-crypto',
29+
'--p1-crypto',
3030
default=None,
3131
type=click.Choice(['DES', '3DES', 'AES128', 'AES192', 'AES256']),
3232
help='Phase 1 encryption value')
33-
@click.option('--p1-dh',
34-
'--phase1-dh',
33+
@click.option('--phase1-dh',
34+
'--p1-dh',
3535
default=None,
3636
type=click.Choice(['0', '1', '2', '5']),
3737
help='Phase 1 diffie hellman group value')
38-
@click.option('--p1-key-ttl',
39-
'--phase1-key-ttl',
38+
@click.option('--phase1-key-ttl',
39+
'--p1-key-ttl',
4040
default=None,
4141
type=click.IntRange(120, 172800),
4242
help='Phase 1 key life value')
43-
@click.option('--p2-auth',
44-
'--phase2-auth',
43+
@click.option('--phase2-auth',
44+
'--p2-auth',
4545
default=None,
4646
type=click.Choice(['MD5', 'SHA1', 'SHA256']),
4747
help='Phase 2 authentication value')
48-
@click.option('--p2-crypto',
49-
'--phase2-crypto',
48+
@click.option('--phase2-crypto',
49+
'--p2-crypto',
5050
default=None,
5151
type=click.Choice(['DES', '3DES', 'AES128', 'AES192', 'AES256']),
5252
help='Phase 2 encryption value')
53-
@click.option('--p2-dh',
54-
'--phase2-dh',
53+
@click.option('--phase2-dh',
54+
'--p2-dh',
5555
default=None,
5656
type=click.Choice(['0', '1', '2', '5']),
5757
help='Phase 2 diffie hellman group value')
58-
@click.option('--p2-forward-secrecy',
59-
'--phase2-forward-secrecy',
58+
@click.option('--phase2-forward-secrecy',
59+
'--p2-forward-secrecy',
6060
default=None,
6161
type=click.IntRange(0, 1),
6262
help='Phase 2 perfect forward secrecy value')
63-
@click.option('--p2-key-ttl',
64-
'--phase2-key-ttl',
63+
@click.option('--phase2-key-ttl',
64+
'--p2-key-ttl',
6565
default=None,
6666
type=click.IntRange(120, 172800),
6767
help='Phase 2 key life value')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
install_requires=[
3333
'six >= 1.7.0',
3434
'ptable >= 0.9.2',
35-
'click >= 5, < 7',
35+
'click >= 7',
3636
'requests >= 2.18.4',
3737
'prompt_toolkit >= 0.53',
3838
'pygments >= 2.0.0',

tests/CLI/modules/user_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_edit_perms_on(self):
129129

130130
def test_edit_perms_on_bad(self):
131131
result = self.run_command(['user', 'edit-permissions', '11100', '--enable', '-p', 'TEST_NOt_exist'])
132-
self.assertEqual(result.exit_code, -1)
132+
self.assertEqual(result.exit_code, 1)
133133

134134
def test_edit_perms_off(self):
135135
result = self.run_command(['user', 'edit-permissions', '11100', '--disable', '-p', 'TEST'])

0 commit comments

Comments
 (0)