blob: 0a3f5ba81cccc33d8c1d4603f9f91568e47ce9ad [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
17import fmtcnv
18"""
19TUNNEL_COMMAND_DESCRIPTION = {
20 'name' : 'tunnel-link',
21 'feature' : 'vns',
22 'mode' : 'login',
23 'command-type' : 'display-table',
24 'doc' : 'tunnel-link|verify-example',
25 'obj-type' : None,
26 'args' : {
27 'choices': (
28 (
29 {
30 'token' : 'verify',
31 'short-help' : 'Verify status of tunnel between two switches',
32 'action' : 'display-rest',
33 'format' : 'tunnel-event',
34 'url' : [
35 'realtimestatus/network/tunnelverify/%(src-dpid)s/%(dst-dpid)s/',
36 ],
37 },
38 {
39 'field' : 'src-dpid',
40 'type' : 'dpid',
41 'completion' : 'complete-from-another',
42 'other' : 'switches|dpid',
43 'data-handler' : 'alias-to-value',
44 'help-name' : 'switch dpid or alias',
45 },
46 {
47 'field' : 'dst-dpid',
48 'type' : 'dpid',
49 'completion' : 'complete-from-another',
50 'other' : 'switches|dpid',
51 'data-handler' : 'alias-to-value',
52 'help-name' : 'switch dpid or alias',
53 }
54 ),
55 )
56 }
57}
58
59TUNNEL_LINK_FAILURES_SHOW_COMMAND_DESCRIPTION = {
60 'name' : 'show',
61 'mode' : 'login',
62 'feature' : 'vns',
63 'short-help' : 'Show tunnel link failures',
64 'command-type' : 'display-table',
65 'url' : 'realtimestatus/network/tunnelstatus/all/all',
66 'obj-type' : None,
67 'format' : 'tunnel-event',
68 'action' : 'display-rest',
69 'args' : (
70 'tunnel-link-failures',
71 ),
72}
73
74TUNNEL_EVENT_FORMAT = {
75 'tunnel-event' : {
76 'source' : 'controller',
77 'url' : 'tunnel-event',
78 'field-orderings': {
79 'default' : [ 'Idx', 'src-dpid', 'dst-dpid', 'status', 'last-verified' ],
80 },
81 'fields' : {
82 'Idx' : {
83 'verbose-name': '#',
84 'edit' : False,
85 'type' : 'CharField',
86 'primary-key': True,
87 },
88 'src-dpid':{
89 'verbose-name': 'Src DPID',
90 'json_serialize_string': True,
91 'type': 'CharField',
92 },
93 'dst-dpid': {'json_serialize_string': True,
94 'verbose-name': 'Dst DPID',
95 'type': 'CharField',
96 },
97 'status': {
98 'json_serialize_string': True,
99 'type': 'CharField',
100 },
101 'last-verified': {
102 'verbose-name': 'Last Verified',
103 'formatter' : fmtcnv.print_time_since_utc,
104 }
105 }
106 },
107}
108"""