NovaNetwork support
Conductor can now properly run on nova-network deployments Fixes bug #1255057 Change-Id: I7c5e829c58f9dcb242ae580bea0408329a82aa3f
This commit is contained in:
parent
c1ef10415c
commit
7f5c71117c
@ -73,9 +73,10 @@ Configure
|
|||||||
# Template IP address for generating environment subnet cidrs
|
# Template IP address for generating environment subnet cidrs
|
||||||
env_ip_template = 10.0.0.0
|
env_ip_template = 10.0.0.0
|
||||||
|
|
||||||
# Enforces flat network topology by default.
|
# Enforces default network topology.
|
||||||
# If set to "False", routed topology will be used
|
# Allowed values: nova, flat, routed
|
||||||
flat_by_default = False
|
# default is routed
|
||||||
|
network_topology = routed
|
||||||
|
|
||||||
[keystone]
|
[keystone]
|
||||||
# URL of OpenStack KeyStone service REST API.
|
# URL of OpenStack KeyStone service REST API.
|
||||||
|
@ -29,9 +29,11 @@ max_hosts = 250
|
|||||||
# Template IP address for generating environment subnet cidrs
|
# Template IP address for generating environment subnet cidrs
|
||||||
env_ip_template = 10.0.0.0
|
env_ip_template = 10.0.0.0
|
||||||
|
|
||||||
# Enforces flat network topology by default.
|
# Enforces default network topology.
|
||||||
# If set to "False", routed topology will be used
|
# Allowed values: nova, flat, routed
|
||||||
flat_by_default = False
|
# default is routed
|
||||||
|
# network_topology = routed
|
||||||
|
network_topology = nova
|
||||||
|
|
||||||
[keystone]
|
[keystone]
|
||||||
# URL of OpenStack KeyStone service REST API.
|
# URL of OpenStack KeyStone service REST API.
|
||||||
|
@ -17,6 +17,7 @@ import command
|
|||||||
import cloud_formation
|
import cloud_formation
|
||||||
import network
|
import network
|
||||||
import vm_agent
|
import vm_agent
|
||||||
|
from muranoconductor import config as cfg
|
||||||
|
|
||||||
|
|
||||||
class CommandDispatcher(command.CommandBase):
|
class CommandDispatcher(command.CommandBase):
|
||||||
@ -26,9 +27,10 @@ class CommandDispatcher(command.CommandBase):
|
|||||||
reporter),
|
reporter),
|
||||||
'agent': vm_agent.VmAgentExecutor(
|
'agent': vm_agent.VmAgentExecutor(
|
||||||
environment, rmqclient, reporter),
|
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):
|
def execute(self, name, **kwargs):
|
||||||
self._command_map[name].execute(**kwargs)
|
self._command_map[name].execute(**kwargs)
|
||||||
|
@ -27,6 +27,7 @@ from oslo.config import cfg
|
|||||||
from paste import deploy
|
from paste import deploy
|
||||||
|
|
||||||
from muranoconductor import __version__ as version
|
from muranoconductor import __version__ as version
|
||||||
|
from muranoconductor.openstack.common import log
|
||||||
from ConfigParser import SafeConfigParser
|
from ConfigParser import SafeConfigParser
|
||||||
|
|
||||||
paste_deploy_opts = [
|
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_environments', default=20))
|
||||||
CONF.register_opt(cfg.IntOpt('max_hosts', default=250))
|
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.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')
|
CONF.import_opt('verbose', 'muranoconductor.openstack.common.log')
|
||||||
|
@ -73,10 +73,7 @@ def get_default_network(engine, context, body, result=None):
|
|||||||
|
|
||||||
|
|
||||||
def get_network_topology(engine, context, body, result=None):
|
def get_network_topology(engine, context, body, result=None):
|
||||||
if muranoconductor.config.CONF.flat_by_default:
|
return muranoconductor.config.CONF.network_topology
|
||||||
return "flat"
|
|
||||||
else:
|
|
||||||
return "routed"
|
|
||||||
|
|
||||||
|
|
||||||
xml_code_engine.XmlCodeEngine.register_function(
|
xml_code_engine.XmlCodeEngine.register_function(
|
||||||
|
Loading…
Reference in New Issue
Block a user