Commit ef1b0533 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Add tokenizer to some SA profiles

parent 10e91998
......@@ -43,6 +43,10 @@ class Profile(BaseProfile):
rx_cable_if = re.compile(
r"Cable\s*(?P<pr_if>\d+/\d+) U(pstream)?\s*(?P<sub_if>\d+)",
re.IGNORECASE)
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "!"
}
default_parser = "noc.cm.parsers.Cisco.IOS.base.BaseIOSParser"
rx_ver = re.compile(r"(\d+)\.(\d+)[\(.](\d+)[\).]\S*")
......
......@@ -40,6 +40,10 @@ class Profile(BaseProfile):
r"(?:\(config[^\)]*\))?#"
# to one SNMP GET request
snmp_metrics_get_chunk = 10
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "!"
}
INTERFACE_TYPES = {
"as": "physical", # Async
......
......@@ -51,6 +51,10 @@ class Profile(BaseProfile):
command_save_config = "save\ny\n"
command_exit = "quit\ny\n"
rogue_chars = ["\xff", "\r"]
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "#"
}
rx_slots = re.compile("^\s*\d+", re.MULTILINE)
rx_ports = re.compile(
......
......@@ -48,6 +48,10 @@ class Profile(BaseProfile):
command_save_config = "save"
command_exit = "quit"
rogue_chars = [re.compile(r"\x1b\[42D\s+\x1b\[42D"), "\r"]
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "#"
}
default_parser = "noc.cm.parsers.Huawei.VRP.base.BaseVRPParser"
matchers = {
......
......@@ -21,3 +21,7 @@ class Profile(BaseProfile):
command_submit = "\r"
command_disable_pager = "terminal length 0"
command_exit = "exit"
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "!"
}
......@@ -43,6 +43,10 @@ class Profile(BaseProfile):
pattern_prompt = r"^\S+#"
rogue_chars = [re.compile(r"\s*\x1b\[74D\s+\x1b\[74D"), "\r"]
rx_ifname = re.compile(r"(?P<number>[\d\/]+)$")
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "!"
}
def convert_interface_name(self, s):
"""
......
......@@ -42,6 +42,10 @@ class Profile(BaseProfile):
r"(?:\(config[^\)]*\))?#"
rx_ifname = re.compile(r"^(?P<number>\d+)$")
config_tokenizer = "indent"
config_tokenizer_settings = {
"line_comment": "!"
}
default_parser = "noc.cm.parsers.Qtech.QSW2800.base.BaseQSW2800Parser"
@classmethod
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment