Created experimenter subtype for vendor's actions
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-augments.yang
index 13f8b00a715eed776225b790c08090e0702f5fa3..a2e69293ca6eb6c66e3e27a292ffbf4f7ff85bb1 100644 (file)
-module openflow-augments {\r
+/*\r
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
\r
+ module openflow-augments {\r
     namespace "urn:opendaylight:openflow:augments";\r
     prefix "aug";\r
     \r
-    import openflow-protocol {prefix ofproto;}\r
+    import yang-ext {prefix ext;}\r
+    import ietf-inet-types {prefix inet;}\r
+    import ietf-yang-types {prefix yang;}\r
 \r
+    import openflow-types {prefix oft;}\r
+    import openflow-protocol {prefix ofproto;}\r
+    import openflow-action {prefix ofaction;}\r
+    import openflow-instruction {prefix ofinstruction;}\r
+    import openflow-extensible-match {prefix oxm;}\r
 \r
     revision "2013-10-02" {\r
-        description "Initial model";\r
+        description "OpenFlow 1.3 - augments model. \r
+                    Please visit \r
+                    https://wiki.opendaylight.org/view/File:OpenFlow_Protocol_Library_-_Project_documentation.pdf\r
+                     - Augmentation Tables chapter";\r
     }\r
 \r
-     augment "/ofproto:hello-message/ofproto:elements" {\r
-            leaf uid {\r
-                type uint16;\r
+// OFP_MATCH AUGMENTS\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "port-number-match-entry";\r
+         leaf port-number {\r
+             type oft:port-number;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "metadata-match-entry";\r
+         leaf metadata {\r
+             type binary;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "mask-match-entry";\r
+         leaf mask {\r
+             type binary;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "mac-address-match-entry";\r
+         leaf mac-address {\r
+             type yang:mac-address;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "eth-type-match-entry";\r
+         leaf eth-type {\r
+             type oft:ether-type;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "vlan-vid-match-entry";\r
+         leaf vlan-vid {\r
+             type uint16;\r
+         }\r
+         leaf cfi-bit {\r
+             type boolean;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "vlan-pcp-match-entry";\r
+         leaf vlan-pcp {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "dscp-match-entry";\r
+         leaf dscp {\r
+             type inet:dscp;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "ecn-match-entry";\r
+         leaf ecn {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "protocol-number-match-entry";\r
+         leaf protocol-number {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "port-match-entry";\r
+         leaf port {\r
+             type inet:port-number;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "icmpv4-type-match-entry";\r
+         leaf icmpv4-type {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "icmpv4-code-match-entry";\r
+         leaf icmpv4-code {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "op-code-match-entry";\r
+         leaf op-code {\r
+             type uint16;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "ipv6-flabel-match-entry";\r
+         leaf ipv6-flabel {\r
+             type inet:ipv6-flow-label;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "icmpv6-type-match-entry";\r
+         leaf icmpv6-type {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "icmpv6-code-match-entry";\r
+         leaf icmpv6-code {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "ipv6-address-match-entry";\r
+         leaf ipv6-address {\r
+             type inet:ipv6-address;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "ipv4-address-match-entry";\r
+         leaf ipv4-address {\r
+             type inet:ipv4-address;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "mpls-label-match-entry";\r
+         leaf mpls-label {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "tc-match-entry";\r
+         leaf tc {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "bos-match-entry";\r
+         leaf bos {\r
+             type boolean;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "isid-match-entry";\r
+         leaf isid {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "pseudo-field-match-entry";\r
+         leaf pseudo-field {\r
+             type oft:ipv6-exthdr-flags;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "experimenter-id-match-entry";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "tcp-flag-match-entry";\r
+         leaf tcp-flag {\r
+             type uint16;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "tunnel-ipv4-dst-match-entry";\r
+         leaf tunnel-ipv4-dst {\r
+             type inet:ipv4-address;\r
+         }\r
+     }\r
+     augment "/oxm:oxm-container/oxm:match-entries" {\r
+         ext:augment-identifier "tunnel-ipv4-src-match-entry";\r
+         leaf tunnel-ipv4-src {\r
+             type inet:ipv4-address;\r
+         }\r
+     }\r
+\r
+// OFP_ACTION AUGMENTS\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "port-action";\r
+         leaf port {\r
+             type oft:port-number;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "max-length-action";\r
+         leaf max-length {\r
+             type uint16;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "mpls-ttl-action";\r
+         leaf mpls-ttl {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "ethertype-action";\r
+         leaf ethertype {\r
+             type oft:ether-type;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "queue-id-action";\r
+         leaf queue-id {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "group-id-action";\r
+         leaf group-id {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "nw-ttl-action";\r
+         leaf nw-ttl {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "oxm-fields-action";\r
+         uses oxm:oxm-fields-grouping;\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "experimenter-id-action";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+         leaf sub-type {\r
+            type identityref {\r
+                base ofaction:experimenter-action-sub-type;\r
             }\r
+         }\r
+     }\r
+     // OF1.0 structures\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "vlan-vid-action";\r
+         leaf vlan-vid {\r
+             type uint16;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "vlan-pcp-action";\r
+         leaf vlan-pcp {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "dl-address-action";\r
+         leaf dl-address {\r
+             type yang:mac-address;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "nw-tos-action";\r
+         leaf nw-tos {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/ofaction:actions-container/ofaction:action" {\r
+         ext:augment-identifier "ip-address-action";\r
+         leaf ip-address {\r
+             type inet:ipv4-address;\r
+         }\r
+     }\r
+\r
+// OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
+     augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
+         ext:augment-identifier "instruction-related-table-feature-property";\r
+         uses ofinstruction:instructions-grouping;\r
+     }\r
+     augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
+         ext:augment-identifier "next-table-related-table-feature-property";\r
+         list next-table-ids {\r
+             config false;\r
+             leaf table-id {\r
+                 type uint8;\r
+             }\r
+         }\r
+     }\r
+     augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
+         ext:augment-identifier "action-related-table-feature-property";\r
+         uses ofaction:actions-grouping;\r
+     }\r
+     augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
+         ext:augment-identifier "oxm-related-table-feature-property";\r
+         uses oxm:oxm-fields-grouping;\r
+     }\r
+     augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
+         ext:augment-identifier "experimenter-id-table-feature-property";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+         leaf exp-type {\r
+             type uint32;\r
+         }\r
+     }\r
+\r
+// OFP_INSTRUCTION AUGMENTS\r
+     augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
+         ext:augment-identifier "table-id-instruction";\r
+         leaf table-id {\r
+             type uint8;\r
+         }\r
+     }\r
+     augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
+         ext:augment-identifier "metadata-instruction";\r
+         leaf metadata {\r
+             type binary;\r
+         }\r
+         leaf metadata-mask {\r
+             type binary;\r
+         }\r
+     }\r
+     augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
+         ext:augment-identifier "actions-instruction";\r
+         uses ofaction:actions-grouping;\r
+     }\r
+     augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
+         ext:augment-identifier "meter-id-instruction";\r
+         leaf meter-id {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
+         ext:augment-identifier "experimenter-id-instruction";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+     }\r
+     \r
+// OFP_QUEUE_PROP AUGMENTS\r
+     augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
+         ext:augment-identifier "rate-queue-property";\r
+         leaf rate {\r
+             type uint16;\r
+         }\r
+     }\r
+     augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
+         ext:augment-identifier "experimenter-id-queue-property";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+     }\r
+     \r
+// OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3)\r
+     augment "/ofproto:error-message" {\r
+         ext:augment-identifier "experimenter-id-error";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+     }\r
+\r
+// OFP_MULTIPART AUGMENTS\r
+     augment "/ofproto:multipart-request/input/ofproto:multipart-request-body/ofproto:multipart-request-experimenter-case/ofproto:multipart-request-experimenter" {\r
+         ext:augment-identifier "experimenter-id-multipart-request";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+         leaf exp-type {\r
+             type uint32;\r
+         }\r
+     }\r
+     augment "/ofproto:multipart-reply-message/ofproto:multipart-reply-body/ofproto:multipart-reply-experimenter-case/ofproto:multipart-reply-experimenter" {\r
+         ext:augment-identifier "experimenter-id-multipart-reply";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
+         leaf exp-type {\r
+             type uint32;\r
+         }\r
+     }\r
+\r
+// OFP_METER_BAND AUGMENTS\r
+     augment "/ofproto:meter-band-container/ofproto:meter-band/ofproto:meter-band-experimenter-case/ofproto:meter-band-experimenter" {\r
+         ext:augment-identifier "experimenter-id-meter-band";\r
+         leaf experimenter {\r
+             type oft:experimenter-id;\r
+         }\r
      }\r
 }
\ No newline at end of file