Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r dbcec00e9755 sa/profiles/Cisco/IOS/get_mpls_vpn.py
- --- a/sa/profiles/Cisco/IOS/get_mpls_vpn.py Tue Mar 27 21:38:04 2012 +0400
- +++ b/sa/profiles/Cisco/IOS/get_mpls_vpn.py Wed Mar 28 09:58:34 2012 +0400
- @@ -18,7 +18,7 @@
- implements = [IGetMPLSVPN]
- rx_line = re.compile(r"^\s+(?P<vrf>.+?)\s+"
- - r"(?P<rd>\S+:\S+)\s+(?P<iface>.+?)\s*$")
- + r"(?P<rd>\S+:\S+)\s+(?P<iface>.*?)\s*$")
- rx_cont = re.compile("^\s{6,}(?P<iface>.+?)\s*$")
- def execute(self, **kwargs):
- @@ -27,12 +27,17 @@
- for l in v.splitlines():
- match = self.rx_line.match(l)
- if match:
- + iface = match.group("iface").strip()
- + if iface:
- + interfaces = [iface]
- + else:
- + interfaces = []
- vpns += [{
- "type": "VRF",
- "status": True,
- "name": match.group("vrf"),
- "rd": match.group("rd"),
- - "interfaces": [match.group("iface")]
- + "interfaces": interfaces
- }]
- elif vpns:
- match = self.rx_cont.match(l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement