Merge "Adds Neutron L3 Metering Agent"

This commit is contained in:
Jenkins
2014-06-03 23:43:01 +00:00
committed by Gerrit Code Review
2 changed files with 36 additions and 0 deletions

View File

@@ -111,6 +111,20 @@ def initConfig(controller):
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "os-neutron-metering-agent-install",
"USAGE": ("Set to 'y' if you would like Packstack to install "
"Neutron L3 Metering agent"),
"PROMPT": ("Should Packstack install Neutron L3 Metering agent"),
"OPTION_LIST": ["y", "n"],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "n",
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": "CONFIG_NEUTRON_METERING_AGENT_INSTALL",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
],
"NEUTRON_LB_PLUGIN": [
@@ -562,6 +576,8 @@ def initSequences(controller):
'functions': [create_dhcp_manifests]},
{'title': 'Adding Neutron LBaaS Agent manifest entries',
'functions': [create_lbaas_manifests]},
{'title': 'Adding Neutron Metering Agent manifest entries',
'functions': [create_metering_agent_manifests]},
{'title': 'Adding Neutron Metadata Agent manifest entries',
'functions': [create_metadata_manifests]},
]
@@ -687,6 +703,10 @@ def create_manifests(config, messages):
service_plugins.append(
'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'
)
if config['CONFIG_NEUTRON_METERING_AGENT_INSTALL'] == 'y':
service_plugins.append(
'neutron.services.metering.metering_plugin.MeteringPlugin'
)
config['SERVICE_PLUGINS'] = (str(service_plugins) if service_plugins
else 'undef')
@@ -818,6 +838,19 @@ def create_lbaas_manifests(config, messages):
appendManifestFile(manifestfile, manifestdata + "\n")
def create_metering_agent_manifests(config, messages):
global api_hosts
if not config['CONFIG_NEUTRON_METERING_AGENT_INSTALL'] == 'y':
return
for host in api_hosts:
config['CONFIG_NEUTRON_METERING_IFCE_DRIVER'] = get_if_driver(config)
manifestdata = getManifestTemplate("neutron_metering_agent.pp")
manifestfile = "%s_neutron.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n")
def create_l2_agent_manifests(config, messages):
global q_hosts