Module: check_mk
Branch: master
Commit: 5d03a348fbc39cdf48cb63e7c9cba09ed33b59da
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5d03a348fbc39c…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Mon Dec 3 10:02:52 2018 +0100
Revert "6897 juniper_gbp_state: Add IPv6 support"
This reverts commit 799a8d86e6c879311907fbadfb4a791549e676f7.
Change-Id: If1828c3c61075f7a7abe0f322fd8ecd56e5956d8
---
.werks/6897 | 13 -------------
checks/juniper_bgp_state | 11 +----------
2 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/.werks/6897 b/.werks/6897
deleted file mode 100644
index 7a40ee5..0000000
--- a/.werks/6897
+++ /dev/null
@@ -1,13 +0,0 @@
-Title: juniper_gbp_state: Add IPv6 support
-Level: 1
-Component: checks
-Compatible: compat
-Edition: cre
-Version: 1.6.0i1
-Date: 1543314263
-Class: feature
-
-Previously the juniper_bgp_state check supported IPv4 addresses only.
-This werk adds support for IPv6 addresses.
-
-CMK-1334
diff --git a/checks/juniper_bgp_state b/checks/juniper_bgp_state
index 3c55e68..ba1d3cb 100644
--- a/checks/juniper_bgp_state
+++ b/checks/juniper_bgp_state
@@ -26,16 +26,7 @@
def juniper_bgp_state_create_item(oid_end):
- # supports IPv4 (e.g. 255.255.255.255) and
- # IPv6 (e.g. 1762:0:0:0:0:B03:1:AF18)
- ipv4_regex = r"[0-9]+\.1\.[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\.1\."
- ipv6_regex = r"^(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}$"
- ipv4_match = re.match(ipv4_regex, oid_end)
- if ipv4_match:
- return ipv4_match.group()
- ipv6_match = re.match(ipv6_regex, oid_end)
- if ipv6_match:
- return ipv6_match.group()
+ return re.sub(r"[0-9]+\.1\.[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\.1\.",
"", oid_end)
def inventory_juniper_bgp_state(info):