diff options
author | kali <kali@leap.se> | 2012-08-27 07:35:00 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-27 07:35:00 +0900 |
commit | e896190d159342d9819f0ad6f11fe01deb8eb9e5 (patch) | |
tree | 7bd9bdcda57b38baaf9e3ed8d28441617e6386b3 /src/leap/eip/checks.py | |
parent | 10292cac27bc2f10e2b5768c84091a73105bc495 (diff) |
add stubs for eip.checks
will handle pre-init sanity checks for eip connection.
some of this will actually end in more general leap-checks,
but let's keep it alltogether by now.
Diffstat (limited to 'src/leap/eip/checks.py')
-rw-r--r-- | src/leap/eip/checks.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py new file mode 100644 index 00000000..bb588cf7 --- /dev/null +++ b/src/leap/eip/checks.py @@ -0,0 +1,50 @@ +import logging +logger = logging.getLogger(name=__name__) + + +class EIPChecker(object): + """ + Executes all tests needed + to ensure a EIPConnection + can be sucessful + """ + def __init__(self): + pass + + def do_all_checks(self, checker=None): + """ + just runs all tests in a row. + will raise if some error encounter. + catching those exceptions is not + our responsibility at this moment + """ + if not checker: + checker = self + + # let's call all tests + # needed for a sane eip session. + + checker.dump_default_eipconfig() + checker.check_is_there_default_provider() + checker.fetch_definition() + checker.fetch_eip_config() + checker.check_complete_eip_config() + checker.ping_gateway() + + def dump_default_eipconfig(self): + raise NotImplementedError + + def check_is_there_default_provider(self): + raise NotImplementedError + + def fetch_definition(self): + raise NotImplementedError + + def fetch_eip_config(self): + raise NotImplementedError + + def check_complete_eip_config(self): + raise NotImplementedError + + def ping_gateway(self): + raise NotImplementedError |