Change nova-dhcpbridge FLAGFILE to a list of files

This patch adds support to linux_net and nova-dhcpbridge for
specifying and conveying multiple dhcpbridge_flagfile values.
The support is implemented as follows:

dhcpbridge_flagfile is now a "MultiStr" configuration file option
allowing the flag files to be defined over multiple configuration files.
The configured files are concatenated into a comma separated string and
assigned to the FLAGFILE environment variable when invoking
nova-dhcpbridge. nova-dhcpbridge splits the value of the environment
variable on the comma an initializes its configuration with the provided
files (the configuration system already supports loading configuration
from multiple files)

Fixes bug 1131932

Change-Id: Ic9cc57b8f7d9356606b9134ef5b63ab07b6099d9
This commit is contained in:
Brent Eagles
2013-02-22 17:57:33 -03:30
parent ed4237599c
commit f2b2a6c966

View File

@@ -42,6 +42,7 @@ from nova import context
from nova import db
from nova.network import rpcapi as network_rpcapi
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
@@ -121,7 +122,8 @@ def main():
except KeyError:
config_file = os.environ['FLAGFILE']
config.parse_args(sys.argv, default_config_files=[config_file])
config.parse_args(sys.argv,
default_config_files=jsonutils.loads(config_file))
logging.setup("nova")