pyaci
pyaci copied to clipboard
Allow to POST and MO directly in the hierarchy
- ACI REST API allow to create an MO deep in the hierarchy instead of allowing to POST the whole subtree starting from topRoot. Taking advantage of this capability. This is beneficial in cases like this one, let assume we have a hierarchy like:
the tagAnnotation can be posted by posting the whole hierarchy under "api/mo.xml" or by posting only the necessary MO:
<tagAnnotation key="DNS" value="host.example.local."/>
under "api/mo/uni/tn-foo/ap-base/epg-lab/cep-58:F3:9C:89:3A:98/ip-[10.23.143.103].xml"
This helps to avoid to construct a nested tree of configuration. The reason why this was not working was because the POST method for an MO was calculating the URL of the MO itself instead of the parent for doing the POST.