01-20-2020 10:44 PM
Hi board,
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).
04-20-2020 07:38 AM
Hi Johannes:
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).
04-20-2020 07:45 AM
Hi,
thanks for your reply.
Yes, acimodel is needed - however the repo is dead (https://github.com/datacenter/acimodel), which is linked in https://github.com/datacenter/cobra#design-goals
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?
04-20-2020 08:35 AM
Well...I could put a specific version for you on Box and you can download it. I realize, not scalable but it helps you directly for the short term.
04-20-2020 09:16 AM
Hi,
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?
Cheers,
Sergiu
04-20-2020 10:14 AM
Hi Sergiu,
thank you for the reply.
I haven't tried the simulator yet. I thought it will have the same limitation as the sandbox. In the APIC sandbox, the sdk is not available. So maybe I'll give it a try.
However, +1 for acimodel in a public github repo.
Best regards
Johannes
04-20-2020 11:06 AM
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:
https://<sim IP>/cobra/_downloads/
04-22-2020 09:23 PM - edited 04-22-2020 09:27 PM
Hi Claudia and @Sergiu.Daniluk, which version of sim are you using?
I'm running a 4.2(3j) sim VM and it just doesn't have anything to download.
04-23-2020 08:03 AM
I was using a hardware simulator running 4.1(1k) with the URL
https://<sim IP>/cobra/_downloads/
Note that I did not include any port number in the URL.
04-23-2020 09:31 AM
04-23-2020 10:18 AM
It is in the hardware simulator of that version. I've not had a chance to try the OVA but it looks like you are on that already.
04-22-2020 08:55 AM
Lurking around Cisco DevNet website, I found a page where both latest version of acimodel and acicobra are shared:
https://developer.cisco.com/docs/aci/#!cobra-sdk-downloads/download-cobra-sdk-files
Cheers,
Sergiu
09-22-2020 08:42 AM
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
Exception information:
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
discovered_reqs.extend(self._resolve_one(requirement_set, req))
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
self._populate_link(req)
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
req)
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?
09-22-2020 09:02 AM
The file extension .egg is for Python 2.7.x. The file extension .whl is only for Python 3.x.
Check your version from CLI or IDE:
joezersk$ python -V
Python 2.7.17
Note: We only added Python support in ACI 4.2.3 and later (I think...not 100% on the exact version)
09-22-2020 10:10 AM
I have both 2.7 and 3.6.1 but the virtual environment I setup was for 3.6.1. So if our deployment is at 4.1(1k) am I not supposed to use the Python SDK at all?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide