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

Create new external epg with static ip

Is there any example of how to create external epg with static ip/subnet ?

All the example that I saw use with ospf pr bgp.

This is the xml that I want to post -

I already define the tenant coke and L3-OUT1 , I just want to add new external epg called eepg2 with ip 12.1.1.1/32 .

<fvTenant name="coke">

<l3extOut name="L3-OUT1">

<l3extInstP name="eepg2">

<l3extSubnet descr="" ip="12.1.1.1/32" name=""/>

<fvRsCustQosPol tnQosCustomPolName=""/>

</l3extInstP>

</l3extOut>

</fvTenant>

Everyone's tags (7)
1 REPLY 1
Highlighted
Not applicable

Re: Create new external epg with static ip

from acitoolkit import *

# Create the config

tenant = Tenant('coke')

l3out = OutsideL3('L3-OUT1', tenant)

out_epg = OutsideEPG('eepg2', l3out)

net = OutsideNetwork('12.1.1.1/32', out_epg)

net.ip = '12.1.1.1/32'


# Print the config
print tenant.get_json()

# Push the config to the APIC

my_apic = Session('http://1.2.3.4", 'admin', 'password')

my_apic.login()

tenant.push_to_apic(my_apic)