StefanxNil
Contributor
Contributor

Python script dependencies (vRA 8.1)

Jump to solution

Hi,

I am trying out different runtimes for actions (node.js, Python). I have successfully created and executed and action based on this tutorial:

Create a Python Script That Calls the vRealize Automation Project API

In case I have many actions that for example use requests library, each action is basically imported with zip containing all the dependencies).

If I export these actions to a package, each action will be exported with it's own copy of dependencies, making the resulting file quite large in case there are a lot of actions.

The question is: Is it possible to centralize/import dependencies shared by all actions? So the action will simply specify dependencies it uses instead of containing it's own copy?

1 Solution

Accepted Solutions
maverix7
VMware Employee
VMware Employee

Currently it is not possible, the idea is that each action is independent isolated runnable. The drawback of bundling the dependencies is smaller compared to the potential problem of having to deal with dependency versions incompatibility when different actions require different versions of the same dependency, which sooner or later appears in environments.

View solution in original post

0 Kudos
2 Replies
maverix7
VMware Employee
VMware Employee

Currently it is not possible, the idea is that each action is independent isolated runnable. The drawback of bundling the dependencies is smaller compared to the potential problem of having to deal with dependency versions incompatibility when different actions require different versions of the same dependency, which sooner or later appears in environments.

View solution in original post

0 Kudos
StefanxNil
Contributor
Contributor

maverix7​ Thank you for the reply. Our CI/CD process involves deploying the actions via API and if the number of actions grows big, so will the size of the payload which affects the deploy speed. I was hoping that we could for example utilize requirements.txt in order to setup dependencies and versions and then vRA server could use local package mirror to pull the correct package versions upon installing the action. We will probably have to change our process to bundle actions into single package file.

Thanks again for your reply.