Hi all,
i´m trying to use the migrate_to_password function in the (form) valuespec definition to migrate already existing pre 2.3 special agent configs with a password to work with the new 2.3 Password Formspec.
When i enable the ruleset, i get the following error message:
WARNING: Config creation for special agent netappeseries failed on simulator_explicitpassword: Got invalid argument list from SSC plugin: (‘password’, ‘Passwort’) at index 3 in [‘-u’, ‘monitor’, ‘–password-id’, (‘password’, ‘Passwort’), ‘127.0.0.1’]. Expected either str or Secret.
The old ruleset coming from 2.2 :
special_agents['netappeseries'] = [
{'id': 'ae7891fc-cf93-4f32-b2db-feb8aaa77b63', 'value': {'user': 'monitor', 'password': ('password', 'Passwort')}, 'condition': {'host_name': ['simulator_explicitpassword']}, 'options': {'disabled': False}},
] + special_agents['netappeseries']
This is the valuespec:
"password": DictElement(
parameter_form=Password(
title=Title("Password"),
custom_validate=(LengthInRange(min_value=1),),
migrate=migrate_to_password,
),
required=True
I tried it like this in the server side call, but i´m getting an assertion error:
assert isinstance(secret := params["password"], Secret)
args: list[str | Secret] = [
"-u", params["user"],
"--password-id", secret,
]
Any idea, what i´m doing wrong ?
Thank you ![]()