mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-09 20:02:20 +03:00
machine type added for different architectures
This commit is contained in:
parent
d6f48fd511
commit
a124e0919f
2 changed files with 14 additions and 2 deletions
|
@ -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
|
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in a new issue