Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrey Yemelyanov
noc
Commits
cf56d359
Commit
cf56d359
authored
Sep 12, 2018
by
Dmitry Lukhtionov
Browse files
Fix Raisecom.RCIOS pager
parent
6c95ac26
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/profiles/Raisecom/RCIOS/__init__.py
View file @
cf56d359
...
...
@@ -3,7 +3,7 @@
# Vendor: Raisecom
# OS: RCIOS
# ----------------------------------------------------------------------
# Copyright (C) 2007-201
7
The NOC Project
# Copyright (C) 2007-201
8
The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
...
...
@@ -19,6 +19,9 @@ class Profile(BaseProfile):
pattern_prompt
=
r
"^(?P<hostname>\S+)# "
command_exit
=
"exit"
pattern_syntax_error
=
r
"% \".+\" (?:Unknown command.)"
pattern_more
=
[
(
r
"^--More-- \(\d+% of \d+ bytes\)"
,
"r"
)
]
INTERFACE_TYPES
=
{
"3g"
:
"tunnel"
,
...
...
@@ -31,14 +34,6 @@ class Profile(BaseProfile):
"vl"
:
"SVI"
,
}
def
setup_script
(
self
,
script
):
if
script
.
parent
is
None
:
s_password
=
script
.
credentials
.
get
(
"super_password"
,
""
)
self
.
pattern_more
=
[
(
r
"^--More-- \(\d+% of \d+ bytes\)"
,
"r"
),
(
r
"^Enable: "
,
s_password
+
"
\n
"
)
]
@
classmethod
def
get_interface_type
(
cls
,
name
):
return
cls
.
INTERFACE_TYPES
.
get
((
name
[:
2
]).
lower
())
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment