<?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: PyATS and defult vrf in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/pyats-and-defult-vrf/m-p/4536953#M2388</link>
    <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1056868"&gt;@PaulPatterson99634&lt;/a&gt;&amp;nbsp;i think in CSR/XE you will see VRF default regardless, as the default acts as the global table. Without seeing the code you are running it is hard to spot the problem, if you want to see the whole thing run the command "show ip route" on the device and parse the output to JSON&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;routingTable = dev.parse('show ip route')  
print(json.dumps(routingTable)&lt;/PRE&gt;
&lt;PRE&gt;{
   "vrf":{
      "default":{
         "address_family":{
            "ipv4":{
               "routes":{
                  "0.0.0.0/0":{
                     "route":"0.0.0.0/0",
                     "active":true,
                     "metric":0,
                     "route_preference":1,
                     "source_protocol_codes":"S*",
                     "source_protocol":"static",
                     "next_hop":{
                        "next_hop_list":{
                           "1":{
                              "index":1,
                              "next_hop":"10.10.20.254",
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  },
                  "10.10.20.0/24":{
                     "route":"10.10.20.0/24",
                     "active":true,
                     "source_protocol_codes":"C",
                     "source_protocol":"connected",
                     "next_hop":{
                        "outgoing_interface":{
                           "GigabitEthernet1":{
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  },
                  "10.10.20.48/32":{
                     "route":"10.10.20.48/32",
                     "active":true,
                     "source_protocol_codes":"L",
                     "source_protocol":"local",
                     "next_hop":{
                        "outgoing_interface":{
                           "GigabitEthernet1":{
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}&lt;/PRE&gt;
&lt;P&gt;Take a look at this example&amp;nbsp;&lt;A href="https://github.com/tahigash/pyATS-Lab-Guide" target="_blank"&gt;https://github.com/tahigash/pyATS-Lab-Guide&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 11:21:13 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2022-01-24T11:21:13Z</dc:date>
    <item>
      <title>PyATS and defult vrf</title>
      <link>https://community.cisco.com/t5/controllers/pyats-and-defult-vrf/m-p/4536666#M2387</link>
      <description>&lt;P&gt;I am trying to run pyATS on a few CSRv routers and retrieve their routing tables. When I execute learn, pyATS looks for a vrf identified as 'default' as noted in the console file. I do not have a vrf labeled 'default', it's just the global routing table, so I get no information about the routing table back. Has anyone else run into this problem? Is there a workaround for it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul P.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 01:55:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/pyats-and-defult-vrf/m-p/4536666#M2387</guid>
      <dc:creator>PaulPatterson99634</dc:creator>
      <dc:date>2022-01-24T01:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: PyATS and defult vrf</title>
      <link>https://community.cisco.com/t5/controllers/pyats-and-defult-vrf/m-p/4536953#M2388</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1056868"&gt;@PaulPatterson99634&lt;/a&gt;&amp;nbsp;i think in CSR/XE you will see VRF default regardless, as the default acts as the global table. Without seeing the code you are running it is hard to spot the problem, if you want to see the whole thing run the command "show ip route" on the device and parse the output to JSON&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;routingTable = dev.parse('show ip route')  
print(json.dumps(routingTable)&lt;/PRE&gt;
&lt;PRE&gt;{
   "vrf":{
      "default":{
         "address_family":{
            "ipv4":{
               "routes":{
                  "0.0.0.0/0":{
                     "route":"0.0.0.0/0",
                     "active":true,
                     "metric":0,
                     "route_preference":1,
                     "source_protocol_codes":"S*",
                     "source_protocol":"static",
                     "next_hop":{
                        "next_hop_list":{
                           "1":{
                              "index":1,
                              "next_hop":"10.10.20.254",
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  },
                  "10.10.20.0/24":{
                     "route":"10.10.20.0/24",
                     "active":true,
                     "source_protocol_codes":"C",
                     "source_protocol":"connected",
                     "next_hop":{
                        "outgoing_interface":{
                           "GigabitEthernet1":{
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  },
                  "10.10.20.48/32":{
                     "route":"10.10.20.48/32",
                     "active":true,
                     "source_protocol_codes":"L",
                     "source_protocol":"local",
                     "next_hop":{
                        "outgoing_interface":{
                           "GigabitEthernet1":{
                              "outgoing_interface":"GigabitEthernet1"
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}&lt;/PRE&gt;
&lt;P&gt;Take a look at this example&amp;nbsp;&lt;A href="https://github.com/tahigash/pyATS-Lab-Guide" target="_blank"&gt;https://github.com/tahigash/pyATS-Lab-Guide&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 11:21:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/pyats-and-defult-vrf/m-p/4536953#M2388</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-01-24T11:21:13Z</dc:date>
    </item>
  </channel>
</rss>

