From c99c4029a94245cb5bdcb0f22ba87b6b2860ef83 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Mon, 9 Jun 2014 17:11:19 +0000 Subject: [PATCH] Tidied up templates and added neutron-plugin support --- hooks/neutron-plugin-relation-broken | 1 + hooks/neutron-plugin-relation-changed | 1 + hooks/neutron-plugin-relation-departed | 1 + hooks/neutron-plugin-relation-joined | 1 + hooks/neutron_api_hooks.py | 14 ++ hooks/neutron_api_utils.py | 33 ++-- metadata.yaml | 3 + templates/essex/etc_nova_api-paste.ini | 162 ------------------ templates/folsom/etc_nova_api-paste.ini | 141 --------------- templates/folsom/etc_quantum_api-paste.ini | 40 ----- templates/folsom/ovs_quantum_plugin.ini | 23 --- templates/folsom/quantum-server | 6 - templates/folsom/quantum.conf | 48 ------ templates/grizzly/etc_nova_api-paste.ini | 124 -------------- templates/grizzly/etc_quantum_api-paste.ini | 37 ---- templates/grizzly/quantum.conf | 45 ----- templates/havana/neutron.conf | 56 ------ templates/havana/ovs_neutron_plugin.ini | 12 -- templates/icehouse/ml2_conf.ini | 30 ---- templates/{havana => icehouse}/neutron-server | 2 +- 20 files changed, 32 insertions(+), 748 deletions(-) create mode 120000 hooks/neutron-plugin-relation-broken create mode 120000 hooks/neutron-plugin-relation-changed create mode 120000 hooks/neutron-plugin-relation-departed create mode 120000 hooks/neutron-plugin-relation-joined delete mode 100644 templates/essex/etc_nova_api-paste.ini delete mode 100644 templates/folsom/etc_nova_api-paste.ini delete mode 100644 templates/folsom/etc_quantum_api-paste.ini delete mode 100644 templates/folsom/ovs_quantum_plugin.ini delete mode 100644 templates/folsom/quantum-server delete mode 100644 templates/folsom/quantum.conf delete mode 100644 templates/grizzly/etc_nova_api-paste.ini delete mode 100644 templates/grizzly/etc_quantum_api-paste.ini delete mode 100644 templates/grizzly/quantum.conf delete mode 100644 templates/havana/neutron.conf delete mode 100644 templates/havana/ovs_neutron_plugin.ini delete mode 100644 templates/icehouse/ml2_conf.ini rename templates/{havana => icehouse}/neutron-server (84%) diff --git a/hooks/neutron-plugin-relation-broken b/hooks/neutron-plugin-relation-broken new file mode 120000 index 00000000..1fb10fd5 --- /dev/null +++ b/hooks/neutron-plugin-relation-broken @@ -0,0 +1 @@ +neutron_api_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-relation-changed b/hooks/neutron-plugin-relation-changed new file mode 120000 index 00000000..1fb10fd5 --- /dev/null +++ b/hooks/neutron-plugin-relation-changed @@ -0,0 +1 @@ +neutron_api_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-relation-departed b/hooks/neutron-plugin-relation-departed new file mode 120000 index 00000000..1fb10fd5 --- /dev/null +++ b/hooks/neutron-plugin-relation-departed @@ -0,0 +1 @@ +neutron_api_hooks.py \ No newline at end of file diff --git a/hooks/neutron-plugin-relation-joined b/hooks/neutron-plugin-relation-joined new file mode 120000 index 00000000..1fb10fd5 --- /dev/null +++ b/hooks/neutron-plugin-relation-joined @@ -0,0 +1 @@ +neutron_api_hooks.py \ No newline at end of file diff --git a/hooks/neutron_api_hooks.py b/hooks/neutron_api_hooks.py index e408e8af..21f1bd82 100755 --- a/hooks/neutron_api_hooks.py +++ b/hooks/neutron_api_hooks.py @@ -1,6 +1,7 @@ #!/usr/bin/python import sys +import uuid from charmhelpers.core.hookenv import ( Hooks, @@ -233,6 +234,19 @@ def neutron_api_relation_joined(rid=None): def neutron_api_relation_changed(): CONFIGS.write(NEUTRON_CONF) +@hooks.hook('neutron-plugin-relation-joined') +def neutron_plugin_relation_joined(rid=None, remote_restart=False): + rel_settings = {} + rel_settings['neutron_security_groups'] = config('neutron-security-groups') + if remote_restart: + rel_settings['restart_trigger'] = str(uuid.uuid4()) + relation_set(relation_id=rid, **rel_settings) + +@restart_on_change(restart_map()) +@hooks.hook('neutron-plugin-relation-changed') +def neutron_plugin_relation_changed(): + CONFIGS.write(NEUTRON_CONF) + def main(): try: hooks.execute(sys.argv) diff --git a/hooks/neutron_api_utils.py b/hooks/neutron_api_utils.py index 8b7b5d88..34911378 100644 --- a/hooks/neutron_api_utils.py +++ b/hooks/neutron_api_utils.py @@ -57,11 +57,18 @@ BASE_RESOURCE_MAP = OrderedDict([ neutron_api_context.NeutronPostgresqlDBContext(), neutron_api_context.IdentityServiceContext(), neutron_api_context.NeutronCCContext(), - context.SyslogContext()], + context.SyslogContext(), + context.SubordinateConfigContext( + interface='neutron-plugin', + service='neutron', + config_file=NEUTRON_CONF)], }), (NEUTRON_DEFAULT, { 'services': ['neutron-server'], - 'contexts': [neutron_api_context.NeutronCCContext()], + 'contexts': [context.SubordinateConfigContext( + interface='neutron-plugin', + service='neutron', + config_file=NEUTRON_CONF)], }), ]) def api_port(service): @@ -115,31 +122,11 @@ def resource_map(): ''' resource_map = deepcopy(BASE_RESOURCE_MAP) - net_manager = network_manager() - - # add neutron plugin requirements. nova-c-c only needs the neutron-server - # associated with configs, not the plugin agent. - plugin = config('neutron-plugin') - conf = neutron_plugin_attribute(plugin, 'config', net_manager) - ctxts = (neutron_plugin_attribute(plugin, 'contexts', net_manager) - or []) - services = neutron_plugin_attribute(plugin, 'server_services', - net_manager) - resource_map[conf] = {} - resource_map[conf]['services'] = services - resource_map[conf]['contexts'] = ctxts - resource_map[conf]['contexts'].append( - neutron_api_context.NeutronCCContext()) - - # update for postgres - resource_map[conf]['contexts'].append( - neutron_api_context.NeutronPostgresqlDBContext()) - return resource_map def register_configs(release=None): - release = release or os_release('nova-common') + release = release or os_release('neutron-common') configs = templating.OSConfigRenderer(templates_dir=TEMPLATES, openstack_release=release) for cfg, rscs in resource_map().iteritems(): diff --git a/metadata.yaml b/metadata.yaml index d4e0313b..0226bf4e 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -17,3 +17,6 @@ requires: interface: rabbitmq identity-service: interface: keystone + neutron-plugin: + interface: neutron-plugin + scope: container diff --git a/templates/essex/etc_nova_api-paste.ini b/templates/essex/etc_nova_api-paste.ini deleted file mode 100644 index a3fdc743..00000000 --- a/templates/essex/etc_nova_api-paste.ini +++ /dev/null @@ -1,162 +0,0 @@ -# essex -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -############ -# Metadata # -############ -[composite:metadata] -use = egg:Paste#urlmap -/: metaversions -/latest: meta -/1.0: meta -/2007-01-19: meta -/2007-03-01: meta -/2007-08-29: meta -/2007-10-10: meta -/2007-12-15: meta -/2008-02-01: meta -/2008-09-01: meta -/2009-04-04: meta - -[pipeline:metaversions] -pipeline = ec2faultwrap logrequest metaverapp - -[pipeline:meta] -pipeline = ec2faultwrap logrequest metaapp - -[app:metaverapp] -paste.app_factory = nova.api.metadata.handler:Versions.factory - -[app:metaapp] -paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory - -####### -# EC2 # -####### - -[composite:ec2] -use = egg:Paste#urlmap -/services/Cloud: ec2cloud - -[composite:ec2cloud] -use = call:nova.api.auth:pipeline_factory -noauth = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor -deprecated = ec2faultwrap logrequest authenticate cloudrequest validator ec2executor -keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor - -[filter:ec2faultwrap] -paste.filter_factory = nova.api.ec2:FaultWrapper.factory - -[filter:logrequest] -paste.filter_factory = nova.api.ec2:RequestLogging.factory - -[filter:ec2lockout] -paste.filter_factory = nova.api.ec2:Lockout.factory - -[filter:totoken] -paste.filter_factory = nova.api.ec2:EC2Token.factory - -[filter:ec2keystoneauth] -paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory - -[filter:ec2noauth] -paste.filter_factory = nova.api.ec2:NoAuth.factory - -[filter:authenticate] -paste.filter_factory = nova.api.ec2:Authenticate.factory - -[filter:cloudrequest] -controller = nova.api.ec2.cloud.CloudController -paste.filter_factory = nova.api.ec2:Requestify.factory - -[filter:authorizer] -paste.filter_factory = nova.api.ec2:Authorizer.factory - -[filter:validator] -paste.filter_factory = nova.api.ec2:Validator.factory - -[app:ec2executor] -paste.app_factory = nova.api.ec2:Executor.factory - -############# -# Openstack # -############# - -[composite:osapi_compute] -use = call:nova.api.openstack.urlmap:urlmap_factory -/: oscomputeversions -/v1.1: openstack_compute_api_v2 -/v2: openstack_compute_api_v2 - -[composite:osapi_volume] -use = call:nova.api.openstack.urlmap:urlmap_factory -/: osvolumeversions -/v1: openstack_volume_api_v1 - -[composite:openstack_compute_api_v2] -use = call:nova.api.auth:pipeline_factory -noauth = faultwrap noauth ratelimit osapi_compute_app_v2 -deprecated = faultwrap auth ratelimit osapi_compute_app_v2 -keystone = faultwrap authtoken keystonecontext ratelimit osapi_compute_app_v2 -keystone_nolimit = faultwrap authtoken keystonecontext osapi_compute_app_v2 - -[composite:openstack_volume_api_v1] -use = call:nova.api.auth:pipeline_factory -noauth = faultwrap noauth ratelimit osapi_volume_app_v1 -deprecated = faultwrap auth ratelimit osapi_volume_app_v1 -keystone = faultwrap authtoken keystonecontext ratelimit osapi_volume_app_v1 -keystone_nolimit = faultwrap authtoken keystonecontext osapi_volume_app_v1 - -[filter:faultwrap] -paste.filter_factory = nova.api.openstack:FaultWrapper.factory - -[filter:auth] -paste.filter_factory = nova.api.openstack.auth:AuthMiddleware.factory - -[filter:noauth] -paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory - -[filter:ratelimit] -paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory - -[app:osapi_compute_app_v2] -paste.app_factory = nova.api.openstack.compute:APIRouter.factory - -[pipeline:oscomputeversions] -pipeline = faultwrap oscomputeversionapp - -[app:osapi_volume_app_v1] -paste.app_factory = nova.api.openstack.volume:APIRouter.factory - -[app:oscomputeversionapp] -paste.app_factory = nova.api.openstack.compute.versions:Versions.factory - -[pipeline:osvolumeversions] -pipeline = faultwrap osvolumeversionapp - -[app:osvolumeversionapp] -paste.app_factory = nova.api.openstack.volume.versions:Versions.factory - -########## -# Shared # -########## - -[filter:keystonecontext] -paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystone.middleware.auth_token:filter_factory -{% if service_host -%} -service_protocol = {{ service_protocol }} -service_host = {{ service_host }} -service_port = {{ service_port }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = {{ auth_protocol }} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -{% endif -%} - diff --git a/templates/folsom/etc_nova_api-paste.ini b/templates/folsom/etc_nova_api-paste.ini deleted file mode 100644 index 0d780f86..00000000 --- a/templates/folsom/etc_nova_api-paste.ini +++ /dev/null @@ -1,141 +0,0 @@ -# folsom -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -############ -# Metadata # -############ -[composite:metadata] -use = egg:Paste#urlmap -/: meta - -[pipeline:meta] -pipeline = ec2faultwrap logrequest metaapp - -[app:metaapp] -paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory - -####### -# EC2 # -####### - -[composite:ec2] -use = egg:Paste#urlmap -/services/Cloud: ec2cloud - -[composite:ec2cloud] -use = call:nova.api.auth:pipeline_factory -noauth = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor -keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor - -[filter:ec2faultwrap] -paste.filter_factory = nova.api.ec2:FaultWrapper.factory - -[filter:logrequest] -paste.filter_factory = nova.api.ec2:RequestLogging.factory - -[filter:ec2lockout] -paste.filter_factory = nova.api.ec2:Lockout.factory - -[filter:ec2keystoneauth] -paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory - -[filter:ec2noauth] -paste.filter_factory = nova.api.ec2:NoAuth.factory - -[filter:cloudrequest] -controller = nova.api.ec2.cloud.CloudController -paste.filter_factory = nova.api.ec2:Requestify.factory - -[filter:authorizer] -paste.filter_factory = nova.api.ec2:Authorizer.factory - -[filter:validator] -paste.filter_factory = nova.api.ec2:Validator.factory - -[app:ec2executor] -paste.app_factory = nova.api.ec2:Executor.factory - -############# -# Openstack # -############# - -[composite:osapi_compute] -use = call:nova.api.openstack.urlmap:urlmap_factory -/: oscomputeversions -/v1.1: openstack_compute_api_v2 -/v2: openstack_compute_api_v2 - -[composite:osapi_volume] -use = call:nova.api.openstack.urlmap:urlmap_factory -/: osvolumeversions -/v1: openstack_volume_api_v1 - -[composite:openstack_compute_api_v2] -use = call:nova.api.auth:pipeline_factory -noauth = faultwrap sizelimit noauth ratelimit osapi_compute_app_v2 -keystone = faultwrap sizelimit authtoken keystonecontext ratelimit osapi_compute_app_v2 -keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v2 - -[composite:openstack_volume_api_v1] -use = call:nova.api.auth:pipeline_factory -noauth = faultwrap sizelimit noauth ratelimit osapi_volume_app_v1 -keystone = faultwrap sizelimit authtoken keystonecontext ratelimit osapi_volume_app_v1 -keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_volume_app_v1 - -[filter:faultwrap] -paste.filter_factory = nova.api.openstack:FaultWrapper.factory - -[filter:noauth] -paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory - -[filter:ratelimit] -paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory - -[filter:sizelimit] -paste.filter_factory = nova.api.sizelimit:RequestBodySizeLimiter.factory - -[app:osapi_compute_app_v2] -paste.app_factory = nova.api.openstack.compute:APIRouter.factory - -[pipeline:oscomputeversions] -pipeline = faultwrap oscomputeversionapp - -[app:osapi_volume_app_v1] -paste.app_factory = nova.api.openstack.volume:APIRouter.factory - -[app:oscomputeversionapp] -paste.app_factory = nova.api.openstack.compute.versions:Versions.factory - -[pipeline:osvolumeversions] -pipeline = faultwrap osvolumeversionapp - -[app:osvolumeversionapp] -paste.app_factory = nova.api.openstack.volume.versions:Versions.factory - -########## -# Shared # -########## - -[filter:keystonecontext] -paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystone.middleware.auth_token:filter_factory -{% if service_host -%} -service_protocol = {{ service_protocol }} -service_host = {{ service_host }} -service_port = {{ service_port }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = {{ auth_protocol }} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -{% endif -%} -# signing_dir is configurable, but the default behavior of the authtoken -# middleware should be sufficient. It will create a temporary directory -# in the home directory for the user the nova process is running as. -#signing_dir = /var/lib/nova/keystone-signing - diff --git a/templates/folsom/etc_quantum_api-paste.ini b/templates/folsom/etc_quantum_api-paste.ini deleted file mode 100644 index 93ed7498..00000000 --- a/templates/folsom/etc_quantum_api-paste.ini +++ /dev/null @@ -1,40 +0,0 @@ -# folsom -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[composite:quantum] -use = egg:Paste#urlmap -/: quantumversions -/v2.0: quantumapi_v2_0 - -[composite:quantumapi_v2_0] -use = call:quantum.auth:pipeline_factory -noauth = extensions quantumapiapp_v2_0 -keystone = authtoken keystonecontext extensions quantumapiapp_v2_0 - -[filter:keystonecontext] -paste.filter_factory = quantum.auth:QuantumKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystone.middleware.auth_token:filter_factory -{% if service_host -%} -service_protocol = {{ service_protocol }} -service_host = {{ service_host }} -service_port = {{ service_port }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = {{ auth_protocol }} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -{% endif -%} - -[filter:extensions] -paste.filter_factory = quantum.extensions.extensions:plugin_aware_extension_middleware_factory - -[app:quantumversions] -paste.app_factory = quantum.api.versions:Versions.factory - -[app:quantumapiapp_v2_0] -paste.app_factory = quantum.api.v2.router:APIRouter.factory diff --git a/templates/folsom/ovs_quantum_plugin.ini b/templates/folsom/ovs_quantum_plugin.ini deleted file mode 100644 index 0113ad27..00000000 --- a/templates/folsom/ovs_quantum_plugin.ini +++ /dev/null @@ -1,23 +0,0 @@ -# grizzly -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[OVS] -tunnel_id_ranges = 1:1000 -tenant_network_type = gre -enable_tunneling = True -local_ip = {{ local_ip }} - -[DATABASE] -{% if database_host -%} -sql_connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %} -reconnect_interval = 2 -{% else -%} -connection = sqlite:////var/lib/quantum/quantum.sqlite -{% endif -%} - -[SECURITYGROUP] -{% if neutron_security_groups -%} -firewall_driver = quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver -{% endif -%} diff --git a/templates/folsom/quantum-server b/templates/folsom/quantum-server deleted file mode 100644 index 2f7e52c5..00000000 --- a/templates/folsom/quantum-server +++ /dev/null @@ -1,6 +0,0 @@ -# quantum -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -QUANTUM_PLUGIN_CONFIG="{{ config }}" \ No newline at end of file diff --git a/templates/folsom/quantum.conf b/templates/folsom/quantum.conf deleted file mode 100644 index 7c82203c..00000000 --- a/templates/folsom/quantum.conf +++ /dev/null @@ -1,48 +0,0 @@ -# grizzly -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[DEFAULT] -state_path = /var/lib/quantum -lock_path = $state_path/lock -bind_host = 0.0.0.0 -{% if neutron_bind_port -%} -bind_port = {{ neutron_bind_port }} -{% else -%} -bind_port = 9696 -{% endif -%} -{% if core_plugin -%} -core_plugin = {{ core_plugin }} -{% endif -%} -use_syslog = {{ use_syslog }} -api_paste_config = /etc/quantum/api-paste.ini -auth_strategy = keystone -control_exchange = quantum -notification_driver = quantum.openstack.common.notifier.rpc_notifier -default_notification_level = INFO -notification_topics = notifications -{% if rabbitmq_host -%} -rabbit_host = {{ rabbitmq_host }} -rabbit_userid = {{ rabbitmq_user }} -rabbit_password = {{ rabbitmq_password }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -{% endif -%} -{% if neutron_security_groups -%} -allow_overlapping_ips = True -{% endif -%} - - -[QUOTAS] -quota_driver = quantum.db.quota_db.DbQuotaDriver -{% if neutron_security_groups -%} -quota_items = network,subnet,port,security_group,security_group_rule -{% endif -%} - -[DEFAULT_SERVICETYPE] - -[AGENT] -root_helper = sudo quantum-rootwrap /etc/quantum/rootwrap.conf - -[keystone_authtoken] -# auth_token middleware currently set in /etc/quantum/api-paste.ini diff --git a/templates/grizzly/etc_nova_api-paste.ini b/templates/grizzly/etc_nova_api-paste.ini deleted file mode 100644 index de4c1d72..00000000 --- a/templates/grizzly/etc_nova_api-paste.ini +++ /dev/null @@ -1,124 +0,0 @@ -# grizzly -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -############ -# Metadata # -############ -[composite:metadata] -use = egg:Paste#urlmap -/: meta - -[pipeline:meta] -pipeline = ec2faultwrap logrequest metaapp - -[app:metaapp] -paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory - -####### -# EC2 # -####### - -[composite:ec2] -use = egg:Paste#urlmap -/services/Cloud: ec2cloud - -[composite:ec2cloud] -use = call:nova.api.auth:pipeline_factory -noauth = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor -keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor - -[filter:ec2faultwrap] -paste.filter_factory = nova.api.ec2:FaultWrapper.factory - -[filter:logrequest] -paste.filter_factory = nova.api.ec2:RequestLogging.factory - -[filter:ec2lockout] -paste.filter_factory = nova.api.ec2:Lockout.factory - -[filter:ec2keystoneauth] -paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory - -[filter:ec2noauth] -paste.filter_factory = nova.api.ec2:NoAuth.factory - -[filter:cloudrequest] -controller = nova.api.ec2.cloud.CloudController -paste.filter_factory = nova.api.ec2:Requestify.factory - -[filter:authorizer] -paste.filter_factory = nova.api.ec2:Authorizer.factory - -[filter:validator] -paste.filter_factory = nova.api.ec2:Validator.factory - -[app:ec2executor] -paste.app_factory = nova.api.ec2:Executor.factory - -############# -# Openstack # -############# - -[composite:osapi_compute] -use = call:nova.api.openstack.urlmap:urlmap_factory -/: oscomputeversions -/v1.1: openstack_compute_api_v2 -/v2: openstack_compute_api_v2 - -[composite:openstack_compute_api_v2] -use = call:nova.api.auth:pipeline_factory -noauth = faultwrap sizelimit noauth ratelimit osapi_compute_app_v2 -keystone = faultwrap sizelimit authtoken keystonecontext ratelimit osapi_compute_app_v2 -keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v2 - -[filter:faultwrap] -paste.filter_factory = nova.api.openstack:FaultWrapper.factory - -[filter:noauth] -paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory - -[filter:ratelimit] -paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory - -[filter:sizelimit] -paste.filter_factory = nova.api.sizelimit:RequestBodySizeLimiter.factory - -[app:osapi_compute_app_v2] -paste.app_factory = nova.api.openstack.compute:APIRouter.factory - -[pipeline:oscomputeversions] -pipeline = faultwrap oscomputeversionapp - -[app:oscomputeversionapp] -paste.app_factory = nova.api.openstack.compute.versions:Versions.factory - -########## -# Shared # -########## - -[filter:keystonecontext] -paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory -{% if service_host -%} -service_protocol = {{ service_protocol }} -service_host = {{ service_host }} -service_port = {{ service_port }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = {{ auth_protocol }} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -{% endif -%} -# signing_dir is configurable, but the default behavior of the authtoken -# middleware should be sufficient. It will create a temporary directory -# in the home directory for the user the nova process is running as. -#signing_dir = /var/lib/nova/keystone-signing -# Workaround for https://bugs.launchpad.net/nova/+bug/1154809 -auth_version = v2.0 - - diff --git a/templates/grizzly/etc_quantum_api-paste.ini b/templates/grizzly/etc_quantum_api-paste.ini deleted file mode 100644 index 70f42667..00000000 --- a/templates/grizzly/etc_quantum_api-paste.ini +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[composite:quantum] -use = egg:Paste#urlmap -/: quantumversions -/v2.0: quantumapi_v2_0 - -[composite:quantumapi_v2_0] -use = call:quantum.auth:pipeline_factory -noauth = extensions quantumapiapp_v2_0 -keystone = authtoken keystonecontext extensions quantumapiapp_v2_0 - -[filter:keystonecontext] -paste.filter_factory = quantum.auth:QuantumKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory -{% if service_host -%} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = http -{% endif -%} - -[filter:extensions] -paste.filter_factory = quantum.api.extensions:plugin_aware_extension_middleware_factory - -[app:quantumversions] -paste.app_factory = quantum.api.versions:Versions.factory - -[app:quantumapiapp_v2_0] -paste.app_factory = quantum.api.v2.router:APIRouter.factory - diff --git a/templates/grizzly/quantum.conf b/templates/grizzly/quantum.conf deleted file mode 100644 index f76acb81..00000000 --- a/templates/grizzly/quantum.conf +++ /dev/null @@ -1,45 +0,0 @@ -# grizzly -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[DEFAULT] -state_path = /var/lib/quantum -lock_path = $state_path/lock -bind_host = 0.0.0.0 -{% if neutron_bind_port -%} -bind_port = {{ neutron_bind_port }} -{% else -%} -bind_port = 9696 -{% endif -%} -{% if core_plugin -%} -core_plugin = {{ core_plugin }} -{% endif -%} -api_paste_config = /etc/quantum/api-paste.ini -auth_strategy = keystone -control_exchange = quantum -notification_driver = quantum.openstack.common.notifier.rpc_notifier -default_notification_level = INFO -notification_topics = notifications - -{% include "parts/database" %} - -{% include "parts/rabbitmq" %} - -{% if neutron_security_groups -%} -allow_overlapping_ips = True -{% endif -%} - -[QUOTAS] -quota_driver = quantum.db.quota_db.DbQuotaDriver -{% if neutron_security_groups -%} -quota_items = network,subnet,port,security_group,security_group_rule -{% endif -%} - -[DEFAULT_SERVICETYPE] - -[AGENT] -root_helper = sudo quantum-rootwrap /etc/quantum/rootwrap.conf - -[keystone_authtoken] -# auth_token middleware currently set in /etc/quantum/api-paste.ini diff --git a/templates/havana/neutron.conf b/templates/havana/neutron.conf deleted file mode 100644 index 9d2df9b7..00000000 --- a/templates/havana/neutron.conf +++ /dev/null @@ -1,56 +0,0 @@ -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[DEFAULT] -state_path = /var/lib/neutron -lock_path = $state_path/lock -bind_host = 0.0.0.0 -auth_strategy = keystone -notification_driver = neutron.openstack.common.notifier.rpc_notifier -use_syslog = {{ use_syslog }} -{% if neutron_bind_port -%} -bind_port = {{ neutron_bind_port }} -{% else -%} -bind_port = 9696 -{% endif -%} -{% if core_plugin -%} -core_plugin = {{ core_plugin }} -{% if neutron_plugin in ['ovs', 'ml2'] -%} -service_plugins = neutron.services.metering.metering_plugin.MeteringPlugin -{% endif -%} -{% endif -%} -{% if neutron_security_groups -%} -allow_overlapping_ips = True -neutron_firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver -{% endif -%} - -{% include "parts/rabbitmq" %} - -[quotas] -quota_driver = neutron.db.quota_db.DbQuotaDriver -{% if neutron_security_groups -%} -quota_items = network,subnet,port,security_group,security_group_rule -{% endif -%} - -[agent] -root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf - -[keystone_authtoken] -signing_dir = $state_path/keystone-signing -{% if service_host -%} -service_protocol = {{ service_protocol }} -service_host = {{ service_host }} -service_port = {{ service_port }} -auth_host = {{ auth_host }} -auth_port = {{ auth_port }} -auth_protocol = {{ auth_protocol }} -admin_tenant_name = {{ admin_tenant_name }} -admin_user = {{ admin_user }} -admin_password = {{ admin_password }} -{% endif -%} - -{% include "parts/section-database" %} - -[lbaas] -[service_providers] diff --git a/templates/havana/ovs_neutron_plugin.ini b/templates/havana/ovs_neutron_plugin.ini deleted file mode 100644 index c94e0b64..00000000 --- a/templates/havana/ovs_neutron_plugin.ini +++ /dev/null @@ -1,12 +0,0 @@ -[OVS] -tunnel_id_ranges = 1:1000 -tenant_network_type = gre -enable_tunneling = True -local_ip = {{ local_ip }} - -[securitygroup] -{% if neutron_security_groups -%} -firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver -{% else -%} -firewall_driver = neutron.agent.firewall.NoopFirewallDriver -{% endif -%} diff --git a/templates/icehouse/ml2_conf.ini b/templates/icehouse/ml2_conf.ini deleted file mode 100644 index cf5e10d0..00000000 --- a/templates/icehouse/ml2_conf.ini +++ /dev/null @@ -1,30 +0,0 @@ -# icehouse -############################################################################### -# [ WARNING ] -# Configuration file maintained by Juju. Local changes may be overwritten. -############################################################################### -[ml2] -type_drivers = gre,vxlan -tenant_network_types = gre,vxlan -mechanism_drivers = openvswitch - -[ml2_type_gre] -tunnel_id_ranges = 1:1000 - -[ml2_type_vxlan] -vni_ranges = 1001:2000 - -[ovs] -enable_tunneling = True -local_ip = {{ local_ip }} - -[agent] -tunnel_types = gre - -[securitygroup] -{% if neutron_security_groups -%} -enable_security_group = True -firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver -{% else -%} -enable_security_group = False -{% endif -%} diff --git a/templates/havana/neutron-server b/templates/icehouse/neutron-server similarity index 84% rename from templates/havana/neutron-server rename to templates/icehouse/neutron-server index cbbc435c..f59c779f 100644 --- a/templates/havana/neutron-server +++ b/templates/icehouse/neutron-server @@ -3,4 +3,4 @@ # [ WARNING ] # Configuration file maintained by Juju. Local changes may be overwritten. ############################################################################### -NEUTRON_PLUGIN_CONFIG="{{ config }}" \ No newline at end of file +NEUTRON_PLUGIN_CONFIG="{{ plugin_conf_file }}"