diff options
Diffstat (limited to 'tools/sdv/SoftwarePreValid')
-rwxr-xr-x | tools/sdv/SoftwarePreValid/__init__.py | 1 | ||||
-rw-r--r-- | tools/sdv/SoftwarePreValid/airship.py | 20 | ||||
-rw-r--r-- | tools/sdv/SoftwarePreValid/swprevalidator.py | 1 |
3 files changed, 12 insertions, 10 deletions
diff --git a/tools/sdv/SoftwarePreValid/__init__.py b/tools/sdv/SoftwarePreValid/__init__.py index e29c0af..8307b66 100755 --- a/tools/sdv/SoftwarePreValid/__init__.py +++ b/tools/sdv/SoftwarePreValid/__init__.py @@ -15,4 +15,5 @@ """Sw Validator interface and helpers. """ +# flake8: noqa from SoftwarePreValid.swprevalidator import * diff --git a/tools/sdv/SoftwarePreValid/airship.py b/tools/sdv/SoftwarePreValid/airship.py index 902b654..bd93aa2 100644 --- a/tools/sdv/SoftwarePreValid/airship.py +++ b/tools/sdv/SoftwarePreValid/airship.py @@ -25,6 +25,7 @@ import yaml from conf import settings from SoftwarePreValid import swprevalidator + def check_link(link): """ Function the check the availability of Hyperlinks @@ -53,6 +54,7 @@ def check_link(link): return False return True + class Airship(swprevalidator.ISwPreValidator): """ Ariship Sw Validation @@ -119,8 +121,6 @@ class Airship(swprevalidator.ISwPreValidator): else: print("The Link: %s is INVALID" % (location)) - - # pylint: disable=consider-using-enumerate def find_locations(self, yamlfile): """ @@ -174,16 +174,16 @@ class Airship(swprevalidator.ISwPreValidator): 'maas.yaml') with open(os_filename, 'r') as osref: osfiles = yaml.load_all(osref, Loader=yaml.FullLoader) - for osfile in osfiles: - if ('data' in osfile and - 'values' in osfile['data'] and - 'conf' in osfile['data']['values'] and - 'maas' in osfile['data']['values']['conf'] and - 'images' in osfile['data']['values']['conf']['maas'] and + for osf in osfiles: + if ('data' in osf and + 'values' in osf['data'] and + 'conf' in osf['data']['values'] and + 'maas' in osf['data']['values']['conf'] and + 'images' in osf['data']['values']['conf']['maas'] and ('default_os' in - osfile['data']['values']['conf']['maas']['images'])): + osf['data']['values']['conf']['maas']['images'])): if (settings.getValue('OPERATING_SYSTEM') in - osfile['data']['values']['conf']['maas']['images'][ + osf['data']['values']['conf']['maas']['images'][ 'default_os']): print('Operating System is VALID') os_done = True diff --git a/tools/sdv/SoftwarePreValid/swprevalidator.py b/tools/sdv/SoftwarePreValid/swprevalidator.py index 485fc2b..bef141b 100644 --- a/tools/sdv/SoftwarePreValid/swprevalidator.py +++ b/tools/sdv/SoftwarePreValid/swprevalidator.py @@ -17,6 +17,7 @@ Abstract class for Software Prevalidations. Implementors, please inherit from this class. """ + class ISwPreValidator(): """ Model for a Sw Validator """ def __init__(self): |