Create new external epg with static ip

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2015 02:49 AM
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>
- Labels:
-
ACI-toolkit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 04:07 PM
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)
