projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vswitchd: Remove trailing whitespace
[openvswitch]
/
xenserver
/
usr_sbin_brctl
diff --git
a/xenserver/usr_sbin_brctl
b/xenserver/usr_sbin_brctl
index fbaa6ad7278296ddd1b2855e25373428a877223c..5cf0b88ac7f6b61c8c4b4dc53f2c3c28e16a7cef 100755
(executable)
--- a/
xenserver/usr_sbin_brctl
+++ b/
xenserver/usr_sbin_brctl
@@
-1,6
+1,6
@@
#! /usr/bin/python
#
#! /usr/bin/python
#
-# Copyright (c) 2009 Nicira Networks.
+# Copyright (c) 2009
, 2010
Nicira Networks.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@
-22,9
+22,9
@@
import sys
argv0 = sys.argv[0]
argv0 = sys.argv[0]
-BRCTL = "/usr/lib/vswitch/xs-original/brctl"
+BRCTL = "/usr/lib/
open
vswitch/xs-original/brctl"
VSCTL = "/usr/bin/ovs-vsctl"
VSCTL = "/usr/bin/ovs-vsctl"
-OVSDB_SERVER = "unix:/var/run/o
vsdb-server
"
+OVSDB_SERVER = "unix:/var/run/o
penvswitch/db.sock
"
# Execute the real brctl program, passing the same arguments that were passed
# to us.
# Execute the real brctl program, passing the same arguments that were passed
# to us.
@@
-35,7
+35,7
@@
def delegate():
def call_vsctl(cmd, arg=""):
database = '--db=' + OVSDB_SERVER
def call_vsctl(cmd, arg=""):
database = '--db=' + OVSDB_SERVER
- command = [VSCTL, database, cmd]
+ command = [VSCTL,
'--timeout=30',
database, cmd]
if (arg):
command.append(arg)
return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0].split()
if (arg):
command.append(arg)
return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0].split()
@@
-99,6
+99,15
@@
def cmd_show():
print "\t\t\t\t\t\t\t%s" % port
def main():
print "\t\t\t\t\t\t\t%s" % port
def main():
+ # Check the network configuration mode.
+ try:
+ network_mode = read_first_line_of_file('/etc/xensource/network.conf')
+ if network_mode == 'bridge':
+ delegate()
+ except:
+ # File probably doesn't exist
+ pass
+
# Parse the command line.
try:
options, args = getopt.gnu_getopt(sys.argv[1:],
# Parse the command line.
try:
options, args = getopt.gnu_getopt(sys.argv[1:],