improve parameter initialisation

- make 'value' a Parameter property instead of an attribute
- use 'value' instead of 'default' property for setting
  the initial value in the config file
- removal of initwrite parameter property

this change is the basis of a better implementation
for change 30041 (PersistentParam property 'override_cfg')

Change-Id: I2b82bdd54c2dacb87dcd2b3472004d2f0a730cf0
This commit is contained in:
2023-01-19 11:03:04 +01:00
parent 82957c287d
commit f4e974f46c
9 changed files with 82 additions and 102 deletions

View File

@ -62,7 +62,7 @@ class ServerStub:
class ModuleTest(Module):
def __init__(self, updates=None, **opts):
opts['description'] = ''
opts = {p: {'default': val} for p, val in opts.items()}
opts = {p: {'value': val} for p, val in opts.items()}
super().__init__('mod', logger, opts, ServerStub(updates or {}))