cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1650
Views
0
Helpful
15
Replies

APIC Sandbox Environment Setup error

hoylandpaul
Level 1
Level 1

Trying to setup my environment for the Intro to ACI programmability (https://developer.cisco.com/learning/lab/sbx-intro-aci-02_programmability-options/step/1) and followed all the steps successfully until I tried to follow the step:-

 

(venv) apic_fabric_setup\ $ python baseline.py

and got the following error:-

 

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

Any ideas what is going on?

 

Paul

 

15 Replies 15

omz
VIP Alumni
VIP Alumni

Have you followed the ..  How To Setup Your Own Computer 

Yes, all the steps completed without error.

 

 

I have followed the same steps and get the same error. 

It looks like the cobra files are missing on the apic simulator.

 

https://sandboxapicdc.cisco.com/cobra/_downloads/

returns 403,404

 

 

Try this:

 

 

acicobra-3.0_1k-py2.7.egg —> https://developer.cisco.com/fileMedia/download/39308f27-4956-4bd8-8127-d0fac29158c4

acimodel-3.0_1k-py2.7.egg —> https://developer.cisco.com/fileMedia/download/928a762b-c2c7-4374-840a-9d3242aa8e27

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

I get the following errors when I try to `pip install` those modules:-

 

(apic_fabric_setup) paul@paul-Inspiron-5537:~/Downloads$ pip install acicobra-3.0_1k-py2.7.egg 
Collecting acicobra-3.0_1k-py2.7.egg
Exception:
Traceback (most recent call last):
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/acicobra-3-0-1k-py2-7-egg/
(apic_fabric_setup) paul@paul-Inspiron-5537:~/Downloads$ pip install acimodel-3.0_1k-py2.7.egg 
Collecting acimodel-3.0_1k-py2.7.egg
Exception:
Traceback (most recent call last):
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/acimodel-3-0-1k-py2-7-egg/

404 Client Error: Not Found for url: https://pypi.org/simple/acicobra-3-0-1k-py2-7-egg/

Cannot see this package on - https://pypi.org/

I get the same error 

 

acicobra-3.0_1k-py2.7.egg

acimodel-3.0_1k-py2.7.egg

 

are these not for apic v3 and python2.7? or it doesn't matter?

apic simulator https://sandboxapicdc.cisco.com/

is on v4 and devnet lab is using Python 3

 

thanks 

 

\

acicobra-3.0_1k-py2.7.egg

acimodel-3.0_1k-py2.7.egg

 

are these not for apic v3 and python2.7? or it doesn't matter?

apic simulator https://sandboxapicdc.cisco.com/

is on v4 and devnet lab is using Python 3

 

thanks 

 

These are more current and the ones referenced in the learning lab ACI Programmability Options

 

https://d1nmyq4gcgsfi5.cloudfront.net/fileMedia/1f3d41ce-d154-44e3-74c1-d6cf3b525eaa/acicobra-4.2_3h-py2.py3-none-any.whl

https://d1nmyq4gcgsfi5.cloudfront.net/fileMedia/b3b69aa3-891b-41ff-46db-a73b4b215860/acimodel-4.2_3h-py2.py3-none-any.whl

 

For setting up your own environment, follow the set up (How To Setup Your Own Computer) of learning lab - https://developer.cisco.com/learning/lab/sbx-intro-aci-02_programmability-options/step/1

 

Screenshot 2020-03-25 at 10.53.33.png

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

yep completed step 1 - setup your own computer 

 

although the guide tells you use -  python setup.py install - after downloading acitoolkit from git .. 

it doesn't complete the setup

error: The 'flask' distribution was not found and is required by flask-wtf, acitoolkit, flask-httpauth

unless you do - pip install -r requirements.txt under acitoolkit. After this acitoolkit setup completes successfully.

and 4.2 .whl files installed successfully.

...
Installing collected packages: ply, future, acicobra
  Running setup.py install for future ... done
Successfully installed acicobra-4.2-3h future-0.18.2 ply-3.11
...
Installing collected packages: acimodel
Successfully installed acimodel-4.2-3h

The issue is with 

startup_script.py for baseline .. adding MO .. c.addMo(topMo)

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

 

 

 

As this isn't a sandbox issue, I would suggest posting this in the support room where the learning lab/code can help triage your issue https://developer.cisco.com/site/spark-chat/ - sadly this goes beyond my knowledge of this area.
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

omz
VIP Alumni
VIP Alumni

It should work now .. just tested .. 

$ ./baseline.py
Baselining APIC Simulator for Learning Labs
Setting up Fabric Nodes
Configuring Fabric Policies
Setting up Common Tenant
Setting up Heroes Tenant
Setting up SnV Tenant

@bigevilbeard thanks a lot for directing to the WebEx Teams room. 

There was another issue where no changes were being made on the apic.  

Both issues got resolved by resetting the sandbox. 

Thanks for the update, i saw Hank jumped in. I was chatting with our ENG support team, as I saw another two threads having an issue with the same sandbox.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks, I can confirm that it is now working :0)

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: