cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10318
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

I am told that the .whl files available in 4.2.3 and later should be backwards compatible (meaning you are using Python 3.x with ACI 4.1.x).  However, I have not personally tested this.  To be 100% certain, for your version of ACI, it would work if you download and easy_install the .egg files into your Python 2.7 environment.  I hope that made sense. 

Yih-Jie
Level 1
Level 1

My Python version is 3.9.1.

I follow the previse post to install cobra sdk package successful.

but when I follow the aci lab instruction to setup the baseline environment , I got the error message

 

(py3-venv) C:\Users\YihJieLin\Study\DevNet\aci-learning-labs-code-samples\apic_fabric_setup>python baseline.py
Baselining APIC Simulator for Learning Labs
Setting up Fabric Nodes
Traceback (most recent call last):
  File "C:\Users\YihJieLin\Study\DevNet\aci-learning-labs-code-samples\apic_fabric_setup\baseline.py", line 11, in <module>
    import startup_script
  File "C:\Users\YihJieLin\Study\DevNet\aci-learning-labs-code-samples\apic_fabric_setup\startup_script.py", line 42, in <module>
    c.addMo(topMo)
  File "C:\Users\YihJieLin\Study\DevNet\py3-venv\lib\site-packages\cobra\mit\request.py", line 897, in addMo
    self.__configMos[mo.dn] = mo
AttributeError: 'NoneType' object has no attribute 'dn'

 

 

No magic, only basic

I suspect that the version of the simulator you are using may be an earlier one that still requires python 2.x and .egg files.  Can you check what version your simulator is running?

Hello Joezersk,

I followed the github.com readme.md 
https://github.com/CiscoDevNet/aci-learning-labs-code-samples

 

 

No magic, only basic

Hello Joezersk,

I follow the URL , https://github.com/CiscoDevNet/aci-learning-labs-code-samples, to setup me local workstation,

as you can see the screen capture for the readme, it asked the python' version is 3.7.5 or higher.

螢幕擷取畫面 2021-01-11 100300.png

No magic, only basic

jkeane100
Level 1
Level 1

Dear all. 

 

I hope someone can help. I have downloaded the latest version of the SW simulator (5.2(1g)) to do pre upgrade testing. However the SDK whl files I have are from 4.2(3h) 

The SW simulator doesnt support downloading of the .whl files

However there are new features in 5.2 which are not supported in the 4.2 Cobra model (for example the Synchronous Ethernet Interface policy) 

So I am in a chicken and egg situation.

  • I cant test my scripts against 5.2 as  I cant access the Cobra files
  • it seems the only way to get the files is to upgrade to 5.2 !

 

As such I need to access the 5.2(1g) Cobra files. 

Hopefully someone who sees this can assist.

 

Rgards

 

JK

 

 

 

Hello,

The last version on Devnet is 4.2 not sure if the new functions are made on Cobra yet.

 

But you can try  checking the new functions up in the API inspector and replace the code in the Cobra script you are running to see if it can create the new functions ?

 

Or just make a Python script that utilizes JSON (RESTapi) for your POST/GET functions. 

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