diff options
Diffstat (limited to 'op-mode-definitions/show-interfaces-bonding.xml.in')
-rw-r--r-- | op-mode-definitions/show-interfaces-bonding.xml.in | 117 |
1 files changed, 58 insertions, 59 deletions
diff --git a/op-mode-definitions/show-interfaces-bonding.xml.in b/op-mode-definitions/show-interfaces-bonding.xml.in index 0abb7cd5a..58f754ad6 100644 --- a/op-mode-definitions/show-interfaces-bonding.xml.in +++ b/op-mode-definitions/show-interfaces-bonding.xml.in @@ -4,26 +4,17 @@ <children> <node name="interfaces"> <children> - <tagNode name="bonding"> + <node name="bonding"> <properties> - <help>Show specified Bonding interface information</help> - <completionHelp> - <path>interfaces bonding</path> - </completionHelp> + <help>Show specified bonding interface information</help> </properties> <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bonding</command> <children> - <leafNode name="brief"> - <properties> - <help>Show summary of the specified bonding interface information</help> - </properties> - <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bonding</command> - </leafNode> <leafNode name="detail"> <properties> - <help>Show detailed interface information</help> + <help>Show detailed bonding interface information</help> </properties> - <command>if [ -f "/proc/net/bonding/$4" ]; then sudo cat "/proc/net/bonding/$4"; else echo "Interface $4 does not exist!"; fi</command> + <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding</command> </leafNode> <node name="lacp"> <properties> @@ -34,13 +25,7 @@ <properties> <help>Show LACP details</help> </properties> - <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail --interface="$4" </command> - </leafNode> - <leafNode name="neighbors"> - <properties> - <help>Show LACP Neighbors</help> - </properties> - <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_neighbors --interface="$4"</command> + <command>${vyos_op_scripts_dir}/bonding.py show_lacp_detail</command> </leafNode> </children> </node> @@ -48,59 +33,73 @@ <properties> <help>Show specified bonding interface information</help> </properties> - <command>${vyos_op_scripts_dir}/show-bond.py --interface "$4"</command> + <command>${vyos_op_scripts_dir}/show-bond.py --slaves</command> </leafNode> - <tagNode name="vif"> + <virtualTagNode> <properties> - <help>Show specified virtual network interface (vif) information</help> <completionHelp> - <path>interfaces bonding ${COMP_WORDS[3]} vif</path> + <path>interfaces bonding</path> </completionHelp> - </properties> - <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=bonding</command> + </properties> + <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bonding</command> <children> <leafNode name="brief"> <properties> - <help>Show summary of specified virtual network interface (vif) information</help> + <help>Show summary of the specified bonding interface information</help> </properties> - <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=bonding</command> + <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bonding</command> </leafNode> - </children> - </tagNode> - #include <include/show-interface-type-event-log.xml.i> - </children> - </tagNode> - <node name="bonding"> - <properties> - <help>Show Bonding interface information</help> - </properties> - <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=bonding</command> - <children> - <leafNode name="detail"> - <properties> - <help>Show detailed bonding interface information</help> - </properties> - <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding</command> - </leafNode> - <node name="lacp"> - <properties> - <help>Show LACP related info</help> - </properties> - <children> <leafNode name="detail"> <properties> - <help>Show LACP details</help> + <help>Show detailed interface information</help> </properties> - <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail</command> + <command>${vyos_op_scripts_dir}/show_bonding_detail.sh "$4"</command> </leafNode> + <node name="lacp"> + <properties> + <help>Show LACP related info</help> + </properties> + <children> + <leafNode name="detail"> + <properties> + <help>Show LACP details</help> + </properties> + <command>${vyos_op_scripts_dir}/bonding.py show_lacp_detail --interface="$4" </command> + </leafNode> + <leafNode name="neighbors"> + <properties> + <help>Show LACP Neighbors</help> + </properties> + <command>${vyos_op_scripts_dir}/bonding.py show_lacp_neighbors --interface="$4"</command> + </leafNode> + </children> + </node> + <leafNode name="slaves"> + <properties> + <help>Show specified bonding interface information</help> + </properties> + <command>${vyos_op_scripts_dir}/show-bond.py --interface "$4"</command> + </leafNode> + <tagNode name="vif"> + <properties> + <help>Show specified virtual network interface (vif) information</help> + <completionHelp> + <path>interfaces bonding ${COMP_WORDS[3]} vif</path> + </completionHelp> + </properties> + <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=bonding</command> + <children> + <leafNode name="brief"> + <properties> + <help>Show summary of specified virtual network interface (vif) information</help> + </properties> + <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=bonding</command> + </leafNode> + </children> + </tagNode> + #include <include/show-interface-type-event-log.xml.i> </children> - </node> - <leafNode name="slaves"> - <properties> - <help>Show specified bonding interface information</help> - </properties> - <command>${vyos_op_scripts_dir}/show-bond.py --slaves</command> - </leafNode> + </virtualTagNode> </children> </node> </children> |