<?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: Check for tenant name in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/check-for-tenant-name/m-p/3572460#M206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The instance tenant has an object called name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, your code should basically be like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;tenants = Tenant.get(session)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for t in tenants:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print t&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if t.name == 'Production':&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "TRUE"&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;I hope this helps. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2018 04:52:22 GMT</pubDate>
    <dc:creator>guruprassadn</dc:creator>
    <dc:date>2018-02-12T04:52:22Z</dc:date>
    <item>
      <title>Check for tenant name</title>
      <link>https://community.cisco.com/t5/controllers/check-for-tenant-name/m-p/3572459#M205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this code that when execute all tenants print out line by line including 'Production' but when check for t == 'Production' it is not true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tenants = Tenant.get(session)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for t in tenants:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print t &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if t == 'Production': #why this line is never true?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "TRUE"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2017 20:59:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/check-for-tenant-name/m-p/3572459#M205</guid>
      <dc:creator>Trinh Nguyen</dc:creator>
      <dc:date>2017-12-27T20:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Check for tenant name</title>
      <link>https://community.cisco.com/t5/controllers/check-for-tenant-name/m-p/3572460#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The instance tenant has an object called name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, your code should basically be like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;tenants = Tenant.get(session)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for t in tenants:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print t&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if t.name == 'Production':&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "TRUE"&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;I hope this helps. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 04:52:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/check-for-tenant-name/m-p/3572460#M206</guid>
      <dc:creator>guruprassadn</dc:creator>
      <dc:date>2018-02-12T04:52:22Z</dc:date>
    </item>
  </channel>
</rss>

