Node code lookup hotfix
Change-Id: I0cd37193504c23a1321d093d343cb995926f651c
Related-PROD: PROD-38972
diff --git a/cfg_checker/common/other.py b/cfg_checker/common/other.py
index c5ad7c8..35495b3 100644
--- a/cfg_checker/common/other.py
+++ b/cfg_checker/common/other.py
@@ -99,7 +99,7 @@
def get_node_code(self, fqdn):
# validate
_isvalid, _message = self.validate_name(fqdn, message=True)
- _code = re.findall(r"[a-zA-Z]+?(?=(?:[0-9]+$)|$)", fqdn.split('.')[0])
+ _code = re.findall(r"[a-zA-Z]+?(?=(?:[0-9]+$)|(?:\-+?)|(?:\_+?)|$)", fqdn.split('.')[0])
# check if it is valid and raise if not
if _isvalid:
# try to match it with ones in map