diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-01-31 03:53:52 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-01-31 03:53:52 +0100 |
commit | fd61aeda39cb8d1d0d857bec9408db1db3fb0069 (patch) | |
tree | bb59b2bbdcbcfdf774e02587e5b36576f8671afa /templates/service/snmp | |
parent | e628fd08414df3bc30918f0fe818d11d33e39451 (diff) | |
download | vyatta-cfg-system-fd61aeda39cb8d1d0d857bec9408db1db3fb0069.tar.gz vyatta-cfg-system-fd61aeda39cb8d1d0d857bec9408db1db3fb0069.zip |
Merge changes to SNMPv3 templates and scripts from vRouter 5400 trial ISO.
Changes are copyright 2013, Vyatta, a Brocade company.
Diffstat (limited to 'templates/service/snmp')
6 files changed, 12 insertions, 4 deletions
diff --git a/templates/service/snmp/v3/engineid/node.def b/templates/service/snmp/v3/engineid/node.def new file mode 100644 index 00000000..f8de80cc --- /dev/null +++ b/templates/service/snmp/v3/engineid/node.def @@ -0,0 +1,3 @@ +type: txt +help: Specifies the EngineID as a hex value (e.g., 0xff42) +syntax:expression: pattern $VAR(@) "^(0x){0,1}([0-9a-f][0-9a-f]){1,18}$" ; "id must contain an even number (from 2 to 36) of hex digits" diff --git a/templates/service/snmp/v3/trap-target/node.tag/engineid/node.def b/templates/service/snmp/v3/trap-target/node.tag/engineid/node.def index 7a621af6..45d522ea 100644 --- a/templates/service/snmp/v3/trap-target/node.tag/engineid/node.def +++ b/templates/service/snmp/v3/trap-target/node.tag/engineid/node.def @@ -1,3 +1,3 @@ type: txt help: Defines the engineID. (needs for trap) -syntax:expression: pattern $VAR(@) "^([0-9a-f][0-9a-f]){1,16}$" ; "id must contain from 2 to 32 hex digits"
\ No newline at end of file +syntax:expression: pattern $VAR(@) "^(0x){0,1}([0-9a-f][0-9a-f]){1,18}$" ; "id must contain from 2 to 36 hex digits"
\ No newline at end of file diff --git a/templates/service/snmp/v3/tsm/local-key/node.def b/templates/service/snmp/v3/tsm/local-key/node.def index 4bc3d07b..a630dff8 100644 --- a/templates/service/snmp/v3/tsm/local-key/node.def +++ b/templates/service/snmp/v3/tsm/local-key/node.def @@ -11,4 +11,4 @@ syntax:expression: pattern $VAR(@) "^[0-9A-F]{2}(:[0-9A-F]{2}){19}$" || exit 0; \ else \ exit 1; \ - fi" ; "value can be finger print key or filename in /etc/snmp/tls/certs folder"
\ No newline at end of file + fi" ; "value can be finger print key or filename in /config/snmp/tls/certs/ folder"
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def b/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def index 4f840d7c..7be1bc65 100644 --- a/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def +++ b/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def @@ -2,4 +2,5 @@ type: txt help: Defines the key in the clear text for authentication protocol syntax:expression: pattern $VAR(@) "^.{8,}$" ; "key must contain 8 or more characters" -update:expression: $VAR(../encrypted-key/@) = ""
\ No newline at end of file +update:expression: $VAR(../encrypted-key/@) = "" && $VAR(../../engineid/@) = "" +update:expression: $VAR(../../../engineid/@) != "" || $VAR(../../../engineid/@) = "" diff --git a/templates/service/snmp/v3/user/node.tag/engineid/node.def b/templates/service/snmp/v3/user/node.tag/engineid/node.def new file mode 100644 index 00000000..84cf1443 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/engineid/node.def @@ -0,0 +1,3 @@ +type: txt +help: Specifies the EngineID +syntax:expression: pattern $VAR(@) "^(0x){0,1}([0-9a-f][0-9a-f]){1,18}$" ; "id must contain from 2 to 36 hex digits" diff --git a/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def b/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def index 5d706712..a9543530 100644 --- a/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def +++ b/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def @@ -2,4 +2,5 @@ type: txt help: Defines the key in the clear text for protocol for privacy syntax:expression: pattern $VAR(@) "^.{8,}$" ; "key must contain 8 or more characters" -update:expression: $VAR(../encrypted-key/@) = ""
\ No newline at end of file +update:expression: $VAR(../encrypted-key/@) = "" && $VAR(../../engineid/@) = "" +update:expression: $VAR(../../../engineid/@) != "" || $VAR(../../../engineid/@) = ""
\ No newline at end of file |