diff options
author | Roman Khramshin <HollyGurza@users.noreply.github.com> | 2024-05-31 16:04:42 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 12:04:42 +0300 |
commit | 5563bcd9eaef5d5d8a020b92d43a86028e3c26c1 (patch) | |
tree | f580a6cfd3afc0f45de784f646d76fb96867241b /interface-definitions/include | |
parent | a9fb0ac0ca5644db7bf9d75951b3cd97c3598c60 (diff) | |
download | vyos-1x-5563bcd9eaef5d5d8a020b92d43a86028e3c26c1.tar.gz vyos-1x-5563bcd9eaef5d5d8a020b92d43a86028e3c26c1.zip |
T5307: QoS - traffic-class-map services (#3492)
added new syntax to work with class match filters in QoS policy
Diffstat (limited to 'interface-definitions/include')
6 files changed, 111 insertions, 84 deletions
diff --git a/interface-definitions/include/qos/class-match-group.xml.i b/interface-definitions/include/qos/class-match-group.xml.i new file mode 100644 index 000000000..40e3b7259 --- /dev/null +++ b/interface-definitions/include/qos/class-match-group.xml.i @@ -0,0 +1,15 @@ +<!-- include start from qos/class-match-group.xml.i --> +<leafNode name="match-group"> + <properties> + <help>Filter group for QoS policy</help> + <valueHelp> + <format>txt</format> + <description>Match group name</description> + </valueHelp> + <completionHelp> + <script>${vyos_completion_dir}/qos/list_traffic_match_group.py</script> + </completionHelp> + <multi/> + </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/qos/class-match-ipv4.xml.i b/interface-definitions/include/qos/class-match-ipv4.xml.i new file mode 100644 index 000000000..dc44d32d5 --- /dev/null +++ b/interface-definitions/include/qos/class-match-ipv4.xml.i @@ -0,0 +1,31 @@ +<!-- include start from qos/class-match-ipv4.xml.i --> +<node name="ip"> + <properties> + <help>Match IP protocol header</help> + </properties> + <children> + <node name="destination"> + <properties> + <help>Match on destination port or address</help> + </properties> + <children> + #include <include/qos/class-match-ipv4-address.xml.i> + #include <include/port-number.xml.i> + </children> + </node> + #include <include/qos/match-dscp.xml.i> + #include <include/qos/max-length.xml.i> + #include <include/ip-protocol.xml.i> + <node name="source"> + <properties> + <help>Match on source port or address</help> + </properties> + <children> + #include <include/qos/class-match-ipv4-address.xml.i> + #include <include/port-number.xml.i> + </children> + </node> + #include <include/qos/tcp-flags.xml.i> + </children> +</node> +<!-- include end --> diff --git a/interface-definitions/include/qos/class-match-ipv6.xml.i b/interface-definitions/include/qos/class-match-ipv6.xml.i new file mode 100644 index 000000000..ed7aceff9 --- /dev/null +++ b/interface-definitions/include/qos/class-match-ipv6.xml.i @@ -0,0 +1,31 @@ +<!-- include start from qos/class-match-ipv6.xml.i --> +<node name="ipv6"> + <properties> + <help>Match IPv6 protocol header</help> + </properties> + <children> + <node name="destination"> + <properties> + <help>Match on destination port or address</help> + </properties> + <children> + #include <include/qos/class-match-ipv6-address.xml.i> + #include <include/port-number.xml.i> + </children> + </node> + #include <include/qos/match-dscp.xml.i> + #include <include/qos/max-length.xml.i> + #include <include/ip-protocol.xml.i> + <node name="source"> + <properties> + <help>Match on source port or address</help> + </properties> + <children> + #include <include/qos/class-match-ipv6-address.xml.i> + #include <include/port-number.xml.i> + </children> + </node> + #include <include/qos/tcp-flags.xml.i> + </children> +</node> +<!-- include end --> diff --git a/interface-definitions/include/qos/class-match-mark.xml.i b/interface-definitions/include/qos/class-match-mark.xml.i new file mode 100644 index 000000000..a7481c6aa --- /dev/null +++ b/interface-definitions/include/qos/class-match-mark.xml.i @@ -0,0 +1,14 @@ +<!-- include start from qos/class-match-mark.xml.i --> +<leafNode name="mark"> + <properties> + <help>Match on mark applied by firewall</help> + <valueHelp> + <format>u32</format> + <description>FW mark to match</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 0-4294967295"/> + </constraint> + </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/qos/class-match-vif.xml.i b/interface-definitions/include/qos/class-match-vif.xml.i new file mode 100644 index 000000000..ec58db606 --- /dev/null +++ b/interface-definitions/include/qos/class-match-vif.xml.i @@ -0,0 +1,15 @@ +<!-- include start from qos/class-match-vif.xml.i --> +<leafNode name="vif"> + <properties> + <help>Virtual Local Area Network (VLAN) ID for this match</help> + <valueHelp> + <format>u32:0-4095</format> + <description>Virtual Local Area Network (VLAN) tag </description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 0-4095"/> + </constraint> + <constraintErrorMessage>VLAN ID must be between 0 and 4095</constraintErrorMessage> + </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/qos/class-match.xml.i b/interface-definitions/include/qos/class-match.xml.i index 4ba12f8f7..77d1933a3 100644 --- a/interface-definitions/include/qos/class-match.xml.i +++ b/interface-definitions/include/qos/class-match.xml.i @@ -5,7 +5,7 @@ <constraint> <regex>[^-].*</regex> </constraint> - <constraintErrorMessage>Match queue name cannot start with hyphen (-)</constraintErrorMessage> + <constraintErrorMessage>Match queue name cannot start with hyphen</constraintErrorMessage> </properties> <children> #include <include/generic-description.xml.i> @@ -89,89 +89,10 @@ </children> </node> #include <include/generic-interface.xml.i> - <node name="ip"> - <properties> - <help>Match IP protocol header</help> - </properties> - <children> - <node name="destination"> - <properties> - <help>Match on destination port or address</help> - </properties> - <children> - #include <include/qos/class-match-ipv4-address.xml.i> - #include <include/port-number.xml.i> - </children> - </node> - #include <include/qos/match-dscp.xml.i> - #include <include/qos/max-length.xml.i> - #include <include/ip-protocol.xml.i> - <node name="source"> - <properties> - <help>Match on source port or address</help> - </properties> - <children> - #include <include/qos/class-match-ipv4-address.xml.i> - #include <include/port-number.xml.i> - </children> - </node> - #include <include/qos/tcp-flags.xml.i> - </children> - </node> - <node name="ipv6"> - <properties> - <help>Match IPv6 protocol header</help> - </properties> - <children> - <node name="destination"> - <properties> - <help>Match on destination port or address</help> - </properties> - <children> - #include <include/qos/class-match-ipv6-address.xml.i> - #include <include/port-number.xml.i> - </children> - </node> - #include <include/qos/match-dscp.xml.i> - #include <include/qos/max-length.xml.i> - #include <include/ip-protocol.xml.i> - <node name="source"> - <properties> - <help>Match on source port or address</help> - </properties> - <children> - #include <include/qos/class-match-ipv6-address.xml.i> - #include <include/port-number.xml.i> - </children> - </node> - #include <include/qos/tcp-flags.xml.i> - </children> - </node> - <leafNode name="mark"> - <properties> - <help>Match on mark applied by firewall</help> - <valueHelp> - <format>u32</format> - <description>FW mark to match</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 0-4294967295"/> - </constraint> - </properties> - </leafNode> - <leafNode name="vif"> - <properties> - <help>Virtual Local Area Network (VLAN) ID for this match</help> - <valueHelp> - <format>u32:0-4095</format> - <description>Virtual Local Area Network (VLAN) tag </description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 0-4095"/> - </constraint> - <constraintErrorMessage>VLAN ID must be between 0 and 4095</constraintErrorMessage> - </properties> - </leafNode> + #include <include/qos/class-match-ipv4.xml.i> + #include <include/qos/class-match-ipv6.xml.i> + #include <include/qos/class-match-mark.xml.i> + #include <include/qos/class-match-vif.xml.i> </children> </tagNode> <!-- include end --> |