diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2018-07-02 11:07:30 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2018-07-02 11:07:30 +0200 |
commit | f589232485ea72003b866093a6fbd4c8aac8f8f8 (patch) | |
tree | 6494934d6caade96b2887928bc4ff921a8d9ca21 /op-mode-definitions | |
parent | 48596dcce9e431e448eb8684dc55d922bf7fa2c9 (diff) | |
download | vyos-salt-minion-f589232485ea72003b866093a6fbd4c8aac8f8f8.tar.gz vyos-salt-minion-f589232485ea72003b866093a6fbd4c8aac8f8f8.zip |
rework for one script
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/bandwidth-monitor.xml | 23 | ||||
-rw-r--r-- | op-mode-definitions/dns-forwarding.xml | 72 | ||||
-rw-r--r-- | op-mode-definitions/poweroff.xml | 40 | ||||
-rw-r--r-- | op-mode-definitions/reboot.xml | 40 | ||||
-rw-r--r-- | op-mode-definitions/show-arp.xml | 25 | ||||
-rw-r--r-- | op-mode-definitions/show-bridge.xml | 37 | ||||
-rw-r--r-- | op-mode-definitions/show-configuration.xml | 39 | ||||
-rw-r--r-- | op-mode-definitions/show-date.xml | 30 | ||||
-rw-r--r-- | op-mode-definitions/show-disk.xml | 24 | ||||
-rw-r--r-- | op-mode-definitions/show-hardware.xml | 95 | ||||
-rw-r--r-- | op-mode-definitions/show-raid.xml | 18 | ||||
-rw-r--r-- | op-mode-definitions/show-users.xml | 30 | ||||
-rw-r--r-- | op-mode-definitions/snmp.xml | 111 | ||||
-rw-r--r-- | op-mode-definitions/traffic-dump.xml | 45 | ||||
-rw-r--r-- | op-mode-definitions/version.xml | 27 |
15 files changed, 0 insertions, 656 deletions
diff --git a/op-mode-definitions/bandwidth-monitor.xml b/op-mode-definitions/bandwidth-monitor.xml deleted file mode 100644 index 410ab49..0000000 --- a/op-mode-definitions/bandwidth-monitor.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="monitor"> - <children> - <node name="bandwidth"> - <properties> - <help>Monitor interface bandwidth in real time</help> - </properties> - <children> - <tagNode name="interface"> - <command>bmon -p $4</command> - <properties> - <help>Monitor bandwidth usage on specified interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - </tagNode> - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/dns-forwarding.xml b/op-mode-definitions/dns-forwarding.xml deleted file mode 100644 index e789f4a..0000000 --- a/op-mode-definitions/dns-forwarding.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0"?> - -<interfaceDefinition> - <node name="show"> - <children> - <node name="dns"> - <children> - <node name="forwarding"> - <properties> - <help>Show DNS forwarding information</help> - </properties> - <children> - <leafNode name="statistics"> - <properties> - <help>Show DNS forwarding statistics</help> - </properties> - <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_statistics.py</command> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> - <node name="restart"> - <children> - <node name="dns"> - <properties> - <help>Restart a DNS service</help> - </properties> - <children> - <leafNode name="forwarding"> - <properties> - <help>Restart DNS forwarding service</help> - </properties> - <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_restart.sh</command> - </leafNode> - </children> - </node> - </children> - </node> - <node name="reset"> - <children> - <node name="dns"> - <properties> - <help>Reset a DNS service state</help> - </properties> - <children> - <node name="forwarding"> - <properties> - <help>Reset DNS forwarding cache</help> - </properties> - <children> - <tagNode name="domain"> - <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py $5</command> - <properties> - <help>Reset DNS forwarding cache for a domain</help> - </properties> - </tagNode> - <leafNode name="all"> - <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py --all</command> - <properties> - <help>Reset DNS forwarding cache</help> - </properties> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/poweroff.xml b/op-mode-definitions/poweroff.xml deleted file mode 100644 index 07cea79..0000000 --- a/op-mode-definitions/poweroff.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="poweroff"> - <properties> - <help>Poweroff the system</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-poweroff.pl --action poweroff</command> - <children> - <leafNode name="now"> - <properties> - <help>Poweroff the system without confirmation</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-poweroff.pl --action poweroff --now</command> - </leafNode> - - <leafNode name="cancel"> - <properties> - <help>Cancel a pending poweroff</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-poweroff.pl --action poweroff_cancel</command> - </leafNode> - - - <tagNode name="at"> - <properties> - <help>Poweroff at a specific time</help> - <completionHelp> - <list>HH:MM</list> - <list>MMDDYY</list> - <list>midnight</list> - <list>noon</list> - </completionHelp> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-poweroff.pl --action poweroff_at --at_time '$3'</command> - - </tagNode> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/reboot.xml b/op-mode-definitions/reboot.xml deleted file mode 100644 index 2c5a85d..0000000 --- a/op-mode-definitions/reboot.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="reboot"> - <properties> - <help>Reboot the system</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-reboot.pl --action reboot</command> - <children> - <leafNode name="now"> - <properties> - <help>Reboot the system without confirmation</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-reboot.pl --action reboot --now</command> - </leafNode> - - <leafNode name="cancel"> - <properties> - <help>Cancel a pending reboot</help> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-reboot.pl --action reboot_cancel</command> - </leafNode> - - - <tagNode name="at"> - <properties> - <help>Reboot at a specific time</help> - <completionHelp> - <list>HH:MM</list> - <list>MMDDYY</list> - <list>midnight</list> - <list>noon</list> - </completionHelp> - </properties> - <command>/opt/vyatta/bin/sudo-users/vyatta-reboot.pl --action reboot_at --at_time '$3'</command> - - </tagNode> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-arp.xml b/op-mode-definitions/show-arp.xml deleted file mode 100644 index 92c231c..0000000 --- a/op-mode-definitions/show-arp.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="arp"> - <properties> - <help>Show Address Resolution Protocol (ARP) information</help> - </properties> - <command>/usr/sbin/arp -e -n</command> - <children> - <tagNode name="interface"> - <properties> - <help>Show Address Resolution Protocol (ARP) cache for specified interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py -b</script> - </completionHelp> - </properties> - <command>/usr/sbin/arp -e -n -i '$4'</command> - </tagNode> - </children> - </node> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-bridge.xml b/op-mode-definitions/show-bridge.xml deleted file mode 100644 index a324195..0000000 --- a/op-mode-definitions/show-bridge.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <leafNode name="bridge"> - <properties> - <help>Show bridging information</help> - </properties> - <command>/sbin/brctl show</command> - </leafNode> - <tagNode name="bridge"> - <properties> - <help>Show bridge information for a given bridge interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py --type bridge</script> - </completionHelp> - </properties> - <command>/sbin/brctl show '$3'</command> - <children> - <leafNode name="macs"> - <properties> - <help>Show bridge Media Access Control (MAC) address table</help> - </properties> - <command>/sbin/brctl showmacs '$3'</command> - </leafNode> - <leafNode name="spanning-tree"> - <properties> - <help>Show bridge spanning tree information</help> - </properties> - <command>/sbin/brctl showstp '$3'</command> - </leafNode> - </children> - </tagNode> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-configuration.xml b/op-mode-definitions/show-configuration.xml deleted file mode 100644 index 0b1507b..0000000 --- a/op-mode-definitions/show-configuration.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="configuration"> - <properties> - <help>Show available saved configurations</help> - </properties> - <!-- no admin check --> - <command>cli-shell-api showCfg --show-active-only --show-hide-secrets</command> - - <children> - <node name="all"> - <properties> - <help>Show running configuration (including default values)</help> - </properties> - <!-- no admin check --> - <command>cli-shell-api showCfg --show-show-defaults --show-active-only --show-hide-secrets</command> - </node> - <node name="commands"> - <properties> - <help> Show running configuration as set commands </help> - </properties> - <!-- no admin check --> - <command>cli-shell-api showCfg --show-active-only | vyos-config-to-commands</command> - </node> - <node name="files"> - <properties> - <help> Show available saved configurations </help> - </properties> - <!-- no admin check --> - <command>${vyos_op_scripts_dir}/show-configuration-files.sh</command> - </node> - </children> - </node> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-date.xml b/op-mode-definitions/show-date.xml deleted file mode 100644 index 705172b..0000000 --- a/op-mode-definitions/show-date.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="date"> - <properties> - <help>Show system time and date</help> - </properties> - <command>/bin/date</command> - <children> - <node name="utc"> - <properties> - <help>Show system date and time as Coordinated Universal Time</help> - </properties> - <command>/bin/date -u</command> - <children> - <leafNode name="maya"> - <properties> - <help>Show UTC date in Maya calendar format</help> - </properties> - <command>${vyos_op_scripts_dir}/maya_date.py $(date +%s)</command> - </leafNode> - </children> - </node> - </children> - </node> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-disk.xml b/op-mode-definitions/show-disk.xml deleted file mode 100644 index db47395..0000000 --- a/op-mode-definitions/show-disk.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <tagNode name="disk"> - <properties> - <help>Show status of disk device</help> - <completionHelp> - <script>${vyos_completion_dir}/list_disks.sh</script> - </completionHelp> - </properties> - <children> - <leafNode name="format"> - <properties> - <help>Show disk drive formatting</help> - </properties> - <command>${vyos_op_scripts_dir}/show-disk-format.sh $3</command> - </leafNode> - </children> - </tagNode> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-hardware.xml b/op-mode-definitions/show-hardware.xml deleted file mode 100644 index 6cd912a..0000000 --- a/op-mode-definitions/show-hardware.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="hardware"> - <properties> - <help>Show system hardware details</help> - </properties> - <children> - <node name="cpu"> - <properties> - <help>Show CPU info</help> - </properties> - <command>lscpu</command> - <children> - <node name="detail"> - <properties> - <help> Show system CPU details</help> - </properties> - <command>cat /proc/cpuinfo</command> - </node> - <node name="summary"> - <properties> - <help>Show CPU's on system</help> - </properties> - <command>${vyos_op_scripts_dir}/cpu_summary.py</command> - </node> - </children> - </node> - - <node name="dmi"> - <properties> - <help>Show system DMI details</help> - </properties> - <command>${vyatta_bindir}/vyatta-show-dmi</command> - </node> - - <node name="mem"> - <properties> - <help>Show system RAM details</help> - </properties> - <command>cat /proc/meminfo</command> - </node> - - <node name="pci"> - <properties> - <help>Show system PCI bus details</help> - </properties> - <command>lspci</command> - <children> - <node name="detail"> - <properties> - <help>Show verbose system PCI bus details</help> - </properties> - <command>lspci -vvv</command> - </node> - </children> - </node> - - - <node name="scsi"> - <properties> - <help>Show SCSI device information</help> - </properties> - <command>lsscsi</command> - <children> - <node name="detail"> - <properties> - <help>Show detailed SCSI device information</help> - </properties> - <command>lsscsi -vvv</command> - </node> - </children> - </node> - - <node name="usb"> - <properties> - <help>Show peripherals connected to the USB bus</help> - </properties> - <command>lsusb</command> - <children> - <node name="detail"> - <properties> - <help>Show detailed USB bus information</help> - </properties> - <command>lsusb -v</command> - </node> - </children> - </node> - - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-raid.xml b/op-mode-definitions/show-raid.xml deleted file mode 100644 index b093074..0000000 --- a/op-mode-definitions/show-raid.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <tagNode name="raid"> - <properties> - <help>Show statis of RAID set</help> - <completionHelp> - <script>${vyos_completion_dir}/list_raidset.sh</script> - </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/show_raid.sh $3</command> - - </tagNode> - - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/show-users.xml b/op-mode-definitions/show-users.xml deleted file mode 100644 index a026e47..0000000 --- a/op-mode-definitions/show-users.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="users"> - <properties> - <help>Show user information</help> - </properties> - <command>who -H</command> - <children> - <node name="recent"> - <properties> - <help>Show 10 recently logged in users</help> - </properties> - <command>last -aF -n 10 | sed -e 's/^wtmp begins/Displaying logins since/'</command> - </node> - <tagNode name="recent"> - <properties> - <help>Show specified number of recently logged in users</help> - <completionHelp> - <list>NUMBER</list> - </completionHelp> - </properties> - <command>last -aF -n $4 | sed -e 's/^wtmp begins/Displaying logins since/'</command> - </tagNode> - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/snmp.xml b/op-mode-definitions/snmp.xml deleted file mode 100644 index a0a47da..0000000 --- a/op-mode-definitions/snmp.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="snmp"> - <properties> - <help>Show status of SNMP on localhost</help> - </properties> - <children> - <tagNode name="community"> - <properties> - <help>Show status of SNMP community</help> - <completionHelp> - <script>${vyos_op_scripts_dir}/snmp.py --allowed</script> - </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/snmp.py --community="$4"</command> - <children> - <tagNode name="host"> - <properties> - <help>Show status of SNMP on remote host</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp.py --community="$4" --host "$6"</command> - </tagNode> - </children> - </tagNode> - <node name="mib"> - <properties> - <help>Show SNMP MIB information</help> - </properties> - <children> - <node name="ifmib"> - <properties> - <help>Show all SNMP interfaces MIB information</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_ifmib.py</command> - <children> - <tagNode name="ifAlias"> - <properties> - <help>Show SNMP ifAlias for specified interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifalias="$6"</command> - </tagNode> - <tagNode name="ifDescr"> - <properties> - <help>Show SNMP ifDescr for specified interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifdescr="$6"</command> - </tagNode> - <tagNode name="ifIndex"> - <properties> - <help>Show SNMP ifDescr for specified interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifindex="$6"</command> - </tagNode> - </children> - </node> - </children> - </node> - <node name="v3"> - <properties> - <help>Show SNMP v3 status on localhost</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3.py --all</command> - <children> - <leafNode name="certificates"> - <properties> - <help>Show TSM certificates</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3_showcerts.sh</command> - </leafNode> - <leafNode name="group"> - <properties> - <help>Show the list of configured groups</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3.py --group</command> - </leafNode> - <leafNode name="trap-target"> - <properties> - <help>Show the list of configured targets</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3.py --trap</command> - </leafNode> - <leafNode name="user"> - <properties> - <help>Show the list of configured users</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3.py --user</command> - </leafNode> - <leafNode name="view"> - <properties> - <help>Show the list of configured views</help> - </properties> - <command>${vyos_op_scripts_dir}/snmp_v3.py --view</command> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/traffic-dump.xml b/op-mode-definitions/traffic-dump.xml deleted file mode 100644 index a681064..0000000 --- a/op-mode-definitions/traffic-dump.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="monitor"> - <children> - <node name="traffic"> - <properties> - <help>Monitor traffic dumps</help> - </properties> - <children> - <tagNode name="interface"> - <command>tcpdump -i $4</command> - <properties> - <help>Monitor traffic dump from an interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_dumpable_interfaces.py</script> - </completionHelp> - </properties> - <children> - <tagNode name="filter"> - <command>tcpdump -n -i $4 $6</command> - <properties> - <help>Monitor traffic matching filter conditions</help> - </properties> - </tagNode> - <tagNode name="save"> - <command>tcpdump -n -i $4 -w $6</command> - <properties> - <help>Save traffic dump from an interface to a file</help> - </properties> - <children> - <tagNode name="filter"> - <command>tcpdump -n -i $4 -w $6 $8</command> - <properties> - <help>Save a dump of traffic matching filter conditions to a file</help> - </properties> - </tagNode> - </children> - </tagNode> - </children> - </tagNode> - </children> - </node> - </children> - </node> -</interfaceDefinition> diff --git a/op-mode-definitions/version.xml b/op-mode-definitions/version.xml deleted file mode 100644 index 593785f..0000000 --- a/op-mode-definitions/version.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<interfaceDefinition> - <node name="show"> - <children> - <node name="version"> - <properties> - <help>Show system version information</help> - </properties> - <command>${vyos_op_scripts_dir}/version.py</command> - <children> - <leafNode name="funny"> - <properties> - <help>Show system version and some fun stuff</help> - </properties> - <command>${vyos_op_scripts_dir}/version.py --funny</command> - </leafNode> - <leafNode name="all"> - <properties> - <help>Show system version and versions of all packages</help> - </properties> - <command>${vyos_op_scripts_dir}/version.py --all</command> - </leafNode> - </children> - </node> - </children> - </node> -</interfaceDefinition> |