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]
logconfigurationfilepath = /etc/ahenk/log.conf
dbPath=/etc/ahenk/ahenk.db
dbpath = /etc/ahenk/ahenk.db
[PLUGIN]
pluginfolderpath = /opt/ahenk/plugins/
@ -20,3 +20,6 @@ receivefileparam = /tmp/
agreement_timeout = 30
registration_timeout = 30
get_policy_timeout = 30
[MACHINE]
type = default

View file

@ -468,6 +468,14 @@ class System:
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
def interfaces_details():
return psutil.net_if_addrs()
@ -531,3 +539,4 @@ class System:
@staticmethod
def model():
return cpuinfo.get_cpu_info()['model']