cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1812
Views
0
Helpful
1
Replies

Creating VPC in Access Policies In One API Call

srehling
Cisco Employee
Cisco Employee

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?

1 Accepted Solution

Accepted Solutions

srehling
Cisco Employee
Cisco Employee

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>

View solution in original post

1 Reply 1

srehling
Cisco Employee
Cisco Employee

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>