Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Generated c.addMo(polUni) fails with ValueError: mo context not found for uni #5

Open
edminer opened this issue Feb 10, 2016 · 1 comment

Comments

@edminer
Copy link

edminer commented Feb 10, 2016

Hi,

Running APIC Version 1.2(1k) here.

arya generated this ending to the generated py script:

# commit the generated code to APIC
print toXMLStr(polUni)
c = cobra.mit.request.ConfigRequest()
c.addMo(polUni)

When I run the script I get this:

Traceback (most recent call last):
  File "tn-tutorial-tic.py", line 54, in <module>
    c.addMo(polUni)
  File "/xtra/anaconda/envs/py27/lib/python2.7/site-packages/acicobra-1.2_1k-py2.7.egg/cobra/mit/request.py", line 777, in addMo
    raise ValueError('mo context not found for {0}'.format(str(mo.dn)))
ValueError: mo context not found for uni

I made this change to the addMo statement and the script succeeds:
c.addMo(fvTenant)

Thanks.

@NathanDotTo
Copy link

Justo to say thanks, I had this issue also :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants