CA on CA Tech Tip - Pushing archive packages via the UIM REST API

Document created by Alquin Employee on May 30, 2018
Version 1Show Document
  • View in full screen mode

Hi Community,

At times I need to push packages to a lot of robots but selecting each one in AC or IM is super time consuming. In the Python library that we provided it has a method push_pkg and that is the basis for this code. Essentially it works by

  1. Getting the access information for the REST API, the package we want to push and the file with the list of robots to target from a configuration file
  2. We build a SQLite DB containing the relationship between the robot and the hub as this is required by the call to ADE. This is done using get_hubs and get_robots as well as some new code to build a robot db
  3. We then read the list of target robots. For each robot we find the hub that hosts it and use this information to push the named package to it with ADE. NOTE: We verify that ADE handles the push but we do not verify successful package deployment (more code required for that).

The code for executing this is available in GitHub as Feel free to change or improve to match your use cases. There is also a sample configuration file now to help with the setup. Post comments and questions below.





Disclaimer: I am a CA employee. I work in the CA IT department. The code is not sanctioned by CA support or development. Test before using in production.

3 people found this helpful