machine type added for different architectures

This commit is contained in:
Volkan Şahin 2016-08-12 15:10:30 +03:00
parent d6f48fd511
commit a124e0919f
2 changed files with 14 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[BASE] [BASE]
logconfigurationfilepath = /etc/ahenk/log.conf logconfigurationfilepath = /etc/ahenk/log.conf
dbPath=/etc/ahenk/ahenk.db dbpath = /etc/ahenk/ahenk.db
[PLUGIN] [PLUGIN]
pluginfolderpath = /opt/ahenk/plugins/ pluginfolderpath = /opt/ahenk/plugins/
@ -8,7 +8,7 @@ mainmodulename = main
[CONNECTION] [CONNECTION]
uid = uid =
password= password =
host = host =
port = 5222 port = 5222
receiverjid = lider_sunucu receiverjid = lider_sunucu
@ -20,3 +20,6 @@ receivefileparam = /tmp/
agreement_timeout = 30 agreement_timeout = 30
registration_timeout = 30 registration_timeout = 30
get_policy_timeout = 30 get_policy_timeout = 30
[MACHINE]
type = default

View file

@ -468,6 +468,14 @@ class System:
return arr return arr
@staticmethod
def machine_type():
config = configparser.ConfigParser()
config._interpolation = configparser.ExtendedInterpolation()
config.read(System.Ahenk.config_path())
return config.get('MACHINE', 'type')
@staticmethod @staticmethod
def interfaces_details(): def interfaces_details():
return psutil.net_if_addrs() return psutil.net_if_addrs()
@ -531,3 +539,4 @@ class System:
@staticmethod @staticmethod
def model(): def model():
return cpuinfo.get_cpu_info()['model'] return cpuinfo.get_cpu_info()['model']