Chaffelson / nipyapi

A convenient Python wrapper for Apache NiFi
Other
243 stars 76 forks source link

Unable to update password in DBCP controller service #300

Open silverbullet1 opened 2 years ago

silverbullet1 commented 2 years ago

Description

So I am trying to automate the creation of DBCP controller service from a Jenkins job where I take params as database name, table, host etc..and then inside my script, I create a new empty DBCP, get its peroperties and then update all the keys with respective values. For the values part I am using parameters. Here's a small snippet to demonstrate what I mean :

properties = controller_service_entity.to_dict()['component']['properties']
properties['Database Connection URL'] = "jdbc:postgresql://{}:{}/{}".format(host, port, db)
properties['Database User'] = "#{my_user}"
properties['Password'] = "#{my_pass}"

(and other misc properties)

Now the problem is that everything is created correctly except for the password..It does not refer the parameter which I have hardcoded by name. I can see that because the connection fails due to wrong auth and secondly, when I open the controller settings, I don't see the small arrow icon next to the password field which should take me to the parameter..and when I open param context, I don't see it being referred by the newly created DBCP either(obviously).

What I Did

Don't know how to tackle this.

Urgency

Very urgent.

Chaffelson commented 2 years ago

We chatted on slack; I have been unable to reproduce this with NiPy 0.18 on NiFi 1.15