Rich Lane | b658ddd | 2013-03-12 10:15:10 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2012, 2013, Big Switch Networks, Inc. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | # Automatically generated by LOXI from template toplevel_init.py |
| 17 | # Do not modify |
| 18 | |
| 19 | def protocol(ver): |
| 20 | """ |
| 21 | Import and return the protocol module for the given wire version. |
| 22 | """ |
| 23 | if ver == 1: |
| 24 | import of10 |
| 25 | return of10 |
| 26 | else: |
| 27 | raise ValueError |
| 28 | |
| 29 | class ProtocolError(Exception): |
| 30 | """ |
| 31 | Raised when failing to deserialize an invalid OpenFlow message. |
| 32 | """ |
| 33 | pass |