Thomas Vachuska | 6655bee | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-openflow-types { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | namespace "http://openconfig.net/yang/openflow/types"; |
| 6 | |
| 7 | prefix "openflow-types"; |
| 8 | |
| 9 | import openconfig-extensions { prefix oc-ext; } |
| 10 | |
| 11 | organization "OpenConfig working group"; |
| 12 | |
| 13 | contact |
| 14 | "OpenConfig working group |
| 15 | www.openconfig.net"; |
| 16 | |
| 17 | description |
| 18 | "This module defines types related to the Openflow configuration |
| 19 | and operational state model."; |
| 20 | |
| 21 | oc-ext:openconfig-version "0.1.0"; |
| 22 | |
| 23 | revision "2017-06-01" { |
| 24 | description |
| 25 | "Initial revision"; |
| 26 | reference "0.1.0"; |
| 27 | } |
| 28 | |
| 29 | |
| 30 | typedef failure-mode { |
| 31 | type enumeration { |
| 32 | enum SECURE { |
| 33 | description |
| 34 | "Packets and messages destined to the controllers are |
| 35 | dropped. Flow entries continue to expire according to |
| 36 | their timeouts."; |
| 37 | } |
| 38 | enum STANDALONE { |
| 39 | description |
| 40 | "Processes all packets using the OFPP_NORMAL reserved |
| 41 | port. The switch acts as a legacy Ethernet switch or |
| 42 | router."; |
| 43 | } |
| 44 | } |
| 45 | description |
| 46 | "Type to define Openflow failure mode."; |
| 47 | } |
| 48 | |
| 49 | typedef transport { |
| 50 | type enumeration { |
| 51 | enum TCP { |
| 52 | description |
| 53 | "Transmission Control Protocol (TCP)."; |
| 54 | } |
| 55 | enum TLS { |
| 56 | description |
| 57 | "Transport Layer Security (TLS)."; |
| 58 | } |
| 59 | } |
| 60 | description |
| 61 | "Type to define Openflow transport protocol."; |
| 62 | } |
| 63 | |
| 64 | typedef auxiliary-id { |
| 65 | type uint8 { |
| 66 | range "0..15"; |
| 67 | } |
| 68 | description |
| 69 | "A Controller may have multiple auxiliary connections as |
| 70 | specified by the Openflow protocol. The main Controller |
| 71 | connection should always have the auxiliary-id set to zero. |
| 72 | All other connections must have an auxiliary-id different |
| 73 | from 0."; |
| 74 | } |
| 75 | |
| 76 | typedef datapath-id { |
| 77 | type string { |
| 78 | pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}$'; |
| 79 | } |
| 80 | description |
| 81 | "The datapath-id type represents an OpenFlow |
| 82 | datapath identifier. The lower 48-bits are for |
| 83 | a MAC address, while the upper 16-bits are |
| 84 | implementer-defined."; |
| 85 | } |
| 86 | |
| 87 | } |