From c5e6a28f5697e9448dbb343f5023709cbc2d3c8b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 5 Jan 2010 15:34:56 -0800 Subject: Change 'protocols snmp' to 'service snmp' Bug 212 The entries in config under protocols were all routing protocols except SNMP which was an unfortunate original design choice. Config script does migration. --- templates/protocols/snmp/community/node.def | 3 --- .../protocols/snmp/community/node.tag/authorization/node.def | 7 ------- templates/protocols/snmp/community/node.tag/client/node.def | 3 --- templates/protocols/snmp/community/node.tag/network/node.def | 4 ---- templates/protocols/snmp/contact/node.def | 2 -- templates/protocols/snmp/description/node.def | 2 -- templates/protocols/snmp/location/node.def | 3 --- templates/protocols/snmp/node.def | 12 ------------ templates/protocols/snmp/trap-target/node.def | 3 --- templates/service/snmp/community/node.def | 3 +++ .../service/snmp/community/node.tag/authorization/node.def | 7 +++++++ templates/service/snmp/community/node.tag/client/node.def | 3 +++ templates/service/snmp/community/node.tag/network/node.def | 4 ++++ templates/service/snmp/contact/node.def | 2 ++ templates/service/snmp/description/node.def | 2 ++ templates/service/snmp/location/node.def | 3 +++ templates/service/snmp/node.def | 12 ++++++++++++ templates/service/snmp/trap-target/node.def | 3 +++ 18 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 templates/protocols/snmp/community/node.def delete mode 100644 templates/protocols/snmp/community/node.tag/authorization/node.def delete mode 100644 templates/protocols/snmp/community/node.tag/client/node.def delete mode 100644 templates/protocols/snmp/community/node.tag/network/node.def delete mode 100644 templates/protocols/snmp/contact/node.def delete mode 100644 templates/protocols/snmp/description/node.def delete mode 100644 templates/protocols/snmp/location/node.def delete mode 100644 templates/protocols/snmp/node.def delete mode 100644 templates/protocols/snmp/trap-target/node.def create mode 100644 templates/service/snmp/community/node.def create mode 100644 templates/service/snmp/community/node.tag/authorization/node.def create mode 100644 templates/service/snmp/community/node.tag/client/node.def create mode 100644 templates/service/snmp/community/node.tag/network/node.def create mode 100644 templates/service/snmp/contact/node.def create mode 100644 templates/service/snmp/description/node.def create mode 100644 templates/service/snmp/location/node.def create mode 100644 templates/service/snmp/node.def create mode 100644 templates/service/snmp/trap-target/node.def (limited to 'templates') diff --git a/templates/protocols/snmp/community/node.def b/templates/protocols/snmp/community/node.def deleted file mode 100644 index cf95bc27..00000000 --- a/templates/protocols/snmp/community/node.def +++ /dev/null @@ -1,3 +0,0 @@ -tag: -type: txt -help: Set community name [REQUIRED] diff --git a/templates/protocols/snmp/community/node.tag/authorization/node.def b/templates/protocols/snmp/community/node.tag/authorization/node.def deleted file mode 100644 index c8918d43..00000000 --- a/templates/protocols/snmp/community/node.tag/authorization/node.def +++ /dev/null @@ -1,7 +0,0 @@ -type: txt -default: "ro" -help: Set authorization type (rw or ro) (default: ro) -syntax:expression: $VAR(@) in "ro", "rw"; "Authorization type must be either rw or ro" - - - diff --git a/templates/protocols/snmp/community/node.tag/client/node.def b/templates/protocols/snmp/community/node.tag/client/node.def deleted file mode 100644 index 828faa97..00000000 --- a/templates/protocols/snmp/community/node.tag/client/node.def +++ /dev/null @@ -1,3 +0,0 @@ -multi: -type: ipv4 -help: Set IP address of SNMP client allowed to contact system diff --git a/templates/protocols/snmp/community/node.tag/network/node.def b/templates/protocols/snmp/community/node.tag/network/node.def deleted file mode 100644 index 00a77d4b..00000000 --- a/templates/protocols/snmp/community/node.tag/network/node.def +++ /dev/null @@ -1,4 +0,0 @@ -multi: -type: ipv4net -help: Set subnet of SNMP client(s) allowed to contact system -syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" diff --git a/templates/protocols/snmp/contact/node.def b/templates/protocols/snmp/contact/node.def deleted file mode 100644 index 4251291e..00000000 --- a/templates/protocols/snmp/contact/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: Set contact information diff --git a/templates/protocols/snmp/description/node.def b/templates/protocols/snmp/description/node.def deleted file mode 100644 index 6324a96b..00000000 --- a/templates/protocols/snmp/description/node.def +++ /dev/null @@ -1,2 +0,0 @@ -type: txt -help: Set description information diff --git a/templates/protocols/snmp/location/node.def b/templates/protocols/snmp/location/node.def deleted file mode 100644 index f4bcef7c..00000000 --- a/templates/protocols/snmp/location/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: txt -help: Set location information - diff --git a/templates/protocols/snmp/node.def b/templates/protocols/snmp/node.def deleted file mode 100644 index 6ce9c2c7..00000000 --- a/templates/protocols/snmp/node.def +++ /dev/null @@ -1,12 +0,0 @@ -priority: 980 -help: Configure Simple Network Management Protocol (SNMP) -commit:expression: $VAR(community/) != ""; "must configure a community" - -delete: touch /tmp/snmp.$PPID -end:if [ -f "/tmp/snmp.$PPID" ] - then sudo /opt/vyatta/sbin/vyatta-snmp.pl --stop-snmp - rm /tmp/snmp.$PPID - rm -f /etc/snmp/snmpd.conf - else - sudo /opt/vyatta/sbin/vyatta-snmp.pl --update-snmp - fi diff --git a/templates/protocols/snmp/trap-target/node.def b/templates/protocols/snmp/trap-target/node.def deleted file mode 100644 index c041d108..00000000 --- a/templates/protocols/snmp/trap-target/node.def +++ /dev/null @@ -1,3 +0,0 @@ -multi: -type: ipv4 -help: Set IP address of trap target diff --git a/templates/service/snmp/community/node.def b/templates/service/snmp/community/node.def new file mode 100644 index 00000000..cf95bc27 --- /dev/null +++ b/templates/service/snmp/community/node.def @@ -0,0 +1,3 @@ +tag: +type: txt +help: Set community name [REQUIRED] diff --git a/templates/service/snmp/community/node.tag/authorization/node.def b/templates/service/snmp/community/node.tag/authorization/node.def new file mode 100644 index 00000000..c8918d43 --- /dev/null +++ b/templates/service/snmp/community/node.tag/authorization/node.def @@ -0,0 +1,7 @@ +type: txt +default: "ro" +help: Set authorization type (rw or ro) (default: ro) +syntax:expression: $VAR(@) in "ro", "rw"; "Authorization type must be either rw or ro" + + + diff --git a/templates/service/snmp/community/node.tag/client/node.def b/templates/service/snmp/community/node.tag/client/node.def new file mode 100644 index 00000000..828faa97 --- /dev/null +++ b/templates/service/snmp/community/node.tag/client/node.def @@ -0,0 +1,3 @@ +multi: +type: ipv4 +help: Set IP address of SNMP client allowed to contact system diff --git a/templates/service/snmp/community/node.tag/network/node.def b/templates/service/snmp/community/node.tag/network/node.def new file mode 100644 index 00000000..00a77d4b --- /dev/null +++ b/templates/service/snmp/community/node.tag/network/node.def @@ -0,0 +1,4 @@ +multi: +type: ipv4net +help: Set subnet of SNMP client(s) allowed to contact system +syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" diff --git a/templates/service/snmp/contact/node.def b/templates/service/snmp/contact/node.def new file mode 100644 index 00000000..4251291e --- /dev/null +++ b/templates/service/snmp/contact/node.def @@ -0,0 +1,2 @@ +type: txt +help: Set contact information diff --git a/templates/service/snmp/description/node.def b/templates/service/snmp/description/node.def new file mode 100644 index 00000000..6324a96b --- /dev/null +++ b/templates/service/snmp/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: Set description information diff --git a/templates/service/snmp/location/node.def b/templates/service/snmp/location/node.def new file mode 100644 index 00000000..f4bcef7c --- /dev/null +++ b/templates/service/snmp/location/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set location information + diff --git a/templates/service/snmp/node.def b/templates/service/snmp/node.def new file mode 100644 index 00000000..6ce9c2c7 --- /dev/null +++ b/templates/service/snmp/node.def @@ -0,0 +1,12 @@ +priority: 980 +help: Configure Simple Network Management Protocol (SNMP) +commit:expression: $VAR(community/) != ""; "must configure a community" + +delete: touch /tmp/snmp.$PPID +end:if [ -f "/tmp/snmp.$PPID" ] + then sudo /opt/vyatta/sbin/vyatta-snmp.pl --stop-snmp + rm /tmp/snmp.$PPID + rm -f /etc/snmp/snmpd.conf + else + sudo /opt/vyatta/sbin/vyatta-snmp.pl --update-snmp + fi diff --git a/templates/service/snmp/trap-target/node.def b/templates/service/snmp/trap-target/node.def new file mode 100644 index 00000000..c041d108 --- /dev/null +++ b/templates/service/snmp/trap-target/node.def @@ -0,0 +1,3 @@ +multi: +type: ipv4 +help: Set IP address of trap target -- cgit v1.2.3