Srikanth Vavilapalli | 1725e49 | 2014-12-01 17:50:52 -0800 | [diff] [blame^] | 1 | #!/usr/bin/env python |
| 2 | # |
| 3 | # Copyright (c) 2013 Big Switch Networks, Inc. |
| 4 | # |
| 5 | # Licensed under the Eclipse Public License, Version 1.0 (the |
| 6 | # "License"); you may not use this file except in compliance with the |
| 7 | # License. You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.eclipse.org/legal/epl-v10.html |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 14 | # implied. See the License for the specific language governing |
| 15 | # permissions and limitations under the License. |
| 16 | # |
| 17 | """ |
| 18 | # CLI for forwarding configuration |
| 19 | # |
| 20 | |
| 21 | # -------------------------------------------------------------------------------- |
| 22 | # Create new CLI command for forwarding |
| 23 | # |
| 24 | |
| 25 | FORWARDING_CONFIG_COMMAND_DESCRIPTION = { |
| 26 | 'name' : 'forwarding', |
| 27 | 'mode' : 'config', |
| 28 | 'short-help' : 'Configure forwarding service properties', |
| 29 | 'doc' : 'forwarding|forwarding', |
| 30 | 'doc-example' : 'forwarding|forwarding-example', |
| 31 | 'command-type' : 'config-object', |
| 32 | 'obj-type' : 'forwarding-config', |
| 33 | 'args': ( |
| 34 | { |
| 35 | 'choices' : ( |
| 36 | { |
| 37 | 'args' : ( |
| 38 | { |
| 39 | 'token' : 'access-priority', |
| 40 | 'completion-text' : 'access-priority', |
| 41 | 'short-help' : 'Set proprity for flows created by the forwarding service on an access switch', |
| 42 | 'doc' : 'forwarding|forwarding-access-priority', |
| 43 | 'match-for-no' : True, |
| 44 | }, |
| 45 | { |
| 46 | 'field' : 'access-priority', |
| 47 | 'short-help' : 'Set proprity for flows created by the forwarding service on an access switch', |
| 48 | 'doc' : 'forwarding|forwarding-access-priority', |
| 49 | 'type' : 'integer', |
| 50 | 'range' : (0, 2**15-1), |
| 51 | 'completion-text' : '0-32767', |
| 52 | 'match-for-no' : True, |
| 53 | 'optional-for-no' : True, |
| 54 | 'data' : { |
| 55 | 'id' : 'forwarding', |
| 56 | 'access-priority': '$data', |
| 57 | }, |
| 58 | }, |
| 59 | ), |
| 60 | }, |
| 61 | { |
| 62 | 'args' : ( |
| 63 | { |
| 64 | 'token' : 'core-priority', |
| 65 | 'completion-text' : 'core-priority', |
| 66 | 'short-help' : 'Set proprity for flows created by the forwarding service on a core switch', |
| 67 | 'doc' : 'forwarding|forwarding-core-priority', |
| 68 | 'match-for-no' : True, |
| 69 | }, |
| 70 | { |
| 71 | 'field' : 'core-priority', |
| 72 | 'short-help' : 'Set proprity for flows created by the forwarding service on a core switch', |
| 73 | 'doc' : 'forwarding|forwarding-core-priority', |
| 74 | 'type' : 'integer', |
| 75 | 'range' : (0, 2**15-1), |
| 76 | 'completion-text' : '0-32767', |
| 77 | 'match-for-no' : True, |
| 78 | 'optional-for-no' : True, |
| 79 | 'data' : { |
| 80 | 'id' : 'forwarding', |
| 81 | 'core-priority' : '$data', |
| 82 | }, |
| 83 | }, |
| 84 | ), |
| 85 | }, |
| 86 | ), |
| 87 | }, |
| 88 | ), |
| 89 | } |
| 90 | """ |
| 91 | # -------------------------------------------------------------------------------- |