From 3e2e6990f8b139334fddca6e163a8a74e66ebc7a Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Mon, 3 Oct 2022 10:29:37 +0300 Subject: [PATCH] fix: jans-linux-setup-typo --- jans-linux-setup/docs/README.md | 2 +- jans-linux-setup/jans_setup/jans_setup.py | 2 +- .../setup_app/data/package_list.json | 20 +++++++++---------- .../jans_setup/setup_app/installers/jans.py | 2 +- .../jans_setup/setup_app/installers/jetty.py | 2 +- .../jans_setup/setup_app/installers/jre.py | 2 +- .../jans_setup/setup_app/installers/jython.py | 2 +- .../jans_setup/setup_app/static.py | 2 +- .../setup_app/utils/package_utils.py | 16 +++++++-------- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jans-linux-setup/docs/README.md b/jans-linux-setup/docs/README.md index e3523ab7da4..c4d03dfea3f 100644 --- a/jans-linux-setup/docs/README.md +++ b/jans-linux-setup/docs/README.md @@ -219,7 +219,7 @@ class SampleInstaller(JettyInstaller): # services, for example, systemctl start application self.app_type = static.AppType.SERVICE # enumartiation for application type, etiher APPLICATION or SERVICE - self.install_type = static.InstallOption.OPTONAL # enumartiation for installation type, etiher MONDATORY or OPTONAL + self.install_type = static.InstallOption.OPTONAL # enumartiation for installation type, etiher MANDATORY or OPTONAL self.install_var = 'installApplication' # variale defined in Config to determine if thi application is going to be installed or not self.register_progess() # we need to register to progress indicator so that it will shows status of installation during installation process diff --git a/jans-linux-setup/jans_setup/jans_setup.py b/jans-linux-setup/jans_setup/jans_setup.py index 0e8038c70be..5ed22013900 100755 --- a/jans-linux-setup/jans_setup/jans_setup.py +++ b/jans-linux-setup/jans_setup/jans_setup.py @@ -330,7 +330,7 @@ class PostSetup: service_name = 'post-setup' install_var = 'installPostSetup' app_type = static.AppType.APPLICATION - install_type = static.InstallOption.MONDATORY + install_type = static.InstallOption.MANDATORY jansProgress.register(PostSetup) diff --git a/jans-linux-setup/jans_setup/setup_app/data/package_list.json b/jans-linux-setup/jans_setup/setup_app/data/package_list.json index 2bf5114fe0d..5a9a3f538d9 100644 --- a/jans-linux-setup/jans_setup/setup_app/data/package_list.json +++ b/jans-linux-setup/jans_setup/setup_app/data/package_list.json @@ -1,52 +1,52 @@ { "red 7": { "optional": "", - "mondatory": "httpd httpd-mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", + "mandatory": "httpd httpd-mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel-yaml", "certifi":"python3-certifi", "pymysql":"python3-PyMySQL", "Crypto": "python3-cryptography", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "red 8": { "optional": "", - "mondatory": "httpd mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", + "mandatory": "httpd mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel-yaml", "certifi":"python3-certifi", "pymysql":"python3-PyMySQL", "Crypto": "python3-cryptography", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "centos 7": { "optional": "", - "mondatory": "httpd mod_ssl curl mod_auth_openidc wget tar xz unzip bzip2 rsyslog python3-certifi", + "mandatory": "httpd mod_ssl curl mod_auth_openidc wget tar xz unzip bzip2 rsyslog python3-certifi", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel-yaml", "pymysql":"python3-PyMySQL", "Crypto": "python3-cryptography", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "centos 8": { "optional": "", - "mondatory": "httpd mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", + "mandatory": "httpd mod_ssl mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel-yaml", "certifi":"python3-certifi", "pymysql":"python3-PyMySQL", "Crypto": "python3-cryptography", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "suse 15": { "optional": "", - "mondatory": "apache2 apache2-mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", + "mandatory": "apache2 apache2-mod_auth_openidc curl wget tar xz unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "certifi":"python3-certifi", "pymysql":"python3-PyMySQL", "Crypto": "python3-cryptography", "prompt_toolkit": "python3-prompt_toolkit", "psycopg2":"python3-psycopg2"} }, "debian 11": { "optional": "", - "mondatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", + "mandatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "certifi":"python3-certifi", "pymysql":"python3-pymysql", "cryptography":"python3-cryptography", "distutils.util": "python3-distutils", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "debian 10": { "optional": "", - "mondatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", + "mandatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "certifi":"python3-certifi", "pymysql":"python3-pymysql", "Crypto": "python3-crypto", "distutils.util": "python3-distutils", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "debian 9": { "optional": "", - "mondatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", + "mandatory": "apache2 curl wget tar xz-utils unzip rsyslog bzip2", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "certifi":"python3-certifi", "pymysql":"python3-pymysql", "Crypto": "python3-crypto", "distutils.util": "python3-distutils", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "ubuntu 20": { "optional": "", - "mondatory": "apache2 curl wget xz-utils unzip rsyslog bzip2 python3-urllib3 python3-certifi", + "mandatory": "apache2 curl wget xz-utils unzip rsyslog bzip2 python3-urllib3 python3-certifi", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "pymysql":"python3-pymysql", "Crypto": "python3-crypto", "distutils.util": "python3-distutils", "prompt_toolkit": "python3-prompt-toolkit", "psycopg2":"python3-psycopg2"} }, "ubuntu 22": { "optional": "", - "mondatory": "apache2 curl wget xz-utils unzip rsyslog bzip2 python3-urllib3 python3-certifi", + "mandatory": "apache2 curl wget xz-utils unzip rsyslog bzip2 python3-urllib3 python3-certifi", "python": {"ldap3":"python3-ldap3", "requests":"python3-requests", "ruamel.yaml":"python3-ruamel.yaml", "pymysql":"python3-pymysql", "cryptography":"python3-cryptography", "distutils.util": "python3-distutils", "prompt_toolkit": "python3-prompt-toolkit", "certifi":"python3-certifi", "psycopg2":"python3-psycopg2"} } } diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jans.py b/jans-linux-setup/jans_setup/setup_app/installers/jans.py index 33f7bc5385a..31e7c537037 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jans.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jans.py @@ -99,7 +99,7 @@ def __repr__(self): def initialize(self): self.service_name = 'jans' self.app_type = AppType.APPLICATION - self.install_type = InstallOption.MONDATORY + self.install_type = InstallOption.MANDATORY jansProgress.register(self) Config.install_time_ldap = time.strftime('%Y%m%d%H%M%SZ', time.gmtime(time.time())) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jetty.py b/jans-linux-setup/jans_setup/setup_app/installers/jetty.py index a846219fb4d..bd45bfe0ec8 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jetty.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jetty.py @@ -34,7 +34,7 @@ def __init__(self): self.needdb = False # we don't need backend connection in this class self.install_var = 'installJetty' self.app_type = AppType.APPLICATION - self.install_type = InstallOption.MONDATORY + self.install_type = InstallOption.MANDATORY if not base.snap: self.register_progess() self.jetty_user_home = '/home/jetty' diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jre.py b/jans-linux-setup/jans_setup/setup_app/installers/jre.py index a6dfc0227f3..92b52754508 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jre.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jre.py @@ -25,7 +25,7 @@ def __init__(self): self.needdb = False # we don't need backend connection in this class self.install_var = 'installJre' self.app_type = AppType.APPLICATION - self.install_type = InstallOption.MONDATORY + self.install_type = InstallOption.MANDATORY if not base.snap: self.register_progess() diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jython.py b/jans-linux-setup/jans_setup/setup_app/installers/jython.py index 6245b8b82a2..dee5e470794 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jython.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jython.py @@ -21,7 +21,7 @@ def __init__(self): self.service_name = 'jython' self.install_var = 'installJython' self.app_type = AppType.APPLICATION - self.install_type = InstallOption.MONDATORY + self.install_type = InstallOption.MANDATORY if not base.snap: self.register_progess() diff --git a/jans-linux-setup/jans_setup/setup_app/static.py b/jans-linux-setup/jans_setup/setup_app/static.py index b3030b8017a..dd5d772aba8 100644 --- a/jans-linux-setup/jans_setup/setup_app/static.py +++ b/jans-linux-setup/jans_setup/setup_app/static.py @@ -38,7 +38,7 @@ class AppType: SERVICE = 2 class InstallOption: - MONDATORY = 1 + MANDATORY = 1 OPTONAL = 2 class SetupProfiles: diff --git a/jans-linux-setup/jans_setup/setup_app/utils/package_utils.py b/jans-linux-setup/jans_setup/setup_app/utils/package_utils.py index 51588ad1eca..d8999979729 100644 --- a/jans-linux-setup/jans_setup/setup_app/utils/package_utils.py +++ b/jans-linux-setup/jans_setup/setup_app/utils/package_utils.py @@ -48,24 +48,24 @@ def check_and_install_packages(self): install_command, update_command, query_command, check_text = self.get_install_commands() - install_list = {'mondatory': [], 'optional': []} + install_list = {'mandatory': [], 'optional': []} package_list = base.get_os_package_list() os_type_version = base.os_type + ' ' + base.os_version if base.argsp.local_rdbm == 'mysql' or (Config.get('rdbm_install_type') == InstallTypes.LOCAL and Config.rdbm_type == 'mysql'): - package_list[os_type_version]['mondatory'] += ' mysql-server' + package_list[os_type_version]['mandatory'] += ' mysql-server' if base.argsp.local_rdbm == 'pgsql' or (Config.get('rdbm_install_type') == InstallTypes.LOCAL and Config.rdbm_type == 'pgsql'): - package_list[os_type_version]['mondatory'] += ' postgresql python3-psycopg2' + package_list[os_type_version]['mandatory'] += ' postgresql python3-psycopg2' if base.clone_type == 'deb': - package_list[os_type_version]['mondatory'] += ' postgresql-contrib' + package_list[os_type_version]['mandatory'] += ' postgresql-contrib' for pypackage in package_list[os_type_version]['python']: try: importlib.import_module(pypackage) except: - package_list[os_type_version]['mondatory'] += ' ' + package_list[os_type_version]['python'][pypackage] + package_list[os_type_version]['mandatory'] += ' ' + package_list[os_type_version]['python'][pypackage] for install_type in install_list: for package in package_list[os_type_version][install_type].split(): @@ -80,20 +80,20 @@ def check_and_install_packages(self): self.logIt('Package {0} was not installed'.format(package_query)) install_list[install_type].append(package_query) - install = {'mondatory': True, 'optional': False} + install = {'mandatory': True, 'optional': False} for install_type in install_list: if install_list[install_type]: packages = " ".join(install_list[install_type]) - if install_type == 'mondatory': + if install_type == 'mandatory': print("The following packages are required for Janssen Server") print(packages) if not base.argsp.n: r = input("Do you want to install these now? [Y/n] ") if r and r.lower()=='n': install[install_type] = False - if install_type == 'mondatory': + if install_type == 'mandatory': print("Can not proceed without installing required packages. Exiting ...") sys.exit()