diff options
author | Ethan Jackson <ethan@nicira.com> | 2012-03-06 11:16:38 -0800 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2012-03-09 13:37:38 -0800 |
commit | d2cee5a48ebe850ccb72cd1e860a90e5ec0248fd (patch) | |
tree | e24926fadfa3e2def7a9a95178143882e9f74957 /xenserver | |
parent | 05d4ae3a0608d46ae6df7c2015af9e6b9aa861ad (diff) | |
download | openvswitch-d2cee5a48ebe850ccb72cd1e860a90e5ec0248fd.tar.gz |
ovs-xapi-sync: Remove useless root_prefix global.
There's no reason for this variable to be global, or to exist at
all for that matter.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'xenserver')
-rwxr-xr-x | xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync index 0ffccc2da..79a6bde12 100755 --- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync +++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync @@ -36,7 +36,6 @@ from ovs.db import types import ovs.daemon import ovs.db.idl -root_prefix = '' # Prefix for absolute file names, for testing. vlog = ovs.vlog.Vlog("ovs-xapi-sync") session = None force_run = False @@ -239,7 +238,7 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument("database", metavar="DATABASE", help="A socket on which ovsdb-server is listening.") - parser.add_argument("--root-prefix", metavar="DIR", + parser.add_argument("--root-prefix", metavar="DIR", default='', help="Use DIR as alternate root directory" " (for testing).") @@ -249,10 +248,6 @@ def main(): ovs.vlog.handle_args(args) ovs.daemon.handle_args(args) - global root_prefix - if args.root_prefix: - root_prefix = args.root_prefix - remote = args.database schema_file = "%s/vswitch.ovsschema" % ovs.dirs.PKGDATADIR schema = ovs.db.schema.DbSchema.from_json(ovs.json.from_file(schema_file)) @@ -263,7 +258,7 @@ def main(): # This daemon is usually started before XAPI, but to complete our # tasks, we need it. Wait here until it's up. - cookie_file = root_prefix + "/var/run/xapi_init_complete.cookie" + cookie_file = args.root_prefix + "/var/run/xapi_init_complete.cookie" while not os.path.exists(cookie_file): time.sleep(1) |