Honored Contributor.. Honored Contributor..
Honored Contributor..

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

puts "#{svr.short_host_name},#{agent_cvo.is_allow_recert},#{agent_cvo.getCert1Date}"


0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.