How to allow recert for agents programatically
I find a common problem we have is when my colleagues re-install the opsware agent, sometimes they do not de-activate causing a crypto/mid mismatch.
I usually end up having to go through the OCC and run the custom extension to delete certificate data on record which fixes it. However I want to be able to script this, so that prior to submitting a trouble-ticket to reinstall the agent, I can set the allow_recert flag to true.
I have seen that the object in Twist has a function, however even though it does not return an error, it does not persist on the object.
E.g. here is what I try to run. Excuse the custom code, its java wrapped in ruby.
this_svr=my_sas_client.server_service.find_server_vos_by_filter("(ServerVO.opswLifecycle NOT_EQUAL_TO DEACTIVATED)&(device_customer_name IN MYNAUGHTYCUSTOMER)&(ServerVO.state EQUAL_TO UNREACHABLE)")
this_svr.each do |svr|
if agent_cvo.is_allow_recert == false