Erik Romijn avatar Erik Romijn committed a94b202

add exported routes call, bump version

Comments (0)

Files changed (2)

 Metadata-Version: 1.1
 Name: pybird
-Version: 1.0.7
+Version: 1.0.8
 Author: Erik Romijn
 Author-email: eromijn at solidlinks nl
 Summary: BIRD interface handler for Python
         return self._parse_route_data(data)
+    def get_peer_prefixes_exported(self, peer_name):
+        """Get prefixes exported TO a specific peer"""
+        if self.dummy:
+            return [
+                {'prefix': '2001:db8:/32', 'as_path': '65520', 'community': '65520:79 65521:421'},
+                {'prefix': '2002::/16', 'as_path': '65520', 'community': '65520:1234'},
+            ]
+        clean_peer_name = self._clean_input(peer_name)
+        query = "show route all table T_%s export %s" % (clean_peer_name, clean_peer_name)
+        data = self._send_query(query)
+        return self._parse_route_data(data)
     def get_peer_prefixes_accepted(self, peer_name):
         """Get prefixes announced by a specific peer, which were also
         accepted by the filters"""
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.