summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-02-01 14:49:45 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-23 00:40:31 +0100
commit1d4a3d68869dd9c416b104399097a6bb0c1bace3 (patch)
tree9afc38280e17a84e55184f064cf34f1a490ac539 /src/leap/bitmask/cli
parent6d1d18faec5caa60c26b8245f0ab17c63d0b80d8 (diff)
[feature] new commands: get_cert
Diffstat (limited to 'src/leap/bitmask/cli')
-rw-r--r--src/leap/bitmask/cli/command.py6
-rw-r--r--src/leap/bitmask/cli/eip.py14
2 files changed, 14 insertions, 6 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index 0e70d2e7..ff213a35 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -116,7 +116,11 @@ class Command(object):
if self.print_json:
print(json.dumps(obj, indent=2))
elif not obj['error']:
- return printer(obj['result'])
+ if not obj['result']:
+ print (Fore.RED + 'ERROR: malformed response, expected'
+ ' obj["result"]' + Fore.RESET)
+ else:
+ return printer(obj['result'])
else:
print Fore.RED + 'ERROR:' + '%s' % obj['error'] + Fore.RESET
diff --git a/src/leap/bitmask/cli/eip.py b/src/leap/bitmask/cli/eip.py
index eac8682a..5fb240cd 100644
--- a/src/leap/bitmask/cli/eip.py
+++ b/src/leap/bitmask/cli/eip.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# eip
-# Copyright (C) 2016 LEAP
+# Copyright (C) 2016-2017 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,14 +24,18 @@ class Eip(command.Command):
service = 'eip'
usage = '''{name} eip <subcommand>
-Bitmask Encrypted Internet Service
+Bitmask Encrypted Internet Proxy Service
SUBCOMMANDS:
- start Start service
- stop Stop service
+ enable Enable EIP Service
+ disable Disable EIP Service
+ check Check whether EIP service is properly configured
+ get_cert Get EIP Certificate from provider
+ start Start EIP
+ stop Stop EIP
status Display status about service
'''.format(name=command.appname)
- commands = ['start', 'stop', 'status']
+ commands = ['start', 'stop', 'status', 'check', 'get_cert']