From 034df8d783ee6eac2b99615cabd6dfac8dfd8598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20=C3=87AKMAK?= Date: Wed, 26 Sep 2018 15:02:49 +0300 Subject: [PATCH 1/4] receiverjid and agreement default values changed --- config/ahenk.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ahenk.conf b/config/ahenk.conf index 449a65b..5f85a72 100644 --- a/config/ahenk.conf +++ b/config/ahenk.conf @@ -12,7 +12,7 @@ password = host = port = 5222 use_tls = false -receiverjid = +receiverjid = lider_sunucu receiverresource = servicename = receivefileparam = /tmp/ @@ -24,5 +24,5 @@ get_policy_timeout = 30 [MACHINE] type = default -agreement = 1 +agreement = 2 From 093e4328624954a3cbffa1b146102757deff9cc3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Sep 2018 17:07:16 +0300 Subject: [PATCH 2/4] Method for getting device language and getting computer model for showing Ahenk informations on Lider Console are added to core. --- src/base/registration/registration.py | 3 ++- src/base/system/system.py | 8 ++++++++ src/base/util/util.py | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/base/registration/registration.py b/src/base/registration/registration.py index cbe6271..7c7e9f2 100644 --- a/src/base/registration/registration.py +++ b/src/base/registration/registration.py @@ -136,7 +136,8 @@ class Registration: 'hardware.usbDevices': str(System.Hardware.usb_devices()), 'hardware.printers': str(System.Hardware.printers()), 'hardware.systemDefinitions': str(System.Hardware.system_definitions()), - 'hardware.memory.total': System.Hardware.Memory.total(), + 'hardware.model.version': str(System.Hardware.machine_model()), + 'hardware.memory.total': System.Hardware.Memory.total(), 'hardware.network.ipAddresses': str(System.Hardware.Network.ip_addresses()), 'sessions.userNames': str(System.Sessions.user_name()), 'bios.releaseDate': System.BIOS.release_date()[1].replace('\n', '') if System.BIOS.release_date()[ diff --git a/src/base/system/system.py b/src/base/system/system.py index 7473586..42d7b7a 100644 --- a/src/base/system/system.py +++ b/src/base/system/system.py @@ -573,6 +573,14 @@ class System: if len(list(set(line.split(' ')).intersection(['Manufacturer:', 'Product']))) > 0: arr.append(line) return arr + + @staticmethod + def machine_model(): + try: + result_code, p_out, p_err = Util.execute('sudo dmidecode --string system-version') + return str(p_out) + except: + raise @staticmethod def machine_type(): diff --git a/src/base/util/util.py b/src/base/util/util.py index 04cf066..87e908b 100644 --- a/src/base/util/util.py +++ b/src/base/util/util.py @@ -291,6 +291,11 @@ class Util: def generate_uuid(): return str(uuid.uuid4()) + @staticmethod + def get_language(): + locale_info = locale.getdefaultlocale() + return locale_info[0] + @staticmethod def set_permission(path, permission_code): Util.execute('chmod -R {0} {1}'.format(permission_code, path)) From 7a20169d7652dd1263b39578dd7e0e6a25abfa2a Mon Sep 17 00:00:00 2001 From: hasankara Date: Wed, 26 Sep 2018 17:15:01 +0300 Subject: [PATCH 3/4] Method for getting device language and getting computer model for showing Ahenk informations on Lider Console are added to core. --- src/base/registration/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/registration/registration.py b/src/base/registration/registration.py index 7c7e9f2..b455712 100644 --- a/src/base/registration/registration.py +++ b/src/base/registration/registration.py @@ -137,7 +137,7 @@ class Registration: 'hardware.printers': str(System.Hardware.printers()), 'hardware.systemDefinitions': str(System.Hardware.system_definitions()), 'hardware.model.version': str(System.Hardware.machine_model()), - 'hardware.memory.total': System.Hardware.Memory.total(), + 'hardware.memory.total': System.Hardware.Memory.total(), 'hardware.network.ipAddresses': str(System.Hardware.Network.ip_addresses()), 'sessions.userNames': str(System.Sessions.user_name()), 'bios.releaseDate': System.BIOS.release_date()[1].replace('\n', '') if System.BIOS.release_date()[ From 32f08110ff804f4b73d375c368b1f47dd932f6e5 Mon Sep 17 00:00:00 2001 From: hasankara Date: Thu, 27 Sep 2018 14:23:08 +0300 Subject: [PATCH 4/4] tab is removed --- src/base/system/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/system/system.py b/src/base/system/system.py index 42d7b7a..5696515 100644 --- a/src/base/system/system.py +++ b/src/base/system/system.py @@ -573,8 +573,8 @@ class System: if len(list(set(line.split(' ')).intersection(['Manufacturer:', 'Product']))) > 0: arr.append(line) return arr - - @staticmethod + + @staticmethod def machine_model(): try: result_code, p_out, p_err = Util.execute('sudo dmidecode --string system-version')