I'm new to cobra and I am trying to install the SDK. I don't have access to an APIC server and the sandbox (https://sandboxapicdc.cisco.com) doesn't provide the SDK.
So here's what I did:
Cloning the GitHub repo (https://github.com/datacenter/cobra) and installing the package within a virtualenv (python3 setup.py install)
=> I get dependency errors. The acimodel package is missing.
There is a link to the acimodel in the README.md "Design Goals" section (https://github.com/datacenter/cobra#design-goals):
However, the link to the ACI model (https://github.com/datacenter/acimodel) does not work (repo not found).
I am not python expert, but I may have a couple of clues to check for.
Before ACI 4.2, we only supported Python 2.7 and we installed the SDK using .egg files.
4.2 and later, we added support for Python 3 and we use .whl files to install.
You need to install two files. acicobra and acimodel for your version if Python (i.e the .whl files for Python 3).
thanks for your reply.
So, obviously the only source is the SDK on an APIC ... what to do if you don't have an APIC and want to develop an application for it?
You can download and install an APIC simulator and download the acimodel from it.
I know, not the most optimal way, but is an alternative.
On the other hand, I fully support on having a github repo with all versions of acimodel!
@joezerskcan you make a request internally to have the acimodel exposed on github?
Try the simulator. I have access to a hardware simulator (not the DevNet Sandbox which I think has it deliberately blocked) and I can confirm it is available. If you poke around you will see posts from others who share your pain. I looked around about a month ago and still was not able to find any place to get the SDK apart from an actual APIC. No idea why and makes no sense.
Here is the link that works for me on my simulator:
Lurking around Cisco DevNet website, I found a page where both latest version of acimodel and acicobra are shared:
I'm having trouble setting up my laptop using the following reference: https://cobra.readthedocs.io/en/latest/index.html
What if my ACI is not 4.2.x? I don't see anything but .egg files at https://<apic>/cobra/_downloads
When I get to the point in the documentation that tells me to:
"pip install cobra-whls\acicobra-4.2_2j-py2.py3-none-any.whl" I, of course, reference acicobra-4.1_1k-py2.7.egg instead because that's all I have available to me at the URL I was given in the instructions. This blows up on me:
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/acimodel-4-1-1k-py2-7-egg/ HTTP/1.1" 404 13
Status code 404 not in (200, 203, 300, 301)
Could not fetch URL https://pypi.org/simple/acimodel-4-1-1k-py2-7-egg/: 404 Client Error: Not Found for url: https://pypi.org/simple/acimodel-4-1-1k-py2-7-egg/ - skipping
Given no hashes to check 0 links for project 'acimodel-4.1-1k-py2.7.egg': discarding no candidates
ERROR: Could not find a version that satisfies the requirement acimodel-4.1_1k-py2.7.egg (from versions: none)
ERROR: No matching distribution found for acimodel-4.1_1k-py2.7.egg
Traceback (most recent call last):
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\cli\base_command.py", line 228, in _main
status = self.run(options, args)
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
return func(self, options, args)
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\commands\install.py", line 324, in run
reqs, check_supported_wheels=not options.target_dir
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 183, in resolve
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 339, in _get_abstract_dist_for
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 305, in _populate_link
req.link = self._find_requirement_link(req)
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 270, in _find_requirement_link
best_candidate = self.finder.find_requirement(req, upgrade)
File "c:\users\srdavi4\envs\acienv\lib\site-packages\pip\_internal\index\package_finder.py", line 928, in find_requirement
pip._internal.exceptions.DistributionNotFound: No matching distribution found for acimodel-4.1_1k-py2.7.egg
Removed build tracker: 'C:\\Users\\srdavi4\\AppData\\Local\\Temp\\pip-req-tracker-o0yqr16q'
Can I use the acicobra-4.2_3h-py2.py3-none-any.whl and acimodel-4.2_3h-py2.py3-none-any.whl files even if ACI is not at 4.2.x?