04-26-2018 08:10 AM
I have been trying to find a way to simplify the creation of access policies from the ACI API. My assumption is that that I should be able to use mo/uni.xml as my URL target, and push XML for the entire VPC configuration, but I cannot even get domains and VLAN pools to create in one POST.
If I do this:
POST https://<APICIP>/api/mo/uni.xml?
With this as the data, why cannot I not create the VLAN and the Domain at the same time?
<!-- Create a Static VLAN Pool for VLAN 1103-->
<fvnsVlanInstP
allocMode="static"
descr=""
dn="uni/infra/vlanns-[ESXiMgmt]-static"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<fvnsEncapBlk
allocMode="inherit"
descr=""
from="vlan-1103"
name=""
nameAlias=""
role="external"
to="vlan-1103"/>
</fvnsVlanInstP>
<!-- Designate that this as a physical interfaces instead of an L3 or L2 interface -->
<!-- This really just impacts the Icon associated with the VLAN, but you cannot skip this step -->
<physDomP
dn="uni/phys-ESXiMgmt"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<infraRsVlanNs
tDn="uni/infra/vlanns-[ESXiMgmt]-static"/>
</physDomP>
When I do this, physDomP is reported as a class that isn't found.
My goal is to create the Pool, Domain, AAEP, Interface configuration and switch configuration in one POST. Pretty sure that is possible. What am I missing?
Solved! Go to Solution.
04-26-2018 04:36 PM
Fixed it...
<!-- Create a Static VLAN Pool for VLAN 1103-->
<polUni>
<!-- Create a Static VLAN Pool for VLAN 1103-->
<infraInfra>
<fvnsVlanInstP
allocMode="static"
descr=""
dn="uni/infra/vlanns-[ESXiMgmt]-static"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<fvnsEncapBlk
allocMode="inherit"
descr=""
from="vlan-1103"
name=""
nameAlias=""
role="external"
to="vlan-1103"/>
</fvnsVlanInstP>
</infraInfra>
<!-- Create a Domain -->
<physDomP
dn="uni/phys-ESXiMgmt"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<infraRsVlanNs
tDn="uni/infra/vlanns-[ESXiMgmt]-static"/>
</physDomP>
</polUni>
04-26-2018 04:36 PM
Fixed it...
<!-- Create a Static VLAN Pool for VLAN 1103-->
<polUni>
<!-- Create a Static VLAN Pool for VLAN 1103-->
<infraInfra>
<fvnsVlanInstP
allocMode="static"
descr=""
dn="uni/infra/vlanns-[ESXiMgmt]-static"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<fvnsEncapBlk
allocMode="inherit"
descr=""
from="vlan-1103"
name=""
nameAlias=""
role="external"
to="vlan-1103"/>
</fvnsVlanInstP>
</infraInfra>
<!-- Create a Domain -->
<physDomP
dn="uni/phys-ESXiMgmt"
name="ESXiMgmt"
nameAlias=""
ownerKey=""
ownerTag="">
<infraRsVlanNs
tDn="uni/infra/vlanns-[ESXiMgmt]-static"/>
</physDomP>
</polUni>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide