Merge "Enable Keystone v3 Support in template"
This commit is contained in:
commit
0d4e1bfa43
@ -1,20 +1,12 @@
|
||||
{% if auth_host -%}
|
||||
{% if api_version == '3' -%}
|
||||
[keystone_authtoken]
|
||||
auth_url = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
|
||||
auth_plugin = password
|
||||
project_domain_id = default
|
||||
user_domain_id = default
|
||||
project_name = {{ admin_tenant_name }}
|
||||
username = {{ admin_user }}
|
||||
password = {{ admin_password }}
|
||||
project_domain_name = default
|
||||
user_domain_name = default
|
||||
auth_plugin = password
|
||||
{% else -%}
|
||||
[keystone_authtoken]
|
||||
identity_uri = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/{{ auth_admin_prefix }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/{{ service_admin_prefix }}
|
||||
admin_tenant_name = {{ admin_tenant_name }}
|
||||
admin_user = {{ admin_user }}
|
||||
admin_password = {{ admin_password }}
|
||||
signing_dir = {{ signing_dir }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
@ -0,0 +1,10 @@
|
||||
{% if auth_host -%}
|
||||
[keystone_authtoken]
|
||||
# Juno specific config (Bug #1557223)
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/{{ service_admin_prefix }}
|
||||
identity_uri = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
|
||||
admin_tenant_name = {{ admin_tenant_name }}
|
||||
admin_user = {{ admin_user }}
|
||||
admin_password = {{ admin_password }}
|
||||
signing_dir = {{ signing_dir }}
|
||||
{% endif -%}
|
@ -100,7 +100,7 @@ quota_floatingip = {{ quota_floatingip }}
|
||||
[agent]
|
||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
|
||||
{% include "section-keystone-authtoken" %}
|
||||
{% include "section-keystone-authtoken-legacy" %}
|
||||
|
||||
{% include "parts/section-database" %}
|
||||
|
||||
|
@ -60,15 +60,9 @@ dhcp_agents_per_network = {{ dhcp_agents_per_network }}
|
||||
|
||||
notify_nova_on_port_status_changes = True
|
||||
notify_nova_on_port_data_changes = True
|
||||
nova_url = {{ nova_url }}
|
||||
nova_region_name = {{ region }}
|
||||
{% if auth_host -%}
|
||||
nova_admin_username = {{ admin_user }}
|
||||
nova_admin_tenant_id = {{ admin_tenant_id }}
|
||||
nova_admin_password = {{ admin_password }}
|
||||
nova_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
{% endif -%}
|
||||
|
||||
[nova]
|
||||
auth_section = keystone_authtoken
|
||||
|
||||
{% if sections and 'DEFAULT' in sections -%}
|
||||
{% for key, value in sections['DEFAULT'] -%}
|
||||
|
@ -65,14 +65,7 @@ notify_nova_on_port_data_changes = True
|
||||
{% include "section-zeromq" %}
|
||||
|
||||
[nova]
|
||||
auth_plugin = password
|
||||
region_name = {{ region }}
|
||||
{% if auth_host -%}
|
||||
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
|
||||
username = {{ admin_user }}
|
||||
password = {{ admin_password }}
|
||||
project_name = {{ admin_tenant_name }}
|
||||
{% endif %}
|
||||
auth_section = keystone_authtoken
|
||||
|
||||
[quotas]
|
||||
{% if quota_driver -%}
|
||||
|
@ -449,18 +449,33 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
|
||||
},
|
||||
}
|
||||
|
||||
if self._get_openstack_release() >= self.trusty_mitaka:
|
||||
# Mitaka or later - nova bits
|
||||
if self._get_openstack_release() >= self.trusty_liberty:
|
||||
expected['nova'] = {
|
||||
'auth_section': 'keystone_authtoken',
|
||||
}
|
||||
auth_uri = '{}://{}:{}'.format(
|
||||
rel_napi_ks['service_protocol'],
|
||||
rel_napi_ks['service_host'],
|
||||
rel_napi_ks['service_port']
|
||||
)
|
||||
auth_url = '{}://{}:{}'.format(
|
||||
rel_napi_ks['auth_protocol'],
|
||||
rel_napi_ks['auth_host'],
|
||||
rel_napi_ks['auth_port']
|
||||
)
|
||||
expected['keystone_authtoken'] = {
|
||||
'auth_uri': auth_uri,
|
||||
'auth_url': auth_url,
|
||||
'auth_plugin': 'password',
|
||||
'auth_url': nova_auth_url,
|
||||
'region_name': 'RegionOne',
|
||||
'username': rel_napi_ks['service_username'],
|
||||
'password': rel_napi_ks['service_password'],
|
||||
'project_domain_id': 'default',
|
||||
'user_domain_id': 'default',
|
||||
'project_name': rel_napi_ks['service_tenant'],
|
||||
'username': 'neutron',
|
||||
'password': rel_napi_ks['service_password'],
|
||||
'signing_dir': '/var/cache/neutron',
|
||||
}
|
||||
else:
|
||||
# Liberty or earlier - nova bits
|
||||
# Kilo or earlier
|
||||
expected['DEFAULT'].update({
|
||||
'nova_url': cc_relation['nova_url'],
|
||||
'nova_region_name': 'RegionOne',
|
||||
|
@ -782,15 +782,20 @@ class AmuletUtils(object):
|
||||
|
||||
# amulet juju action helpers:
|
||||
def run_action(self, unit_sentry, action,
|
||||
_check_output=subprocess.check_output):
|
||||
_check_output=subprocess.check_output,
|
||||
params=None):
|
||||
"""Run the named action on a given unit sentry.
|
||||
|
||||
params a dict of parameters to use
|
||||
_check_output parameter is used for dependency injection.
|
||||
|
||||
@return action_id.
|
||||
"""
|
||||
unit_id = unit_sentry.info["unit_name"]
|
||||
command = ["juju", "action", "do", "--format=json", unit_id, action]
|
||||
if params is not None:
|
||||
for key, value in params.iteritems():
|
||||
command.append("{}={}".format(key, value))
|
||||
self.log.info("Running command: %s\n" % " ".join(command))
|
||||
output = _check_output(command, universal_newlines=True)
|
||||
data = json.loads(output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user