cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10324
Views
26
Helpful
21
Replies

Download latest cobra SDK packages from sources

Johannes Luther
Level 4
Level 4

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):

Spoiler
"Robust. Integrate with ACI Model for client side validation and testing."

However, the link to the ACI model (https://github.com/datacenter/acimodel) does not work (repo not found).

21 Replies 21

joezersk
Cisco Employee
Cisco Employee

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).

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?

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. 

 

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

 

 

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

Hi @Johannes Luther 

 

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/

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.

 

ciscosim.png

Hi @tuanquangnguyen 

 

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.

 

Hi Claudia,

The port number was just my simulator being port forwarded, for ease of use. Have tried accessing via the IP alone to download the SDK, but to no avail.
I'm downloading a 4.2(3q) OVA, let's see if the SDK is bundled with that.

Thanks for your help.

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.  
cobra-2020-04-23_10-13-41.jpg

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @Johannes Luther 

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

sdavids5670
Level 2
Level 2

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?

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)

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?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Save 25% on Day-2 Operations Add-On License