<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to setup Python loop to create 3000 ACI BDs in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502873#M599</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;for num in range (1,3001):&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; my_string =&amp;nbsp; "fvBD{0} = cobra.model.fv.BD(fvTenant, ownerKey=u'', name=u'BD{0}', descr=u'', unkMacUcastAct=u'proxy', arpFlood=u'no', mac=u'00:22:BD:F8:19:FF', unicastRoute=u'yes', ownerTag=u'', unkMcastAct=u'flood') fvRsABDPolMonPol{0} = cobra.model.fv.RsABDPolMonPol(fvBD{0}, tnMonEPGPolName=u'default')".format (num)&lt;/P&gt;&lt;/DIV&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&amp;nbsp; print my_string&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;This will change each of the {0} in the string into whatever is in "num".&amp;nbsp;&amp;nbsp; T&lt;SPAN style="line-height: 1.5em;"&gt;he other key to the code is the &lt;/SPAN&gt;&lt;EM style="line-height: 1.5em;"&gt;.format (num)&lt;/EM&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp; on the end of the string.&amp;nbsp; I'm printing it out, but you probably will want to do something with it instead.&amp;nbsp; You will get numbers from 1 - 3000 (range gives you one less than what you specify).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 14:10:27 GMT</pubDate>
    <dc:creator>tigephillips</dc:creator>
    <dc:date>2014-10-28T14:10:27Z</dc:date>
    <item>
      <title>How to setup Python loop to create 3000 ACI BDs</title>
      <link>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502872#M598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, Experts&lt;/P&gt;&lt;P&gt;from the following 2 python line script，it can create ONE BD into the tenant,&lt;/P&gt;&lt;P&gt;BUT what i need is creating 3000 BDs,&lt;/P&gt;&lt;P&gt;So how can i setup a Python loop to dynamically replace the following &lt;SPAN style="color: #ff00ff;"&gt;colorful&lt;/SPAN&gt; text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;/Ja&lt;/P&gt;&lt;P&gt;==========================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fvBD&lt;SPAN style="color: #ff00ff;"&gt;8&lt;/SPAN&gt; = cobra.model.fv.BD(fvTenant, ownerKey=u'', name=u'BD&lt;SPAN style="color: #ff00ff;"&gt;8&lt;/SPAN&gt;', descr=u'', unkMacUcastAct=u'proxy', arpFlood=u'no', mac=u'00:22:BD:F8:19:FF', unicastRoute=u'yes', ownerTag=u'', unkMcastAct=u'flood')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fvRsABDPolMonPol&lt;SPAN style="color: #ff00ff;"&gt;8&lt;/SPAN&gt; = cobra.model.fv.RsABDPolMonPol(fvBD&lt;SPAN style="color: #ff00ff; font-size: 13.6000003814697px;"&gt;8&lt;/SPAN&gt;, tnMonEPGPolName=u'default')&lt;/P&gt;&lt;P&gt;=========================&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 12:24:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502872#M598</guid>
      <dc:creator>chungewa</dc:creator>
      <dc:date>2019-03-01T12:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup Python loop to create 3000 ACI BDs</title>
      <link>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502873#M599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;for num in range (1,3001):&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; my_string =&amp;nbsp; "fvBD{0} = cobra.model.fv.BD(fvTenant, ownerKey=u'', name=u'BD{0}', descr=u'', unkMacUcastAct=u'proxy', arpFlood=u'no', mac=u'00:22:BD:F8:19:FF', unicastRoute=u'yes', ownerTag=u'', unkMcastAct=u'flood') fvRsABDPolMonPol{0} = cobra.model.fv.RsABDPolMonPol(fvBD{0}, tnMonEPGPolName=u'default')".format (num)&lt;/P&gt;&lt;/DIV&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&amp;nbsp; print my_string&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: 12px;"&gt;This will change each of the {0} in the string into whatever is in "num".&amp;nbsp;&amp;nbsp; T&lt;SPAN style="line-height: 1.5em;"&gt;he other key to the code is the &lt;/SPAN&gt;&lt;EM style="line-height: 1.5em;"&gt;.format (num)&lt;/EM&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp; on the end of the string.&amp;nbsp; I'm printing it out, but you probably will want to do something with it instead.&amp;nbsp; You will get numbers from 1 - 3000 (range gives you one less than what you specify).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:10:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502873#M599</guid>
      <dc:creator>tigephillips</dc:creator>
      <dc:date>2014-10-28T14:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup Python loop to create 3000 ACI BDs</title>
      <link>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502874#M600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks tiphilli！！！&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Nov 2014 02:56:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-setup-python-loop-to-create-3000-aci-bds/m-p/3502874#M600</guid>
      <dc:creator>chungewa</dc:creator>
      <dc:date>2014-11-01T02:56:58Z</dc:date>
    </item>
  </channel>
</rss>

