Add support for ovs-odl

This commit is contained in:
James Page 2015-07-15 09:08:26 +01:00
parent e95c3b5f00
commit 89c31ac347
4 changed files with 76 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>quantum-gateway</name> <name>neutron-gateway</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>

View File

@ -3,7 +3,7 @@
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/quantum-gateway/hooks</path> <path>/neutron-gateway/hooks</path>
<path>/quantum-gateway/unit_tests</path> <path>/neutron-gateway/unit_tests</path>
</pydev_pathproperty> </pydev_pathproperty>
</pydev_project> </pydev_project>

View File

@ -42,6 +42,7 @@ NEUTRON_NVP_PLUGIN = \
NEUTRON_N1KV_PLUGIN = \ NEUTRON_N1KV_PLUGIN = \
"neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2" "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2"
NEUTRON_NSX_PLUGIN = "vmware" NEUTRON_NSX_PLUGIN = "vmware"
NEUTRON_OVS_ODL_PLUGIN = "ml2"
NEUTRON = 'neutron' NEUTRON = 'neutron'
QUANTUM = 'quantum' QUANTUM = 'quantum'
@ -58,6 +59,7 @@ OVS = 'ovs'
NVP = 'nvp' NVP = 'nvp'
N1KV = 'n1kv' N1KV = 'n1kv'
NSX = 'nsx' NSX = 'nsx'
OVS_ODL = 'ovs-odl'
CORE_PLUGIN = { CORE_PLUGIN = {
QUANTUM: { QUANTUM: {
@ -68,7 +70,8 @@ CORE_PLUGIN = {
OVS: NEUTRON_OVS_PLUGIN, OVS: NEUTRON_OVS_PLUGIN,
NVP: NEUTRON_NVP_PLUGIN, NVP: NEUTRON_NVP_PLUGIN,
N1KV: NEUTRON_N1KV_PLUGIN, N1KV: NEUTRON_N1KV_PLUGIN,
NSX: NEUTRON_NSX_PLUGIN NSX: NEUTRON_NSX_PLUGIN,
OVS_ODL: NEUTRON_OVS_ODL_PLUGIN,
}, },
} }

View File

@ -62,7 +62,7 @@ from charmhelpers.contrib.openstack.context import (
import charmhelpers.contrib.openstack.templating as templating import charmhelpers.contrib.openstack.templating as templating
from charmhelpers.contrib.openstack.neutron import headers_package from charmhelpers.contrib.openstack.neutron import headers_package
from neutron_contexts import ( from neutron_contexts import (
CORE_PLUGIN, OVS, NVP, NSX, N1KV, CORE_PLUGIN, OVS, NVP, NSX, N1KV, OVS_ODL,
NEUTRON, QUANTUM, NEUTRON, QUANTUM,
networking_name, networking_name,
NeutronGatewayContext, NeutronGatewayContext,
@ -153,7 +153,18 @@ NEUTRON_GATEWAY_PKGS = {
"nova-api-metadata", "nova-api-metadata",
"neutron-common", "neutron-common",
"neutron-l3-agent" "neutron-l3-agent"
] ],
OVS_ODL: [
"openvswitch-switch",
"neutron-l3-agent",
"neutron-dhcp-agent",
'python-mysqldb',
'python-psycopg2',
'python-oslo.config', # Force upgrade
"nova-api-metadata",
"neutron-plugin-metering-agent",
"neutron-lbaas-agent",
],
} }
NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP] NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP]
@ -165,7 +176,8 @@ GATEWAY_PKGS = {
EARLY_PACKAGES = { EARLY_PACKAGES = {
OVS: ['openvswitch-datapath-dkms'], OVS: ['openvswitch-datapath-dkms'],
NVP: [], NVP: [],
N1KV: [] N1KV: [],
OVS_ODL: [],
} }
LEGACY_HA_TEMPLATE_FILES = 'files' LEGACY_HA_TEMPLATE_FILES = 'files'
@ -434,6 +446,58 @@ NEUTRON_OVS_CONFIG_FILES = {
} }
NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES) NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
NEUTRON_OVS_ODL_CONFIG_FILES = {
NEUTRON_CONF: {
'hook_contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
NeutronGatewayContext(),
SyslogContext(),
context.ZeroMQContext(),
context.NotificationDriverContext()],
'services': ['neutron-l3-agent',
'neutron-dhcp-agent',
'neutron-metadata-agent',
'neutron-plugin-metering-agent',
'neutron-metering-agent',
'neutron-lbaas-agent',
'neutron-plugin-vpn-agent',
'neutron-vpn-agent']
},
NEUTRON_L3_AGENT_CONF: {
'hook_contexts': [NetworkServiceContext(),
L3AgentContext(),
NeutronGatewayContext()],
'services': ['neutron-l3-agent', 'neutron-vpn-agent']
},
NEUTRON_METERING_AGENT_CONF: {
'hook_contexts': [NeutronGatewayContext()],
'services': ['neutron-plugin-metering-agent',
'neutron-metering-agent']
},
NEUTRON_LBAAS_AGENT_CONF: {
'hook_contexts': [NeutronGatewayContext()],
'services': ['neutron-lbaas-agent']
},
NEUTRON_VPNAAS_AGENT_CONF: {
'hook_contexts': [NeutronGatewayContext()],
'services': ['neutron-plugin-vpn-agent',
'neutron-vpn-agent']
},
NEUTRON_FWAAS_CONF: {
'hook_contexts': [NeutronGatewayContext()],
'services': ['neutron-l3-agent', 'neutron-vpn-agent']
},
EXT_PORT_CONF: {
'hook_contexts': [ExternalPortContext()],
'services': ['ext-port']
},
PHY_NIC_MTU_CONF: {
'hook_contexts': [PhyNICMTUContext()],
'services': ['os-charm-phy-nic-mtu']
}
}
NEUTRON_OVS_ODL_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
QUANTUM_NVP_CONFIG_FILES = { QUANTUM_NVP_CONFIG_FILES = {
QUANTUM_CONF: { QUANTUM_CONF: {
'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR), 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),
@ -482,6 +546,7 @@ CONFIG_FILES = {
NVP: NEUTRON_NVP_CONFIG_FILES, NVP: NEUTRON_NVP_CONFIG_FILES,
OVS: NEUTRON_OVS_CONFIG_FILES, OVS: NEUTRON_OVS_CONFIG_FILES,
N1KV: NEUTRON_N1KV_CONFIG_FILES, N1KV: NEUTRON_N1KV_CONFIG_FILES,
OVS_ODL: NEUTRON_OVS_ODL_CONFIG_FILES
}, },
} }
@ -668,7 +733,7 @@ def do_openstack_upgrade():
def configure_ovs(): def configure_ovs():
if config('plugin') == OVS: if config('plugin') in [OVS, OVS_ODL]:
if not service_running('openvswitch-switch'): if not service_running('openvswitch-switch'):
full_restart() full_restart()
add_bridge(INT_BRIDGE) add_bridge(INT_BRIDGE)