NovaNetwork support

Conductor can now properly run on nova-network deployments
Fixes bug #1255057

Change-Id: I7c5e829c58f9dcb242ae580bea0408329a82aa3f
This commit is contained in:
ativelkov 2013-11-26 20:54:26 +04:00
parent c1ef10415c
commit 7f5c71117c
5 changed files with 18 additions and 13 deletions

View File

@ -73,9 +73,10 @@ Configure
# Template IP address for generating environment subnet cidrs
env_ip_template = 10.0.0.0
# Enforces flat network topology by default.
# If set to "False", routed topology will be used
flat_by_default = False
# Enforces default network topology.
# Allowed values: nova, flat, routed
# default is routed
network_topology = routed
[keystone]
# URL of OpenStack KeyStone service REST API.

View File

@ -29,9 +29,11 @@ max_hosts = 250
# Template IP address for generating environment subnet cidrs
env_ip_template = 10.0.0.0
# Enforces flat network topology by default.
# If set to "False", routed topology will be used
flat_by_default = False
# Enforces default network topology.
# Allowed values: nova, flat, routed
# default is routed
# network_topology = routed
network_topology = nova
[keystone]
# URL of OpenStack KeyStone service REST API.

View File

@ -17,6 +17,7 @@ import command
import cloud_formation
import network
import vm_agent
from muranoconductor import config as cfg
class CommandDispatcher(command.CommandBase):
@ -26,9 +27,10 @@ class CommandDispatcher(command.CommandBase):
reporter),
'agent': vm_agent.VmAgentExecutor(
environment, rmqclient, reporter),
'net': network.NeutronExecutor(tenant_id, token)
}
if cfg.CONF.network_topology != "nova":
self._command_map['net'] = \
network.NeutronExecutor(tenant_id, token)
def execute(self, name, **kwargs):
self._command_map[name].execute(**kwargs)

View File

@ -27,6 +27,7 @@ from oslo.config import cfg
from paste import deploy
from muranoconductor import __version__ as version
from muranoconductor.openstack.common import log
from ConfigParser import SafeConfigParser
paste_deploy_opts = [
@ -86,7 +87,9 @@ CONF.register_cli_opt(cfg.StrOpt('murano_metadata_url'))
CONF.register_opt(cfg.IntOpt('max_environments', default=20))
CONF.register_opt(cfg.IntOpt('max_hosts', default=250))
CONF.register_opt(cfg.StrOpt('env_ip_template', default='10.0.0.0'))
CONF.register_opt(cfg.BoolOpt('flat_by_default', default=False))
CONF.register_opt(cfg.StrOpt('network_topology',
choices=['nova', 'flat', 'routed'],
default='routed'))
CONF.import_opt('verbose', 'muranoconductor.openstack.common.log')

View File

@ -73,10 +73,7 @@ def get_default_network(engine, context, body, result=None):
def get_network_topology(engine, context, body, result=None):
if muranoconductor.config.CONF.flat_by_default:
return "flat"
else:
return "routed"
return muranoconductor.config.CONF.network_topology
xml_code_engine.XmlCodeEngine.register_function(