cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
466
Views
0
Helpful
1
Replies
Cisco Employee

Creating VPC in Access Policies In One API Call

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?

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: Creating VPC in Access Policies In One API Call

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>

1 REPLY 1
Highlighted
Cisco Employee

Re: Creating VPC in Access Policies In One API Call

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>

Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.