VMware Cloud Community
Czernobog
Expert
Expert

Aria Automation 8.12.1 - Orchestrator Python 3.10 env - importing netifaces, infoblox module fails

Hi,

I need to do some object manipulation in our Infoblox IPAM. This is to be done using an Orchestrator workflow.

Infoblox provides a python module: infoblox-client · PyPI

I have created a new python 3.10 environment in vRO, where I tried to import the infoblox-client module.

This fails because a depencency (netifaces module) cannot be built, here's a part of the download log:

2023-08-02 12:59:48.549 +02:00INFOCollecting netifaces>=0.10.4
2023-08-02 12:59:48.551 +02:00INFO  Using cached netifaces-0.11.0.tar.gz (30 kB)

...

2023-08-02 12:59:50.629 +02:00ERROR    building 'netifaces' extension
2023-08-02 12:59:50.630 +02:00ERROR    x86_64-unknown-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -O2 -g -fPIC -DNETIFACES_VERSION=0.11.0 -I/usr/include/python3.10 -c netifaces.c -o build/temp.linux-x86_64-cpython-310/netifaces.o
2023-08-02 12:59:50.631 +02:00ERROR    error: command 'x86_64-unknown-linux-gnu-gcc' failed: No such file or directory
2023-08-02 12:59:50.632 +02:00ERROR    ----------------------------------------
2023-08-02 12:59:50.633 +02:00ERRORERROR: Command errored out with exit status 1: /usr/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zylpe8x5/netifaces_e73f72b17063488abfe6fcc25b903a2c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zylpe8x5/netifaces_e73f72b17063488abfe6fcc25b903a2c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uexld4j8/install-record.txt --single-version-externally-managed --home /tmp/pip-target-jww4b747 --compile --install-headers /tmp/pip-target-jww4b747/include/python/netifaces Check the logs for full command output.

 

Importing the infoblox-client module works fine in ABX, just not in vRO. 

Is a workaround possible?

And why is there such a discrepancy in the python envs in ABx and vRO?

 

0 Kudos
2 Replies
DanielStastka
Enthusiast
Enthusiast

I create a Workflow with nativ Rest-API Commands to create, check or delete a Objekt on Infoblox (DNS and IP Object). I have more Environments with vRo only (without vAA) and Python or other language are not available. The Rest-API is very well documented and easy to integrated to vRo with Javascript.  Infoblox Reference Guide - Infoblox REST API.docx

I think plugins are nice, but if the API on Infoblox or Phython support on vAA changes you have a problem.

 

0 Kudos
Czernobog
Expert
Expert

I was doing it this way (with request module in vRO python env) up until now and wanted to switch to the infoblox python module, since it's just easier to work with.

I've made good experience with it in ABX, what irks me is that stuff that works there is not compatible with the vRO python env. I would like to use ABX more, however when you build a flow and construct a custom form, the validation and external source for the input fields has to be a vRO action, so I cannot use the infoblox module there. It's frustrating. 

0 Kudos