Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use click 7 #1055

Merged
merged 2 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SoftLayer/CLI/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def cli(env,

@cli.resultcallback()
@environment.pass_env
def output_diagnostics(env, verbose=0, **kwargs):
def output_diagnostics(env, result, verbose=0, **kwargs):
"""Output diagnostic information."""

if verbose > 0:
Expand Down
4 changes: 2 additions & 2 deletions SoftLayer/CLI/vpn/ipsec/subnet/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
type=int,
help='Subnet identifier to add')
@click.option('-t',
'--type',
'--subnet-type',
'--type',
required=True,
type=click.Choice(['internal', 'remote', 'service']),
help='Subnet type to add')
@click.option('-n',
'--network',
'--network-identifier',
'--network',
default=None,
type=NetworkParamType(),
help='Subnet network identifier to create')
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/CLI/vpn/ipsec/subnet/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
type=int,
help='Subnet identifier to remove')
@click.option('-t',
'--type',
'--subnet-type',
'--type',
required=True,
type=click.Choice(['internal', 'remote', 'service']),
help='Subnet type to add')
Expand Down
36 changes: 18 additions & 18 deletions SoftLayer/CLI/vpn/ipsec/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,48 @@
@click.option('--preshared-key',
default=None,
help='Preshared key value')
@click.option('--p1-auth',
'--phase1-auth',
@click.option('--phase1-auth',
allmightyspiff marked this conversation as resolved.
Show resolved Hide resolved
'--p1-auth',
default=None,
type=click.Choice(['MD5', 'SHA1', 'SHA256']),
help='Phase 1 authentication value')
@click.option('--p1-crypto',
'--phase1-crypto',
@click.option('--phase1-crypto',
'--p1-crypto',
default=None,
type=click.Choice(['DES', '3DES', 'AES128', 'AES192', 'AES256']),
help='Phase 1 encryption value')
@click.option('--p1-dh',
'--phase1-dh',
@click.option('--phase1-dh',
'--p1-dh',
default=None,
type=click.Choice(['0', '1', '2', '5']),
help='Phase 1 diffie hellman group value')
@click.option('--p1-key-ttl',
'--phase1-key-ttl',
@click.option('--phase1-key-ttl',
'--p1-key-ttl',
default=None,
type=click.IntRange(120, 172800),
help='Phase 1 key life value')
@click.option('--p2-auth',
'--phase2-auth',
@click.option('--phase2-auth',
'--p2-auth',
default=None,
type=click.Choice(['MD5', 'SHA1', 'SHA256']),
help='Phase 2 authentication value')
@click.option('--p2-crypto',
'--phase2-crypto',
@click.option('--phase2-crypto',
'--p2-crypto',
default=None,
type=click.Choice(['DES', '3DES', 'AES128', 'AES192', 'AES256']),
help='Phase 2 encryption value')
@click.option('--p2-dh',
'--phase2-dh',
@click.option('--phase2-dh',
'--p2-dh',
default=None,
type=click.Choice(['0', '1', '2', '5']),
help='Phase 2 diffie hellman group value')
@click.option('--p2-forward-secrecy',
'--phase2-forward-secrecy',
@click.option('--phase2-forward-secrecy',
'--p2-forward-secrecy',
default=None,
type=click.IntRange(0, 1),
help='Phase 2 perfect forward secrecy value')
@click.option('--p2-key-ttl',
'--phase2-key-ttl',
@click.option('--phase2-key-ttl',
'--p2-key-ttl',
default=None,
type=click.IntRange(120, 172800),
help='Phase 2 key life value')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
install_requires=[
'six >= 1.7.0',
'ptable >= 0.9.2',
'click >= 5, < 7',
'click >= 7',
'requests >= 2.18.4',
'prompt_toolkit >= 0.53',
'pygments >= 2.0.0',
Expand Down
2 changes: 1 addition & 1 deletion tests/CLI/modules/user_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_edit_perms_on(self):

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

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