-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from ohai89/feat/support-cumulus-linux-vtysh
Add support for cumulus linux & vtysh
- Loading branch information
Showing
17 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
platform-type: 'cumulus_linux' | ||
default: | ||
driver-type: "network" | ||
privilege-levels: | ||
exec: | ||
name: "exec" | ||
pattern: '(?im)^\S+@\S+:\S+:\S+\$\s*$' | ||
previous-priv: | ||
deescalate: | ||
escalate: | ||
escalate-auth: false | ||
escalate-prompt: | ||
configuration: | ||
name: "configuration" | ||
pattern: '(?im)^\S+@\S+:\S+:\S+#\s*$' | ||
previous-priv: "exec" | ||
deescalate: "exit" | ||
escalate: "sudo su" | ||
escalate-auth: true | ||
escalate-prompt: ": " | ||
default-desired-privilege-level: "exec" | ||
failed-when-contains: | ||
- "Permission denied" | ||
- "ERROR:" | ||
- "command not found" | ||
textfsm-platform: "" | ||
network-on-open: | ||
- operation: "acquire-priv" | ||
network-on-close: | ||
- operation: "acquire-priv" | ||
- operation: "channel.write" | ||
input: "exit" | ||
- operation: "channel.return" | ||
variants: | ||
root_login: | ||
driver-type: "network" | ||
privilege-levels: | ||
exec: | ||
name: "exec" | ||
pattern: '(?im)^\S+@\S+:\S+:\S+#\s*$' | ||
previous-priv: | ||
deescalate: | ||
escalate: | ||
escalate-auth: false | ||
escalate-prompt: ": " | ||
configuration: | ||
name: "configuration" | ||
pattern: '(?im)^\S+@\S+:\S+:\S+#\s*$' | ||
previous-priv: exec | ||
deescalate: | ||
escalate: | ||
escalate-auth: false | ||
escalate-prompt: | ||
default-desired-privilege-level: "exec" | ||
failed-when-contains: | ||
- "Permission denied" | ||
- "ERROR:" | ||
textfsm-platform: "" | ||
network-on-open: | ||
- operation: "acquire-priv" | ||
network-on-close: | ||
- operation: "acquire-priv" | ||
- operation: "channel.write" | ||
input: "exit" | ||
- operation: "channel.return" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
platform-type: 'cumulus_vtysh' | ||
default: | ||
driver-type: "network" | ||
privilege-levels: | ||
linux: | ||
name: "linux" | ||
pattern: '(?im)^\S+@\S+:\S+:\S+[\$|#]\s*$' | ||
previous-priv: | ||
deescalate: | ||
escalate: | ||
escalate-auth: false | ||
escalate-prompt: | ||
exec: | ||
name: "exec" | ||
pattern: '(?im)^[\w\.\-]+#\s*$' | ||
previous-priv: "linux" | ||
deescalate: "exit" | ||
escalate: "vtysh" | ||
escalate-auth: false | ||
escalate-prompt: | ||
configuration: | ||
name: "configuration" | ||
pattern: '(?im)^[\w\.\-]+\(config\)#\s*$' | ||
previous-priv: "exec" | ||
deescalate: "exit" | ||
escalate: "configure terminal" | ||
escalate-auth: false | ||
escalate-prompt: | ||
default-desired-privilege-level: "exec" | ||
failed-when-contains: | ||
- "Permission denied" | ||
- "ERROR:" | ||
- "% Unknown command" | ||
- "% Command incomplete" | ||
textfsm-platform: "" | ||
network-on-open: | ||
- operation: "acquire-priv" | ||
network-on-close: | ||
- operation: "acquire-priv" | ||
- operation: "channel.write" | ||
input: "exit" | ||
- operation: "channel.return" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
driver/generic/test-fixtures/golden/send-commands-failure-simple-in.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thiscommandshouldfail | ||
|
1 change: 1 addition & 0 deletions
1
driver/generic/test-fixtures/golden/send-commands-failure-simple-out.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
% Unknown command or computer name, or unable to find computer address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
C3560CX#thiscommandshouldfail | ||
% Unknown command or computer name, or unable to find computer address | ||
C3560CX# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters