Drop support for OpenStack releases < Icehouse
Rollup all old configuration file templates, remove any related to Quantum which was renamed in the Havana release. Drop references in code to Quantum, refactor unit tests to baseline on Icehouse rather than anything older. Drop relation and associated references to nova-volume service; deprecated in Folsom and removed in Havana. Drop ml2 migration - this was required when migrating to Icehouse from older releases. Change-Id: I6f5d641ffef2599d0dfc8e16a2dce3cc7be88bd4
This commit is contained in:
parent
60377b524f
commit
6e8dcf8af8
|
@ -97,7 +97,7 @@ options:
|
|||
|
||||
FlatDHCPManager (nova-network) (default)
|
||||
FlatManager (nova-network)
|
||||
Neutron|Quantum (Full SDN solution)
|
||||
Neutron (Full SDN solution)
|
||||
|
||||
When using the Neutron option you will most likely want to use
|
||||
the neutron-gateway charm to provide L3 routing and DHCP Services.
|
||||
|
|
|
@ -7,21 +7,15 @@ from charmhelpers.core.hookenv import (
|
|||
relation_set,
|
||||
log,
|
||||
DEBUG,
|
||||
ERROR,
|
||||
related_units,
|
||||
relations_for_id,
|
||||
relation_get,
|
||||
is_relation_made,
|
||||
unit_get,
|
||||
)
|
||||
from charmhelpers.fetch import (
|
||||
apt_install,
|
||||
filter_installed_packages,
|
||||
)
|
||||
from charmhelpers.contrib.openstack import (
|
||||
context,
|
||||
neutron,
|
||||
utils,
|
||||
)
|
||||
from charmhelpers.contrib.hahelpers.cluster import (
|
||||
determine_apache_port,
|
||||
|
@ -115,23 +109,11 @@ class NeutronAPIContext(context.OSContextGenerator):
|
|||
|
||||
|
||||
class VolumeServiceContext(context.OSContextGenerator):
|
||||
interfaces = ['nova-volume-service', 'cinder-volume-service']
|
||||
interfaces = ['cinder-volume-service']
|
||||
|
||||
def __call__(self):
|
||||
ctxt = {}
|
||||
|
||||
if relation_ids('nova-volume-service'):
|
||||
if utils.os_release('nova-common') not in ['essex', 'folsom']:
|
||||
e = ('Attempting to relate a nova-volume service to an '
|
||||
'Nova version (%s). Use cinder.')
|
||||
log(e, level=ERROR)
|
||||
|
||||
raise context.OSContextError(e)
|
||||
install_pkg = filter_installed_packages(['nova-api-os-volume'])
|
||||
if install_pkg:
|
||||
apt_install(install_pkg)
|
||||
ctxt['volume_service'] = 'nova-volume'
|
||||
elif relation_ids('cinder-volume-service'):
|
||||
if relation_ids('cinder-volume-service'):
|
||||
ctxt['volume_service'] = 'cinder'
|
||||
# kick all compute nodes to know they should use cinder now.
|
||||
[relation_set(relation_id=rid, volume_service='cinder')
|
||||
|
@ -159,8 +141,6 @@ class HAProxyContext(context.HAProxyContext):
|
|||
singlenode_mode=True)
|
||||
s3_api = determine_api_port(api_port('nova-objectstore'),
|
||||
singlenode_mode=True)
|
||||
nvol_api = determine_api_port(api_port('nova-api-os-volume'),
|
||||
singlenode_mode=True)
|
||||
neutron_api = determine_api_port(api_port('neutron-server'),
|
||||
singlenode_mode=True)
|
||||
|
||||
|
@ -171,8 +151,6 @@ class HAProxyContext(context.HAProxyContext):
|
|||
singlenode_mode=True)
|
||||
a_s3_api = determine_apache_port(api_port('nova-objectstore'),
|
||||
singlenode_mode=True)
|
||||
a_nvol_api = determine_apache_port(api_port('nova-api-os-volume'),
|
||||
singlenode_mode=True)
|
||||
a_neutron_api = determine_apache_port(api_port('neutron-server'),
|
||||
singlenode_mode=True)
|
||||
|
||||
|
@ -192,20 +170,13 @@ class HAProxyContext(context.HAProxyContext):
|
|||
api_port('nova-objectstore'), a_s3_api],
|
||||
}
|
||||
|
||||
if relation_ids('nova-volume-service'):
|
||||
port_mapping.update({
|
||||
'nova-api-ec2': [
|
||||
api_port('nova-api-ec2'), a_nvol_api],
|
||||
})
|
||||
listen_ports['osapi_volume_listen_port'] = nvol_api
|
||||
|
||||
if not is_relation_made('neutron-api'):
|
||||
if neutron.network_manager() in ['neutron', 'quantum']:
|
||||
if neutron.network_manager() == 'neutron':
|
||||
port_mapping.update({
|
||||
'neutron-server': [
|
||||
api_port('neutron-server'), a_neutron_api]
|
||||
})
|
||||
# quantum/neutron.conf listening port, set separte from nova's.
|
||||
# neutron.conf listening port, set separte from nova's.
|
||||
ctxt['neutron_bind_port'] = neutron_api
|
||||
|
||||
# for haproxy.conf
|
||||
|
@ -254,6 +225,7 @@ class NeutronCCContext(context.NeutronContext):
|
|||
|
||||
@property
|
||||
def neutron_security_groups(self):
|
||||
# TODO: review use of this flag
|
||||
sec_groups = (config('neutron-security-groups') or
|
||||
config('quantum-security-groups'))
|
||||
return sec_groups.lower() == 'yes'
|
||||
|
|
|
@ -94,12 +94,9 @@ from nova_cc_utils import (
|
|||
ssh_authorized_keys_lines,
|
||||
register_configs,
|
||||
restart_map,
|
||||
volume_service,
|
||||
CLUSTER_RES,
|
||||
NOVA_CONF,
|
||||
QUANTUM_CONF,
|
||||
NEUTRON_CONF,
|
||||
QUANTUM_API_PASTE,
|
||||
console_attributes,
|
||||
service_guard,
|
||||
guard_map,
|
||||
|
@ -298,8 +295,6 @@ def amqp_changed():
|
|||
return
|
||||
CONFIGS.write(NOVA_CONF)
|
||||
if not is_relation_made('neutron-api'):
|
||||
if network_manager() == 'quantum':
|
||||
CONFIGS.write(QUANTUM_CONF)
|
||||
if network_manager() == 'neutron':
|
||||
CONFIGS.write(NEUTRON_CONF)
|
||||
[nova_cell_relation_joined(rid=rid)
|
||||
|
@ -342,7 +337,7 @@ def db_joined(relation_id=None):
|
|||
log(e, level=ERROR)
|
||||
raise Exception(e)
|
||||
|
||||
if network_manager() in ['quantum', 'neutron']:
|
||||
if network_manager() == 'neutron':
|
||||
config_neutron = True
|
||||
else:
|
||||
config_neutron = False
|
||||
|
@ -377,7 +372,6 @@ def db_joined(relation_id=None):
|
|||
relation_id=relation_id)
|
||||
|
||||
if config_neutron:
|
||||
# XXX: Renaming relations from quantum_* to neutron_* here.
|
||||
relation_set(neutron_database=config('neutron-database'),
|
||||
neutron_username=config('neutron-database-user'),
|
||||
neutron_hostname=host,
|
||||
|
@ -442,7 +436,7 @@ def postgresql_nova_db_changed():
|
|||
active=config('service-guard'))
|
||||
@restart_on_change(restart_map())
|
||||
def postgresql_neutron_db_changed():
|
||||
if network_manager() in ['neutron', 'quantum']:
|
||||
if network_manager() == 'neutron':
|
||||
plugin = neutron_plugin()
|
||||
# DB config might have been moved to main neutron.conf in H?
|
||||
CONFIGS.write(neutron_plugin_attribute(plugin, 'config'))
|
||||
|
@ -484,10 +478,6 @@ def identity_changed():
|
|||
CONFIGS.write('/etc/nova/api-paste.ini')
|
||||
CONFIGS.write(NOVA_CONF)
|
||||
if not is_relation_made('neutron-api'):
|
||||
if network_manager() == 'quantum':
|
||||
CONFIGS.write(QUANTUM_API_PASTE)
|
||||
CONFIGS.write(QUANTUM_CONF)
|
||||
save_novarc()
|
||||
if network_manager() == 'neutron':
|
||||
CONFIGS.write(NEUTRON_CONF)
|
||||
[compute_joined(rid) for rid in relation_ids('cloud-compute')]
|
||||
|
@ -579,7 +569,7 @@ def keystone_compute_settings():
|
|||
ks_auth_config = _auth_config()
|
||||
rel_settings = {}
|
||||
|
||||
if network_manager() in ['quantum', 'neutron']:
|
||||
if network_manager() == 'neutron':
|
||||
if ks_auth_config:
|
||||
rel_settings.update(ks_auth_config)
|
||||
rel_settings.update(neutron_settings())
|
||||
|
@ -640,7 +630,7 @@ def compute_joined(rid=None, remote_restart=False):
|
|||
relation_set(relation_id=rid, **cons_settings)
|
||||
rel_settings = {
|
||||
'network_manager': network_manager(),
|
||||
'volume_service': volume_service(),
|
||||
'volume_service': 'cinder',
|
||||
# (comment from bash vers) XXX Should point to VIP if clustered, or
|
||||
# this may not even be needed.
|
||||
'ec2_host': unit_get('private-address'),
|
||||
|
@ -850,8 +840,6 @@ def ha_changed():
|
|||
|
||||
CONFIGS.write(NOVA_CONF)
|
||||
if not is_relation_made('neutron-api'):
|
||||
if network_manager() == 'quantum':
|
||||
CONFIGS.write(QUANTUM_CONF)
|
||||
if network_manager() == 'neutron':
|
||||
CONFIGS.write(NEUTRON_CONF)
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ BASE_SERVICES = [
|
|||
'nova-objectstore',
|
||||
'nova-cert',
|
||||
'nova-scheduler',
|
||||
'nova-conductor',
|
||||
]
|
||||
|
||||
SERVICE_BLACKLIST = {
|
||||
|
@ -175,23 +176,18 @@ API_PORTS = {
|
|||
'nova-api-os-volume': 8776,
|
||||
'nova-objectstore': 3333,
|
||||
'neutron-server': 9696,
|
||||
'quantum-server': 9696,
|
||||
}
|
||||
|
||||
NOVA_CONF_DIR = "/etc/nova"
|
||||
QUANTUM_CONF_DIR = "/etc/quantum"
|
||||
NEUTRON_CONF_DIR = "/etc/neutron"
|
||||
|
||||
NOVA_CONF = '%s/nova.conf' % NOVA_CONF_DIR
|
||||
NOVA_API_PASTE = '%s/api-paste.ini' % NOVA_CONF_DIR
|
||||
QUANTUM_CONF = '%s/quantum.conf' % QUANTUM_CONF_DIR
|
||||
QUANTUM_API_PASTE = '%s/api-paste.ini' % QUANTUM_CONF_DIR
|
||||
NEUTRON_CONF = '%s/neutron.conf' % NEUTRON_CONF_DIR
|
||||
HAPROXY_CONF = '/etc/haproxy/haproxy.cfg'
|
||||
APACHE_CONF = '/etc/apache2/sites-available/openstack_https_frontend'
|
||||
APACHE_24_CONF = '/etc/apache2/sites-available/openstack_https_frontend.conf'
|
||||
NEUTRON_DEFAULT = '/etc/default/neutron-server'
|
||||
QUANTUM_DEFAULT = '/etc/default/quantum-server'
|
||||
|
||||
|
||||
def resolve_services():
|
||||
|
@ -242,30 +238,6 @@ BASE_RESOURCE_MAP = OrderedDict([
|
|||
'contexts': [nova_cc_context.IdentityServiceContext(),
|
||||
nova_cc_context.APIRateLimitingContext()],
|
||||
}),
|
||||
(QUANTUM_CONF, {
|
||||
'services': ['quantum-server'],
|
||||
'contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),
|
||||
context.SharedDBContext(
|
||||
user=config('neutron-database-user'),
|
||||
database=config('neutron-database'),
|
||||
relation_prefix='neutron',
|
||||
ssl_dir=QUANTUM_CONF_DIR),
|
||||
nova_cc_context.NeutronPostgresqlDBContext(),
|
||||
nova_cc_context.HAProxyContext(),
|
||||
nova_cc_context.IdentityServiceContext(
|
||||
service='neutron',
|
||||
service_user='neutron'),
|
||||
nova_cc_context.NeutronCCContext(),
|
||||
context.SyslogContext()],
|
||||
}),
|
||||
(QUANTUM_DEFAULT, {
|
||||
'services': ['quantum-server'],
|
||||
'contexts': [nova_cc_context.NeutronCCContext()],
|
||||
}),
|
||||
(QUANTUM_API_PASTE, {
|
||||
'services': ['quantum-server'],
|
||||
'contexts': [nova_cc_context.IdentityServiceContext()],
|
||||
}),
|
||||
(NEUTRON_CONF, {
|
||||
'services': ['neutron-server'],
|
||||
'contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
|
||||
|
@ -336,12 +308,6 @@ def resource_map():
|
|||
'''
|
||||
resource_map = deepcopy(BASE_RESOURCE_MAP)
|
||||
|
||||
if relation_ids('nova-volume-service'):
|
||||
# if we have a relation to a nova-volume service, we're
|
||||
# also managing the nova-volume API endpoint (legacy)
|
||||
resource_map['/etc/nova/nova.conf']['services'].append(
|
||||
'nova-api-os-volume')
|
||||
|
||||
net_manager = network_manager()
|
||||
|
||||
if os.path.exists('/etc/apache2/conf-available'):
|
||||
|
@ -353,15 +319,12 @@ def resource_map():
|
|||
nova_cc_context.NeutronCCContext())
|
||||
# pop out irrelevant resources from the OrderedDict (easier than adding
|
||||
# them late)
|
||||
if net_manager != 'quantum':
|
||||
[resource_map.pop(k) for k in list(resource_map.iterkeys())
|
||||
if 'quantum' in k]
|
||||
if net_manager != 'neutron':
|
||||
[resource_map.pop(k) for k in list(resource_map.iterkeys())
|
||||
if 'neutron' in k]
|
||||
# add neutron plugin requirements. nova-c-c only needs the
|
||||
# neutron-server associated with configs, not the plugin agent.
|
||||
if net_manager in ['quantum', 'neutron']:
|
||||
if net_manager == 'neutron':
|
||||
plugin = neutron_plugin()
|
||||
if plugin:
|
||||
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
|
||||
|
@ -382,15 +345,11 @@ def resource_map():
|
|||
if is_relation_made('neutron-api'):
|
||||
for k in list(resource_map.iterkeys()):
|
||||
# neutron-api runs neutron services
|
||||
if 'quantum' in k or 'neutron' in k:
|
||||
if 'neutron' in k:
|
||||
resource_map[k]['services'] = []
|
||||
resource_map[NOVA_CONF]['contexts'].append(
|
||||
nova_cc_context.NeutronAPIContext())
|
||||
|
||||
# nova-conductor for releases >= G.
|
||||
if os_release('nova-common') not in ['essex', 'folsom']:
|
||||
resource_map['/etc/nova/nova.conf']['services'] += ['nova-conductor']
|
||||
|
||||
if os_release('nova-common') >= 'mitaka':
|
||||
resource_map[NOVA_CONF]['contexts'].append(
|
||||
nova_cc_context.NovaAPISharedDBContext(relation_prefix='novaapi',
|
||||
|
@ -399,7 +358,7 @@ def resource_map():
|
|||
)
|
||||
|
||||
if console_attributes('services'):
|
||||
resource_map['/etc/nova/nova.conf']['services'] += \
|
||||
resource_map[NOVA_CONF]['services'] += \
|
||||
console_attributes('services')
|
||||
|
||||
# also manage any configs that are being updated by subordinates.
|
||||
|
@ -480,7 +439,7 @@ def determine_packages():
|
|||
packages = [] + BASE_PACKAGES
|
||||
for v in resource_map().values():
|
||||
packages.extend(v['services'])
|
||||
if network_manager() in ['neutron', 'quantum']:
|
||||
if network_manager() == 'neutron':
|
||||
pkgs = neutron_plugin_attribute(neutron_plugin(), 'server_packages',
|
||||
network_manager())
|
||||
packages.extend(pkgs)
|
||||
|
@ -510,8 +469,6 @@ def save_script_rc():
|
|||
}
|
||||
if relation_ids('nova-volume-service'):
|
||||
env_vars['OPENSTACK_SERVICE_API_OS_VOL'] = 'nova-api-os-volume'
|
||||
if network_manager() == 'quantum':
|
||||
env_vars['OPENSTACK_SERVICE_API_QUANTUM'] = 'quantum-server'
|
||||
if network_manager() == 'neutron':
|
||||
env_vars['OPENSTACK_SERVICE_API_NEUTRON'] = 'neutron-server'
|
||||
_save_script_rc(**env_vars)
|
||||
|
@ -568,7 +525,6 @@ def disable_policy_rcd():
|
|||
os.unlink('/usr/sbin/policy-rc.d')
|
||||
|
||||
|
||||
QUANTUM_DB_MANAGE = "quantum-db-manage"
|
||||
NEUTRON_DB_MANAGE = "neutron-db-manage"
|
||||
|
||||
|
||||
|
@ -580,46 +536,25 @@ def reset_os_release():
|
|||
|
||||
def neutron_db_manage(actions):
|
||||
net_manager = network_manager()
|
||||
if net_manager in ['neutron', 'quantum']:
|
||||
if net_manager == 'neutron':
|
||||
plugin = neutron_plugin()
|
||||
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
|
||||
if net_manager == 'quantum':
|
||||
cmd = QUANTUM_DB_MANAGE
|
||||
else:
|
||||
cmd = NEUTRON_DB_MANAGE
|
||||
subprocess.check_call([
|
||||
cmd, '--config-file=/etc/{mgr}/{mgr}.conf'.format(mgr=net_manager),
|
||||
NEUTRON_DB_MANAGE,
|
||||
'--config-file=/etc/{mgr}/{mgr}.conf'.format(mgr=net_manager),
|
||||
'--config-file={}'.format(conf)] + actions
|
||||
)
|
||||
|
||||
|
||||
def get_db_connection():
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.read('/etc/neutron/neutron.conf')
|
||||
config.read(NEUTRON_CONF)
|
||||
try:
|
||||
return config.get('database', 'connection')
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def ml2_migration():
|
||||
reset_os_release()
|
||||
net_manager = network_manager()
|
||||
if net_manager == 'neutron':
|
||||
plugin = neutron_plugin()
|
||||
if plugin == 'ovs':
|
||||
log('Migrating from openvswitch to ml2 plugin')
|
||||
cmd = [
|
||||
'python',
|
||||
'/usr/lib/python2.7/dist-packages/neutron'
|
||||
'/db/migration/migrate_to_ml2.py',
|
||||
'--tunnel-type', 'gre',
|
||||
'--release', 'icehouse',
|
||||
'openvswitch', get_db_connection()
|
||||
]
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
|
||||
def is_db_initialised():
|
||||
if relation_ids('cluster'):
|
||||
dbsync_state = peer_retrieve('dbsync_state')
|
||||
|
@ -671,10 +606,6 @@ def _do_openstack_upgrade(new_src):
|
|||
configs = register_configs(release=new_os_rel)
|
||||
configs.write_all()
|
||||
|
||||
if new_os_rel == 'icehouse':
|
||||
# NOTE(jamespage) default plugin switch to ml2@icehouse
|
||||
ml2_migration()
|
||||
|
||||
if new_os_rel >= 'mitaka' and not database_setup(prefix='novaapi'):
|
||||
# NOTE: Defer service restarts and database migrations for now
|
||||
# as nova_api database is not yet created
|
||||
|
@ -721,17 +652,6 @@ def do_openstack_upgrade(configs):
|
|||
return _do_openstack_upgrade(new_src)
|
||||
|
||||
|
||||
def volume_service():
|
||||
'''Specifies correct volume API for specific OS release'''
|
||||
os_vers = os_release('nova-common')
|
||||
if os_vers == 'essex':
|
||||
return 'nova-volume'
|
||||
elif os_vers == 'folsom': # support both drivers in folsom.
|
||||
if not relation_ids('cinder-volume-service'):
|
||||
return 'nova-volume'
|
||||
return 'cinder'
|
||||
|
||||
|
||||
# NOTE(jamespage): Retry deals with sync issues during one-shot HA deploys.
|
||||
# mysql might be restarting or suchlike.
|
||||
@retry_on_exception(5, base_delay=3, exc_type=subprocess.CalledProcessError)
|
||||
|
@ -761,6 +681,7 @@ def migrate_neutron_database():
|
|||
neutron_db_manage(['upgrade', 'head'])
|
||||
|
||||
|
||||
# TODO: refactor to use unit storage or related data
|
||||
def auth_token_config(setting):
|
||||
"""
|
||||
Returns currently configured value for setting in api-paste.ini's
|
||||
|
@ -951,21 +872,12 @@ def determine_endpoints(public_url, internal_url, admin_url):
|
|||
region = config('region')
|
||||
os_rel = os_release('nova-common')
|
||||
|
||||
if os_rel >= 'grizzly':
|
||||
nova_public_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(public_url, api_port('nova-api-os-compute')))
|
||||
nova_internal_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(internal_url, api_port('nova-api-os-compute')))
|
||||
nova_admin_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(admin_url, api_port('nova-api-os-compute')))
|
||||
else:
|
||||
nova_public_url = ('%s:%s/v1.1/$(tenant_id)s' %
|
||||
(public_url, api_port('nova-api-os-compute')))
|
||||
nova_internal_url = ('%s:%s/v1.1/$(tenant_id)s' %
|
||||
(internal_url, api_port('nova-api-os-compute')))
|
||||
nova_admin_url = ('%s:%s/v1.1/$(tenant_id)s' %
|
||||
(admin_url, api_port('nova-api-os-compute')))
|
||||
|
||||
nova_public_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(public_url, api_port('nova-api-os-compute')))
|
||||
nova_internal_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(internal_url, api_port('nova-api-os-compute')))
|
||||
nova_admin_url = ('%s:%s/v2/$(tenant_id)s' %
|
||||
(admin_url, api_port('nova-api-os-compute')))
|
||||
ec2_public_url = '%s:%s/services/Cloud' % (
|
||||
public_url, api_port('nova-api-ec2'))
|
||||
ec2_internal_url = '%s:%s/services/Cloud' % (
|
||||
|
@ -973,14 +885,6 @@ def determine_endpoints(public_url, internal_url, admin_url):
|
|||
ec2_admin_url = '%s:%s/services/Cloud' % (admin_url,
|
||||
api_port('nova-api-ec2'))
|
||||
|
||||
nova_volume_public_url = ('%s:%s/v1/$(tenant_id)s' %
|
||||
(public_url, api_port('nova-api-os-compute')))
|
||||
nova_volume_internal_url = ('%s:%s/v1/$(tenant_id)s' %
|
||||
(internal_url,
|
||||
api_port('nova-api-os-compute')))
|
||||
nova_volume_admin_url = ('%s:%s/v1/$(tenant_id)s' %
|
||||
(admin_url, api_port('nova-api-os-compute')))
|
||||
|
||||
neutron_public_url = '%s:%s' % (public_url, api_port('neutron-server'))
|
||||
neutron_internal_url = '%s:%s' % (internal_url, api_port('neutron-server'))
|
||||
neutron_admin_url = '%s:%s' % (admin_url, api_port('neutron-server'))
|
||||
|
@ -1008,15 +912,6 @@ def determine_endpoints(public_url, internal_url, admin_url):
|
|||
's3_internal_url': s3_internal_url,
|
||||
}
|
||||
|
||||
if relation_ids('nova-volume-service'):
|
||||
endpoints.update({
|
||||
'nova-volume_service': 'nova-volume',
|
||||
'nova-volume_region': region,
|
||||
'nova-volume_public_url': nova_volume_public_url,
|
||||
'nova-volume_admin_url': nova_volume_admin_url,
|
||||
'nova-volume_internal_url': nova_volume_internal_url,
|
||||
})
|
||||
|
||||
# XXX: Keep these relations named quantum_*??
|
||||
if relation_ids('neutron-api'):
|
||||
endpoints.update({
|
||||
|
@ -1026,7 +921,7 @@ def determine_endpoints(public_url, internal_url, admin_url):
|
|||
'quantum_admin_url': None,
|
||||
'quantum_internal_url': None,
|
||||
})
|
||||
elif network_manager() in ['quantum', 'neutron']:
|
||||
elif network_manager() == 'neutron':
|
||||
endpoints.update({
|
||||
'quantum_service': 'quantum',
|
||||
'quantum_region': region,
|
||||
|
@ -1055,6 +950,7 @@ def determine_endpoints(public_url, internal_url, admin_url):
|
|||
return endpoints
|
||||
|
||||
|
||||
# TODO: review to see if we can drop quantum-plugin
|
||||
def neutron_plugin():
|
||||
# quantum-plugin config setting can be safely overriden
|
||||
# as we only supported OVS in G/neutron
|
||||
|
@ -1079,17 +975,14 @@ def guard_map():
|
|||
gmap[svc] = nova_interfaces
|
||||
|
||||
net_manager = network_manager()
|
||||
if net_manager in ['neutron', 'quantum'] and \
|
||||
if net_manager == 'neutron' and \
|
||||
not is_relation_made('neutron-api'):
|
||||
neutron_interfaces = ['identity-service', 'amqp']
|
||||
if relation_ids('pgsql-neutron-db'):
|
||||
neutron_interfaces.append('pgsql-neutron-db')
|
||||
else:
|
||||
neutron_interfaces.append('shared-db')
|
||||
if network_manager() == 'quantum':
|
||||
gmap['quantum-server'] = neutron_interfaces
|
||||
else:
|
||||
gmap['neutron-server'] = neutron_interfaces
|
||||
gmap['neutron-server'] = neutron_interfaces
|
||||
|
||||
return gmap
|
||||
|
||||
|
|
|
@ -38,8 +38,6 @@ requires:
|
|||
interface: nova-compute
|
||||
cinder-volume-service:
|
||||
interface: cinder
|
||||
nova-volume-service:
|
||||
interface: nova-volume
|
||||
quantum-network-service:
|
||||
interface: quantum
|
||||
neutron-api:
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
# essex
|
||||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
--dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
--dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
--logdir=/var/log/nova
|
||||
--state_path=/var/lib/nova
|
||||
--lock_path=/var/lock/nova
|
||||
--force_dhcp_release
|
||||
--iscsi_helper=tgtadm
|
||||
--libvirt_use_virtio_for_bridges
|
||||
--connection_type=libvirt
|
||||
--root_helper=sudo nova-rootwrap
|
||||
--verbose
|
||||
--use_syslog={{ use_syslog }}
|
||||
--ec2_private_dns_show_ip
|
||||
{% if database_host -%}
|
||||
--sql_connection={{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% endif -%}
|
||||
{% if rabbitmq_host -%}
|
||||
--rabbit_host={{ rabbitmq_host }}
|
||||
--rabbit_userid={{ rabbitmq_user }}
|
||||
--rabbit_password={{ rabbitmq_password }}
|
||||
--rabbit_virtual_host={{ rabbitmq_virtual_host }}
|
||||
{% endif -%}
|
||||
{% if glance_api_servers -%}
|
||||
--glance_api_servers={{ glance_api_servers }}
|
||||
{% endif -%}
|
||||
{% if rbd_pool -%}
|
||||
--rbd_pool={{ rbd_pool }}
|
||||
--rbd_user={{ rbd_user }}
|
||||
--rbd_secret_uuid={{ rbd_secret_uuid }}
|
||||
{% endif -%}
|
|
@ -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
|
||||
|
|
@ -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
|
|
@ -1,133 +0,0 @@
|
|||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
logdir=/var/log/nova
|
||||
state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
force_dhcp_release=True
|
||||
iscsi_helper=tgtadm
|
||||
libvirt_use_virtio_for_bridges=True
|
||||
connection_type=libvirt
|
||||
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
|
||||
verbose=True
|
||||
use_syslog={{ use_syslog }}
|
||||
ec2_private_dns_show_ip=True
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
volumes_path=/var/lib/nova/volumes
|
||||
enabled_apis=ec2,osapi_compute,metadata
|
||||
auth_strategy=keystone
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
|
||||
{% if memcached_servers %}
|
||||
memcached_servers = {{ memcached_servers }}
|
||||
{% endif %}
|
||||
|
||||
{% if keystone_ec2_url -%}
|
||||
keystone_ec2_url = {{ keystone_ec2_url }}
|
||||
{% endif -%}
|
||||
|
||||
{% include "parts/database" %}
|
||||
|
||||
{% if rabbitmq_host -%}
|
||||
{% if rabbit_ssl_port %}
|
||||
rabbit_use_ssl=True
|
||||
rabbit_port={{ rabbit_ssl_port }}
|
||||
{% if rabbit_ssl_ca %}
|
||||
kombu_ssl_ca_certs={{rabbit_ssl_ca}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
rabbit_host = {{ rabbitmq_host }}
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
rabbit_password = {{ rabbitmq_password }}
|
||||
rabbit_virtual_host = {{ rabbitmq_virtual_host }}
|
||||
{% endif -%}
|
||||
|
||||
{% if glance_api_servers -%}
|
||||
glance_api_servers = {{ glance_api_servers }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rbd_pool -%}
|
||||
rbd_pool = {{ rbd_pool }}
|
||||
rbd_user = {{ rbd_user }}
|
||||
rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'ovs' -%}
|
||||
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
|
||||
libvirt_user_virtio_for_bridges = True
|
||||
{% if neutron_security_groups -%}
|
||||
security_group_api = {{ network_manager }}
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% endif -%}
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'nvp' -%}
|
||||
security_group_api = neutron
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager_config -%}
|
||||
{% for key, value in network_manager_config.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager and network_manager == 'quantum' -%}
|
||||
network_api_class = nova.network.quantumv2.api.API
|
||||
quantum_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
quantum_auth_strategy = keystone
|
||||
quantum_admin_tenant_name = {{ admin_tenant_name }}
|
||||
quantum_admin_username = {{ admin_user }}
|
||||
quantum_admin_password = {{ admin_password }}
|
||||
quantum_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% elif network_manager and network_manager == 'neutron' -%}
|
||||
network_api_class = nova.network.neutronv2.api.API
|
||||
neutron_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
neutron_auth_strategy = keystone
|
||||
neutron_admin_tenant_name = {{ admin_tenant_name }}
|
||||
neutron_admin_username = {{ admin_user }}
|
||||
neutron_admin_password = {{ admin_password }}
|
||||
neutron_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% else -%}
|
||||
network_manager = nova.network.manager.FlatDHCPManager
|
||||
{% endif -%}
|
||||
|
||||
{% if default_floating_pool -%}
|
||||
default_floating_pool = {{ default_floating_pool }}
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_service -%}
|
||||
volume_api_class=nova.volume.cinder.API
|
||||
{% endif -%}
|
||||
|
||||
{% if user_config_flags -%}
|
||||
{% for key, value in user_config_flags.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if listen_ports -%}
|
||||
{% for key, value in listen_ports.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if sections and 'DEFAULT' in sections -%}
|
||||
{% for key, value in sections['DEFAULT'] -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
|
@ -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 -%}
|
|
@ -1,6 +0,0 @@
|
|||
# quantum
|
||||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
QUANTUM_PLUGIN_CONFIG="{{ config }}"
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
logdir=/var/log/nova
|
||||
state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
force_dhcp_release=True
|
||||
iscsi_helper=tgtadm
|
||||
libvirt_use_virtio_for_bridges=True
|
||||
connection_type=libvirt
|
||||
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
|
||||
verbose=True
|
||||
ec2_private_dns_show_ip=True
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
volumes_path=/var/lib/nova/volumes
|
||||
enabled_apis=ec2,osapi_compute,metadata
|
||||
auth_strategy=keystone
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
|
||||
{% if memcached_servers %}
|
||||
memcached_servers = {{ memcached_servers }}
|
||||
{% endif %}
|
||||
|
||||
{% if keystone_ec2_url -%}
|
||||
keystone_ec2_url = {{ keystone_ec2_url }}
|
||||
{% endif -%}
|
||||
|
||||
{% include "parts/database" %}
|
||||
|
||||
{% include "parts/rabbitmq" %}
|
||||
|
||||
{% if glance_api_servers -%}
|
||||
glance_api_servers = {{ glance_api_servers }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rbd_pool -%}
|
||||
rbd_pool = {{ rbd_pool }}
|
||||
rbd_user = {{ rbd_user }}
|
||||
rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'ovs' -%}
|
||||
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
|
||||
libvirt_user_virtio_for_bridges = True
|
||||
{% if neutron_security_groups -%}
|
||||
security_group_api = {{ network_manager }}
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% endif -%}
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'nvp' -%}
|
||||
security_group_api = neutron
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager_config -%}
|
||||
{% for key, value in network_manager_config.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager and network_manager == 'quantum' -%}
|
||||
network_api_class = nova.network.quantumv2.api.API
|
||||
quantum_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
quantum_auth_strategy = keystone
|
||||
quantum_admin_tenant_name = {{ admin_tenant_name }}
|
||||
quantum_admin_username = {{ admin_user }}
|
||||
quantum_admin_password = {{ admin_password }}
|
||||
quantum_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% elif network_manager and network_manager == 'neutron' -%}
|
||||
network_api_class = nova.network.neutronv2.api.API
|
||||
neutron_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
neutron_auth_strategy = keystone
|
||||
neutron_admin_tenant_name = {{ admin_tenant_name }}
|
||||
neutron_admin_username = {{ admin_user }}
|
||||
neutron_admin_password = {{ admin_password }}
|
||||
neutron_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% else -%}
|
||||
network_manager = nova.network.manager.FlatDHCPManager
|
||||
{% endif -%}
|
||||
|
||||
{% if default_floating_pool -%}
|
||||
default_floating_pool = {{ default_floating_pool }}
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_service -%}
|
||||
volume_api_class=nova.volume.cinder.API
|
||||
{% endif -%}
|
||||
|
||||
{% if user_config_flags -%}
|
||||
{% for key, value in user_config_flags.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if listen_ports -%}
|
||||
{% for key, value in listen_ports.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if sections and 'DEFAULT' in sections -%}
|
||||
{% for key, value in sections['DEFAULT'] -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
|
@ -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
|
|
@ -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]
|
|
@ -1,131 +0,0 @@
|
|||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
logdir=/var/log/nova
|
||||
state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
force_dhcp_release=True
|
||||
iscsi_helper=tgtadm
|
||||
libvirt_use_virtio_for_bridges=True
|
||||
connection_type=libvirt
|
||||
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
|
||||
verbose=True
|
||||
ec2_private_dns_show_ip=True
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
volumes_path=/var/lib/nova/volumes
|
||||
enabled_apis=ec2,osapi_compute,metadata
|
||||
auth_strategy=keystone
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
osapi_compute_workers = {{ workers }}
|
||||
ec2_workers = {{ workers }}
|
||||
|
||||
scheduler_default_filters = {{ scheduler_default_filters }}
|
||||
cpu_allocation_ratio = {{ cpu_allocation_ratio }}
|
||||
use_syslog={{ use_syslog }}
|
||||
my_ip = {{ host_ip }}
|
||||
|
||||
{% if memcached_servers %}
|
||||
memcached_servers = {{ memcached_servers }}
|
||||
{% endif %}
|
||||
|
||||
{% if keystone_ec2_url -%}
|
||||
keystone_ec2_url = {{ keystone_ec2_url }}
|
||||
{% endif -%}
|
||||
|
||||
{% include "parts/database" %}
|
||||
|
||||
{% include "parts/rabbitmq" %}
|
||||
|
||||
{% if glance_api_servers -%}
|
||||
glance_api_servers = {{ glance_api_servers }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rbd_pool -%}
|
||||
rbd_pool = {{ rbd_pool }}
|
||||
rbd_user = {{ rbd_user }}
|
||||
rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'ovs' -%}
|
||||
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
|
||||
libvirt_user_virtio_for_bridges = True
|
||||
{% if neutron_security_groups -%}
|
||||
security_group_api = {{ network_manager }}
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% endif -%}
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'nvp' -%}
|
||||
security_group_api = neutron
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% if external_network -%}
|
||||
default_floating_pool = {{ external_network }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager_config -%}
|
||||
{% for key, value in network_manager_config.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager and network_manager == 'quantum' -%}
|
||||
network_api_class = nova.network.quantumv2.api.API
|
||||
quantum_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
quantum_auth_strategy = keystone
|
||||
quantum_admin_tenant_name = {{ admin_tenant_name }}
|
||||
quantum_admin_username = {{ admin_user }}
|
||||
quantum_admin_password = {{ admin_password }}
|
||||
quantum_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% elif network_manager and network_manager == 'neutron' -%}
|
||||
network_api_class = nova.network.neutronv2.api.API
|
||||
neutron_url = {{ neutron_url }}
|
||||
{% if auth_host -%}
|
||||
neutron_auth_strategy = keystone
|
||||
neutron_admin_tenant_name = {{ admin_tenant_name }}
|
||||
neutron_admin_username = {{ admin_user }}
|
||||
neutron_admin_password = {{ admin_password }}
|
||||
neutron_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
{% else -%}
|
||||
network_manager = nova.network.manager.FlatDHCPManager
|
||||
{% endif -%}
|
||||
|
||||
{% if default_floating_pool -%}
|
||||
default_floating_pool = {{ default_floating_pool }}
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_service -%}
|
||||
volume_api_class=nova.volume.cinder.API
|
||||
{% endif -%}
|
||||
|
||||
{% if user_config_flags -%}
|
||||
{% for key, value in user_config_flags.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if listen_ports -%}
|
||||
{% for key, value in listen_ports.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if sections and 'DEFAULT' in sections -%}
|
||||
{% for key, value in sections['DEFAULT'] -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
[osapi_v3]
|
||||
enabled=True
|
||||
|
|
@ -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 -%}
|
|
@ -22,8 +22,6 @@ from test_utils import CharmTestCase
|
|||
from charmhelpers.contrib.openstack import neutron
|
||||
|
||||
TO_PATCH = [
|
||||
'apt_install',
|
||||
'filter_installed_packages',
|
||||
'relation_ids',
|
||||
'relation_get',
|
||||
'related_units',
|
||||
|
|
|
@ -60,7 +60,6 @@ TO_PATCH = [
|
|||
'services',
|
||||
'execd_preinstall',
|
||||
'network_manager',
|
||||
'volume_service',
|
||||
'unit_get',
|
||||
'uuid',
|
||||
'is_elected_leader',
|
||||
|
@ -295,7 +294,6 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
self.network_manager.return_value = 'neutron'
|
||||
self.is_elected_leader = True
|
||||
self.keystone_ca_cert_b64.return_value = 'foocert64'
|
||||
self.volume_service.return_value = 'cinder'
|
||||
self.unit_get.return_value = 'nova-cc-host1'
|
||||
_canonical_url.return_value = 'http://nova-cc-host1'
|
||||
self.api_port.return_value = '9696'
|
||||
|
@ -334,7 +332,6 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
self.network_manager.return_value = 'neutron'
|
||||
self.is_elected_leader = True
|
||||
self.keystone_ca_cert_b64.return_value = 'foocert64'
|
||||
self.volume_service.return_value = 'cinder'
|
||||
self.unit_get.return_value = 'nova-cc-host1'
|
||||
_canonical_url.return_value = 'http://nova-cc-host1'
|
||||
self.api_port.return_value = '9696'
|
||||
|
|
|
@ -26,7 +26,6 @@ TO_PATCH = [
|
|||
'get_os_codename_install_source',
|
||||
'is_relation_made',
|
||||
'log',
|
||||
'ml2_migration',
|
||||
'network_manager',
|
||||
'neutron_db_manage',
|
||||
'neutron_plugin',
|
||||
|
@ -69,9 +68,9 @@ BASE_ENDPOINTS = {
|
|||
'ec2_public_url': 'http://foohost.com:8773/services/Cloud',
|
||||
'ec2_region': 'RegionOne',
|
||||
'ec2_service': 'ec2',
|
||||
'nova_admin_url': 'http://foohost.com:8774/v1.1/$(tenant_id)s',
|
||||
'nova_internal_url': 'http://foohost.com:8774/v1.1/$(tenant_id)s',
|
||||
'nova_public_url': 'http://foohost.com:8774/v1.1/$(tenant_id)s',
|
||||
'nova_admin_url': 'http://foohost.com:8774/v2/$(tenant_id)s',
|
||||
'nova_internal_url': 'http://foohost.com:8774/v2/$(tenant_id)s',
|
||||
'nova_public_url': 'http://foohost.com:8774/v2/$(tenant_id)s',
|
||||
'nova_region': 'RegionOne',
|
||||
'nova_service': 'nova',
|
||||
's3_admin_url': 'http://foohost.com:3333',
|
||||
|
@ -86,7 +85,7 @@ BASE_ENDPOINTS = {
|
|||
RESTART_MAP = OrderedDict([
|
||||
('/etc/nova/nova.conf', [
|
||||
'nova-api-ec2', 'nova-api-os-compute', 'nova-objectstore',
|
||||
'nova-cert', 'nova-scheduler', 'nova-api-os-volume', 'nova-conductor'
|
||||
'nova-cert', 'nova-scheduler', 'nova-conductor'
|
||||
]),
|
||||
('/etc/nova/api-paste.ini', [
|
||||
'nova-api-ec2', 'nova-api-os-compute'
|
||||
|
@ -95,23 +94,19 @@ RESTART_MAP = OrderedDict([
|
|||
('/etc/default/neutron-server', ['neutron-server']),
|
||||
('/etc/haproxy/haproxy.cfg', ['haproxy']),
|
||||
('/etc/apache2/sites-available/openstack_https_frontend', ['apache2']),
|
||||
('/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini',
|
||||
['quantum-server'])
|
||||
('/etc/neutron/plugins/ml2/ml2_conf.ini', ['neutron-server']),
|
||||
])
|
||||
|
||||
|
||||
PLUGIN_ATTRIBUTES = {
|
||||
'ovs': {
|
||||
'config': '/etc/quantum/plugins/openvswitch/'
|
||||
'ovs_quantum_plugin.ini',
|
||||
'driver': 'quantum.plugins.openvswitch.ovs_quantum_plugin.'
|
||||
'OVSQuantumPluginV2',
|
||||
'config': '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
'driver': 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
'contexts': ['FakeDBContext'],
|
||||
'services': ['quantum-plugin-openvswitch-agent'],
|
||||
'packages': ['quantum-plugin-openvswitch-agent',
|
||||
'openvswitch-datapath-dkms'],
|
||||
'server_packages': ['quantum-server', 'quantum-plugin-openvswitch'],
|
||||
'server_services': ['quantum-server'],
|
||||
'services': ['neutron-plugin-openvswitch-agent'],
|
||||
'packages': ['neutron-plugin-openvswitch-agent'],
|
||||
'server_packages': ['neutron-server', 'neutron-plugin-ml2'],
|
||||
'server_services': ['neutron-server'],
|
||||
},
|
||||
'nvp': {
|
||||
'config': '/etc/quantum/plugins/nicira/nvp.ini',
|
||||
|
@ -153,32 +148,19 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
def setUp(self):
|
||||
super(NovaCCUtilsTests, self).setUp(utils, TO_PATCH)
|
||||
self.config.side_effect = self.test_config.get
|
||||
self.maxDiff = None
|
||||
|
||||
def _resource_map(self, network_manager=None, volume_manager=None):
|
||||
def _resource_map(self, network_manager=None):
|
||||
if network_manager:
|
||||
self.network_manager.return_value = network_manager
|
||||
self.test_config.set('network-manager', network_manager.title())
|
||||
self.neutron_plugin.return_value = 'ovs'
|
||||
self.neutron_plugin_attribute.side_effect = fake_plugin_attribute
|
||||
if volume_manager == 'nova-volume':
|
||||
self.relation_ids.return_value = 'nova-volume-service:0'
|
||||
with patch('charmhelpers.contrib.openstack.context.'
|
||||
'SubordinateConfigContext'):
|
||||
_map = utils.resource_map()
|
||||
return _map
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
def test_resource_map_quantum(self, subcontext):
|
||||
self.is_relation_made.return_value = False
|
||||
self._resource_map(network_manager='quantum')
|
||||
_map = utils.resource_map()
|
||||
confs = [
|
||||
'/etc/quantum/quantum.conf',
|
||||
'/etc/quantum/api-paste.ini',
|
||||
'/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini',
|
||||
]
|
||||
[self.assertIn(q_conf, _map.keys()) for q_conf in confs]
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
def test_resource_map_neutron(self, subcontext):
|
||||
self.is_relation_made.return_value = False
|
||||
|
@ -222,13 +204,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
for svc in services:
|
||||
self.assertNotIn('agent', svc)
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
def test_resource_map_nova_volume(self, subcontext):
|
||||
self.relation_ids.return_value = ['nova-volume-service:0']
|
||||
_map = utils.resource_map()
|
||||
self.assertIn('nova-api-os-volume',
|
||||
_map['/etc/nova/nova.conf']['services'])
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
def test_resource_map_console_xvpvnc(self, subcontext):
|
||||
self.test_config.set('console-access-protocol', 'xvpvnc')
|
||||
|
@ -271,10 +246,13 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
for service in console_services:
|
||||
self.assertIn(service, _map['/etc/nova/nova.conf']['services'])
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.neutron.os_release')
|
||||
@patch('os.path.exists')
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
def test_restart_map_api_before_frontends(self, subcontext, _exists):
|
||||
def test_restart_map_api_before_frontends(self, subcontext, _exists,
|
||||
_os_release):
|
||||
self.is_relation_made.return_value = False
|
||||
_os_release.return_value = 'icehouse'
|
||||
_exists.return_value = False
|
||||
self._resource_map(network_manager='neutron')
|
||||
_map = utils.restart_map()
|
||||
|
@ -335,14 +313,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
rid='shared-db:12',
|
||||
unit='mysql/0')
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
@patch.object(utils, 'git_install_requested')
|
||||
def test_determine_packages_quantum(self, git_requested, subcontext):
|
||||
git_requested.return_value = False
|
||||
self._resource_map(network_manager='quantum')
|
||||
pkgs = utils.determine_packages()
|
||||
self.assertIn('quantum-server', pkgs)
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
@patch.object(utils, 'git_install_requested')
|
||||
def test_determine_packages_neutron(self, git_requested, subcontext):
|
||||
|
@ -352,14 +322,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
pkgs = utils.determine_packages()
|
||||
self.assertIn('neutron-server', pkgs)
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
@patch.object(utils, 'git_install_requested')
|
||||
def test_determine_packages_nova_volume(self, git_requested, subcontext):
|
||||
git_requested.return_value = False
|
||||
self.relation_ids.return_value = ['nova-volume-service:0']
|
||||
pkgs = utils.determine_packages()
|
||||
self.assertIn('nova-api-os-volume', pkgs)
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
@patch.object(utils, 'git_install_requested')
|
||||
def test_determine_packages_console(self, git_requested, subcontext):
|
||||
|
@ -376,29 +338,17 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
def test_determine_packages_base(self, git_requested, subcontext):
|
||||
git_requested.return_value = False
|
||||
self.relation_ids.return_value = []
|
||||
self.os_release.return_value = 'folsom'
|
||||
self.os_release.return_value = 'icehouse'
|
||||
pkgs = utils.determine_packages()
|
||||
ex = list(set(utils.BASE_PACKAGES + utils.BASE_SERVICES))
|
||||
self.assertEquals(ex, pkgs)
|
||||
|
||||
@patch('charmhelpers.contrib.openstack.context.SubordinateConfigContext')
|
||||
@patch.object(utils, 'git_install_requested')
|
||||
def test_determine_packages_base_grizzly_beyond(self, git_requested,
|
||||
subcontext):
|
||||
git_requested.return_value = False
|
||||
self.relation_ids.return_value = []
|
||||
self.os_release.return_value = 'grizzly'
|
||||
pkgs = utils.determine_packages()
|
||||
ex = list(set(utils.BASE_PACKAGES + utils.BASE_SERVICES))
|
||||
ex.append('nova-conductor')
|
||||
self.assertEquals(sorted(ex), sorted(pkgs))
|
||||
|
||||
@patch.object(utils, 'restart_map')
|
||||
def test_determine_ports(self, restart_map):
|
||||
restart_map.return_value = {
|
||||
'/etc/nova/nova.conf': ['nova-api-os-compute', 'nova-api-ec2'],
|
||||
'/etc/nova/api-paste.ini': ['nova-api-os-compute', 'nova-api-ec2'],
|
||||
'/etc/quantum/quantum.conf': ['quantum-server'],
|
||||
'/etc/neutron/neutron.conf': ['neutron-server'],
|
||||
}
|
||||
ports = utils.determine_ports()
|
||||
ex = [8773, 8774, 9696]
|
||||
|
@ -409,38 +359,14 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
utils.save_script_rc()
|
||||
self._save_script_rc.called_with(**SCRIPTRC_ENV_VARS)
|
||||
|
||||
def test_save_script_quantum(self):
|
||||
def test_save_script_neutron(self):
|
||||
self.relation_ids.return_value = []
|
||||
self.test_config.set('network-manager', 'Quantum')
|
||||
self.test_config.set('network-manager', 'Neutron')
|
||||
utils.save_script_rc()
|
||||
_ex = deepcopy(SCRIPTRC_ENV_VARS)
|
||||
_ex['OPENSTACK_SERVICE_API_QUANTUM'] = 'quantum-server'
|
||||
_ex['OPENSTACK_SERVICE_API_NEUTRON'] = 'neutron-server'
|
||||
self._save_script_rc.called_with(**_ex)
|
||||
|
||||
def test_save_script_nova_volume(self):
|
||||
self.relation_ids.return_value = ['nvol:0']
|
||||
utils.save_script_rc()
|
||||
_ex = deepcopy(SCRIPTRC_ENV_VARS)
|
||||
_ex['OPENSTACK_SERVICE_API_OS_VOL'] = 'nova-api-os-volume'
|
||||
self._save_script_rc.called_with(**_ex)
|
||||
|
||||
def test_determine_volume_service_essex(self):
|
||||
self.os_release.return_value = 'essex'
|
||||
self.assertEquals('nova-volume', utils.volume_service())
|
||||
|
||||
def test_determine_volume_service_folsom_cinder(self):
|
||||
self.os_release.return_value = 'folsom'
|
||||
self.relation_ids.return_value = ['cinder:0']
|
||||
self.assertEquals('cinder', utils.volume_service())
|
||||
|
||||
def test_determine_volume_service_folsom_nova_vol(self):
|
||||
self.os_release.return_value = 'folsom'
|
||||
self.relation_ids.return_value = []
|
||||
self.assertEquals('nova-volume', utils.volume_service())
|
||||
|
||||
def test_determine_volume_service_grizzly_and_beyond(self):
|
||||
pass
|
||||
|
||||
@patch.object(utils, 'remove_known_host')
|
||||
@patch.object(utils, 'ssh_known_host_key')
|
||||
@patch('subprocess.check_output')
|
||||
|
@ -556,10 +482,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
utils.ssh_compute_remove(removed_key)
|
||||
_file.write.assert_called_with(keys_removed)
|
||||
|
||||
def test_network_manager_untranslated(self):
|
||||
self.test_config.set('network-manager', 'foo')
|
||||
self.os_release.return_value = 'folsom'
|
||||
|
||||
def test_determine_endpoints_base(self):
|
||||
self.is_relation_made.return_value = False
|
||||
self.relation_ids.return_value = []
|
||||
|
@ -568,28 +490,10 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
'http://foohost.com',
|
||||
'http://foohost.com'))
|
||||
|
||||
def test_determine_endpoints_nova_volume(self):
|
||||
self.is_relation_made.return_value = False
|
||||
self.relation_ids.side_effect = [['nova-volume-service/0'], []]
|
||||
endpoints = deepcopy(BASE_ENDPOINTS)
|
||||
endpoints.update({
|
||||
'nova-volume_admin_url':
|
||||
'http://foohost.com:8774/v1/$(tenant_id)s',
|
||||
'nova-volume_internal_url':
|
||||
'http://foohost.com:8774/v1/$(tenant_id)s',
|
||||
'nova-volume_public_url':
|
||||
'http://foohost.com:8774/v1/$(tenant_id)s',
|
||||
'nova-volume_region': 'RegionOne',
|
||||
'nova-volume_service': 'nova-volume'})
|
||||
self.assertEquals(
|
||||
endpoints, utils.determine_endpoints('http://foohost.com',
|
||||
'http://foohost.com',
|
||||
'http://foohost.com'))
|
||||
|
||||
def test_determine_endpoints_quantum_neutron(self):
|
||||
self.is_relation_made.return_value = False
|
||||
self.relation_ids.return_value = []
|
||||
self.network_manager.return_value = 'quantum'
|
||||
self.network_manager.return_value = 'neutron'
|
||||
endpoints = deepcopy(BASE_ENDPOINTS)
|
||||
endpoints.update({
|
||||
'quantum_admin_url': 'http://foohost.com:9696',
|
||||
|
@ -604,8 +508,8 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
|
||||
def test_determine_endpoints_neutron_api_rel(self):
|
||||
self.is_relation_made.return_value = True
|
||||
self.relation_ids.side_effect = [[], ['neutron-api:1']]
|
||||
self.network_manager.return_value = 'quantum'
|
||||
self.relation_ids.side_effect = [['neutron-api:1']]
|
||||
self.network_manager.return_value = 'neutron'
|
||||
endpoints = deepcopy(BASE_ENDPOINTS)
|
||||
endpoints.update({
|
||||
'quantum_admin_url': None,
|
||||
|
@ -685,57 +589,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
self.assertTrue(self.enable_services.called)
|
||||
self.cmd_all_services.assert_called_with('start')
|
||||
|
||||
@patch.object(utils, 'get_step_upgrade_source')
|
||||
@patch.object(utils, 'migrate_nova_database')
|
||||
@patch.object(utils, 'determine_packages')
|
||||
def test_upgrade_grizzly_icehouse(self, determine_packages,
|
||||
migrate_nova_database,
|
||||
get_step_upgrade_source):
|
||||
"Simulate a call to do_openstack_upgrade() for grizzly->icehouse"
|
||||
self.test_config.set('openstack-origin', 'cloud:precise-icehouse')
|
||||
get_step_upgrade_source.return_value = 'cloud:precise-havana'
|
||||
self.os_release.side_effect = ['grizzly', 'havana']
|
||||
self.get_os_codename_install_source.side_effect = [
|
||||
'havana',
|
||||
'icehouse']
|
||||
self.is_elected_leader.return_value = True
|
||||
self.relation_ids.return_value = []
|
||||
utils.do_openstack_upgrade(self.register_configs())
|
||||
expected = [call(['stamp', 'grizzly']), call(['upgrade', 'head']),
|
||||
call(['stamp', 'havana']), call(['upgrade', 'head'])]
|
||||
self.assertEquals(self.neutron_db_manage.call_args_list, expected)
|
||||
self.apt_update.assert_called_with(fatal=True)
|
||||
self.apt_upgrade.assert_called_with(options=DPKG_OPTS, fatal=True,
|
||||
dist=True)
|
||||
self.apt_install.assert_called_with(determine_packages(), fatal=True)
|
||||
expected = [call(), call(release='havana'), call(release='icehouse')]
|
||||
self.assertEquals(self.register_configs.call_args_list, expected)
|
||||
self.assertEquals(self.ml2_migration.call_count, 1)
|
||||
self.assertTrue(migrate_nova_database.call_count, 2)
|
||||
|
||||
@patch.object(utils, 'get_step_upgrade_source')
|
||||
@patch.object(utils, 'migrate_nova_database')
|
||||
@patch.object(utils, 'determine_packages')
|
||||
def test_upgrade_havana_icehouse(self, determine_packages,
|
||||
migrate_nova_database,
|
||||
get_step_upgrade_source):
|
||||
"Simulate a call to do_openstack_upgrade() for havana->icehouse"
|
||||
self.test_config.set('openstack-origin', 'cloud:precise-icehouse')
|
||||
get_step_upgrade_source.return_value = None
|
||||
self.os_release.return_value = 'havana'
|
||||
self.get_os_codename_install_source.return_value = 'icehouse'
|
||||
self.is_elected_leader.return_value = True
|
||||
self.relation_ids.return_value = []
|
||||
utils.do_openstack_upgrade(self.register_configs())
|
||||
self.neutron_db_manage.assert_called_with(['upgrade', 'head'])
|
||||
self.apt_update.assert_called_with(fatal=True)
|
||||
self.apt_upgrade.assert_called_with(options=DPKG_OPTS, fatal=True,
|
||||
dist=True)
|
||||
self.apt_install.assert_called_with(determine_packages(), fatal=True)
|
||||
self.register_configs.assert_called_with(release='icehouse')
|
||||
self.assertEquals(self.ml2_migration.call_count, 1)
|
||||
self.assertTrue(migrate_nova_database.call_count, 1)
|
||||
|
||||
@patch.object(utils, 'get_step_upgrade_source')
|
||||
@patch.object(utils, 'migrate_nova_database')
|
||||
@patch.object(utils, 'determine_packages')
|
||||
|
@ -759,7 +612,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
dist=True)
|
||||
self.apt_install.assert_called_with(determine_packages(), fatal=True)
|
||||
self.register_configs.assert_called_with(release='juno')
|
||||
self.assertEquals(self.ml2_migration.call_count, 0)
|
||||
self.assertTrue(migrate_nova_database.call_count, 1)
|
||||
|
||||
@patch.object(utils, 'get_step_upgrade_source')
|
||||
|
@ -782,7 +634,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
dist=True)
|
||||
self.apt_install.assert_called_with(determine_packages(), fatal=True)
|
||||
self.register_configs.assert_called_with(release='kilo')
|
||||
self.assertEquals(self.ml2_migration.call_count, 0)
|
||||
self.assertTrue(migrate_nova_database.call_count, 1)
|
||||
|
||||
@patch.object(utils, 'database_setup')
|
||||
|
@ -808,39 +659,12 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
dist=True)
|
||||
self.apt_install.assert_called_with(determine_packages(), fatal=True)
|
||||
self.register_configs.assert_called_with(release='mitaka')
|
||||
self.assertEquals(self.ml2_migration.call_count, 0)
|
||||
self.assertFalse(migrate_nova_database.called)
|
||||
database_setup.assert_called_with(prefix='novaapi')
|
||||
|
||||
@patch.object(utils, '_do_openstack_upgrade')
|
||||
def test_upgrade_grizzly_icehouse_source(self, _do_openstack_upgrade):
|
||||
"Verify get_step_upgrade_source() for grizzly->icehouse"
|
||||
self.config.side_effect = None
|
||||
self.config.return_value = 'cloud:precise-icehouse'
|
||||
with patch_open() as (_open, _file):
|
||||
_file.read = MagicMock()
|
||||
_file.readline.return_value = ("deb url"
|
||||
" precise-updates/grizzly main")
|
||||
utils.do_openstack_upgrade(self.register_configs())
|
||||
expected = [call('cloud:precise-havana'),
|
||||
call('cloud:precise-icehouse')]
|
||||
self.assertEquals(_do_openstack_upgrade.call_args_list, expected)
|
||||
|
||||
@patch.object(utils, '_do_openstack_upgrade')
|
||||
def test_upgrade_havana_icehouse_source(self, _do_openstack_upgrade):
|
||||
"Verify get_step_upgrade_source() for havana->icehouse"
|
||||
self.config.side_effect = None
|
||||
self.config.return_value = 'cloud:precise-icehouse'
|
||||
with patch_open() as (_open, _file):
|
||||
_file.read = MagicMock()
|
||||
_file.readline.return_value = "deb url precise-updates/havana main"
|
||||
utils.do_openstack_upgrade(self.register_configs())
|
||||
expected = [call('cloud:precise-icehouse')]
|
||||
self.assertEquals(_do_openstack_upgrade.call_args_list, expected)
|
||||
|
||||
def test_guard_map_nova(self):
|
||||
self.relation_ids.return_value = []
|
||||
self.os_release.return_value = 'havana'
|
||||
self.os_release.return_value = 'icehouse'
|
||||
self.assertEqual(
|
||||
{'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-api-os-compute': ['identity-service', 'amqp', 'shared-db'],
|
||||
|
@ -850,15 +674,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
'nova-scheduler': ['identity-service', 'amqp', 'shared-db']},
|
||||
utils.guard_map()
|
||||
)
|
||||
self.os_release.return_value = 'essex'
|
||||
self.assertEqual(
|
||||
{'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-api-os-compute': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-cert': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-objectstore': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-scheduler': ['identity-service', 'amqp', 'shared-db']},
|
||||
utils.guard_map()
|
||||
)
|
||||
|
||||
def test_guard_map_neutron(self):
|
||||
self.relation_ids.return_value = []
|
||||
|
@ -876,19 +691,6 @@ class NovaCCUtilsTests(CharmTestCase):
|
|||
'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
|
||||
utils.guard_map()
|
||||
)
|
||||
self.network_manager.return_value = 'quantum'
|
||||
self.os_release.return_value = 'grizzly'
|
||||
self.get_os_codename_install_source.return_value = 'grizzly'
|
||||
self.assertEqual(
|
||||
{'quantum-server': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-api-os-compute': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-cert': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-conductor': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-objectstore': ['identity-service', 'amqp', 'shared-db'],
|
||||
'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
|
||||
utils.guard_map()
|
||||
)
|
||||
self.network_manager.return_value = 'neutron'
|
||||
self.os_release.return_value = 'mitaka'
|
||||
self.get_os_codename_install_source.return_value = 'mitaka'
|
||||
|
|
Loading…
Reference in New Issue