blob: 4bb51a4ec035a8382519730ee36235d02d98817b [file] [log] [blame]
Srikanth Vavilapalli1725e492014-12-01 17:50:52 -08001#
2# Copyright (c) 2013 Big Switch Networks, Inc.
3#
4# Licensed under the Eclipse Public License, Version 1.0 (the
5# "License"); you may not use this file except in compliance with the
6# License. You may obtain a copy of the License at
7#
8# http://www.eclipse.org/legal/epl-v10.html
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,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied. See the License for the specific language governing
14# permissions and limitations under the License.
15#
16"""
17
18TOPOLOGY_COMMAND_DESCRIPTION = {
19 'name' : 'topology',
20 'mode' : 'config',
21 'short-help' : 'Enable features for controller',
22 'doc' : 'topology|topology',
23 'doc-example' : 'topology|topology-example',
24 'command-type' : 'config',
25 'obj-type' : 'topology-config',
26 'args': {
27 'choices': (
28 {
29 'token' : 'autoportfast',
30 'short-help' : 'Enable the auto PortFast feature',
31 'doc' : 'topology|topology-autoportfast',
32 'action' : (
33 {
34 'proc' : 'write-object',
35 'data' : {
36 # The primary key ('id') must be present to
37 # read the old row value, and update items,
38 # otherwise a 'new' row is written with default
39 # values
40
41 'id' : 'topology',
42 'autoportfast' : True,
43 },
44 },
45 ),
46 'no-action' : (
47 {
48 'proc' : 'write-object',
49 'data' : {
50 'id' : 'topology',
51 'autoportfast' : False ,
52 },
53 },
54 )
55 },
56 )
57 }
58}
59"""