I've been developing an internal orchestration tool for ACI based on Cobra SDK with webservices/web-interface provided by Flask. I'd like to have a single application (in a single environment) which manages different APIC clusters. Unfortunately these APIC clusters, being deployed at different times in different datacenters run different versions of code - 1.2.1m and 2.0.2n.
When initially tried to use login to 2.0.2n using eggs from 1.2.1m it failed right there. I'm assuming for safety and sanity of everyone involved, I should be using appropriate Cobra SDK library downloaded from the APIC to be managed to each cluster. And there comes a problem - both Cobra SDK packages are in the same namepaces. What's more, the individual modules inside Cobra SDK are using absolute imports, meaning that I can't just move each SDK package into a different folder without requirement to edit every single file in the Cobra SDK package to import from a different namespace.
Based on discussions I had with other Python developers, it appears we're down to 3 options:
Completely separate applications running in different virtual environments each with appropriate Cobra SDK version. The downside is that either user has to connect to different URLs or some other infrastructure (such as HA proxy) needed in front of app servers to redirect to appropriate application based on some criteria.
Bite the bullet, move each Cobra SDK version to a separate Python package and find/replace all absolute references to "cobra." with "<new top package name>.cobra." in all files inside Cobra SDK. Dynamically load top package (using importlib) based on which APIC Cluster user of the application wants to manage.
Perform some other magic hackery with Python internals, such as sys.paths and/or sys.modules. (I don't have a clear plan on this one yet).
I'm hoping someone has already faced and dealt with this issue previously or to get a recommendation from Cobra SDK developers.
I'm able to pull the topology using the API GEThttps://n.n.n.n/api/node/mo/topology/pod-1.json?query-target=children&target-subtree-class=fabricNode(after authenticating and getting a cookie, of course) But the version field is empty. I don't see...
FOSDEM is a truly unique experience and arguably the best open source conference of the year. It is a weekend event (February 1-2 this year) organized by open source enthusiasts to promote the widespread use of free and open source software...
Introduction:https://github.com/jeremyschulman/genie-quickstartAs a network automation engineer responsible for creating tools for use with Cisco devices I am always on the lookout for software products and technologies. I’ve been following the Cisco DevN...
Would you like to know how TRex helps in supporting BGP/OSPF/RIP/ISIS on both ipv4/v6, and how network emulation or routing emulation is possible, is all here in the nerdlunch video.
Know more about how DevX has added more capabilities, much stable builds...
NBI Notifications API will be deprecated in Prime 3.7 and removed in future releases. We will update API documentation to reflect this.
NBI Server-Sent Events API is official replacement for the Notifications API. In 3.7 we will provid...