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

Help configure interfaces for VPC in ACI using REST API

eespin
Level 1
Level 1

Hello!

 

I'm new to this forum so I hope I'm posting to the correct board but am happy to move discussion if it belongs elsewhere. Our organization is fairly new to ACI, and I'm attempting to create a Web front end to configuring interfaces in ACI. Although the process is easy, I'd like it to be easier, and hopefully leave it open for automation by leveraging variables via GET in the future. 

 

I will describe our usual process:
1. Visually inspect Leaf Profiles for available ports, we have profiles for each leaf, as well as VPC pairs. So if I needed to physically wire a server to Leaf 100 and Leaf 101 I would look at 3 profiles: Leaf100Profile, Leaf101Profile , and VPC100_101Profile (these names are arbitrary my organization is fairly sensitive so I made these up to represent what we are doing). 

 

2. During my inspection I'll find the first interface that is unused between all profiles, say eth1/12.

 
3. We have policy group templates in place depending on the usage of these interfaces, we assign these in the "create Access Port Selector" within the VPC Profile when configuring VPCs (most common requests).

 

4. Finally we just bind the interfaces to the Application Profile - EPG via static ports where we assign VLAN (we are in transition and not fully Application Centric). 

 

 

So covering that process here is where I am stuck in scripting this, when one manually inspects the Leaf/VPC profile in step 1 I found it would be just as easy to see if an interface was Layer-2 available by looking at each interface programmatically and seeing if the attribute returned from the call to : 

https://$apic/api/node/class/topology/pod-1/node-$leafNode/ethpmPhysIf.json

is set to "discovery" vs an EPG ( I think the path is = array(['imdata']['attributes']['usage'] )
 

My problem is, even after sorting the list that is returned I can't seem to figure out the best way to pair interfaces across two switches. Naming patch isn't always consistent either sometimes its eth101/12 or eth1/12 and I'm unsure of why that is and reluctant to use regex because of it.

 

Wondering how others are handling this and open to a better process if mine is wrong? 

 

More Info:

Using PHP to hit the APICs but am open to other languages.

0 Replies 0