Special Agent for Postgres RDS is not working in 2.2.p9

Hi guys i am having problem with this plugin , after upgrade the problem is

ile “/omd/sites/site/local/share/check_mk/checks/agent_rdspostgres”, line 6, in agent_rdspostgres_arguments
return “%s %s %s” % ( quote_shell_string(ipaddress), quote_shell_string(params[“username”]), quote_shell_string(params[“password”]) )
^^^^^^^^^^^^^^^^^^

NameError: name ‘quote_shell_string’ is not defined

so i have changed quote_shell_string to shlex.quote and worked , but now i cannot make parameters in wato where you can define username and password to work

error :

Loading “wato/datasource_rdspostgres” failed: ‘NoneType’ object is not iterable

Can anyone help ?
that’s how wato file looks like :

#!/usr/bin/env python3
# -- encoding: utf-8; py-indent-offset: 4 --

group = “datasource_programs”

register_rule(group,
“special_agents:rdspostgres”,
Dictionary(
title=(“Amazon RDS Postgres”),
elements=[
(‘username’, TextAscii(title=
(“Username”))),
(‘password’, Password(title=_(“Password”))),
],
optional_keys = None,
),
)

Best
R

Hey problem can be solved by changing to:
in /omd/sites/site/local/share/check_mk/checks/agent_rdspostgres:

#!/usr/bin/env python3
# -- encoding: utf-8; py-indent-offset: 4 --
import shlex
def agent_rdspostgres_arguments(params, hostname, ipaddress):
# User, Password
#return “%s %s %s” % ( quote_shell_string(ipaddress), quote_shell_string(params[“username”]), quote_shell_string(params[“password”]) )
return “%s %s %s” % ( shlex.quote(ipaddress), shlex.quote(params[“username”]), shlex.quote(params[“password”]) )

special_agent_info[‘rdspostgres’] = agent_rdspostgres_arguments

and in /omd/sites/stepit/local/share/check_mk/web/plugins/wato/datasource_rdspostgres.py
:

#!/usr/bin/env python3
# -- encoding: utf-8; py-indent-offset: 4 --

group = “datasource_programs”

register_rule(group,
“special_agents:rdspostgres”,
Dictionary(
title=(“Amazon RDS Postgres”),
elements=[
(‘username’, TextAscii(title=
(“Username”))),
(‘password’, Password(title=_(“Password”))),
],
#optional_keys = None,
optional_keys = [ ],
),
)

then
omd restart apache