Add ovsdbmonitor GUI tool by Andy Southgate, contributed by Citrix.
[sliver-openvswitch.git] / ovsdb / ovsdbmonitor / ovsdbmonitor.py.in
1 #! @PYTHON@
2 # Copyright (c) 2010 Citrix Systems, Inc.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain 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,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # Version 1.51
17 # 2010-05-07
18
19 sys.path.insert(0, "@ovsdbmonitordir@")
20
21 import sys, traceback
22 from pprint import pprint
23 from OVEApp import *
24
25 app = OVEApp()
26 try:
27     retVal = app.enter()
28 except Exception, e:
29     print str(e)
30     try:
31         trace = traceback.format_tb(sys.exc_info()[2])
32     except:
33         trace = ['Traceback not available']
34     print("".join(trace))
35     retVal = 1
36
37 sys.exit(retVal)