charm-heat/actions/domain-setup
Alex Kavanagh 98de623820 Policyd override implementation
This patchset implements policy overrides for heat.  It uses the
code in charmhelpers.

It also fixes a bug in the actions/domain-setup where it assumes that
the python2 version of openstackclient should be installed, and corrects
this via code in hooks/install and hooks/upgrade-charm.

A sync of charm-helpers is included to bring the latest policyd changes
through to the charm.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/111

Change-Id: Ia607dc9120cfb03902efb019041b43cf12ade2d3
Closed-Bug: #1741723
2019-11-06 16:12:34 +00:00

23 lines
654 B
Bash
Executable File

#!/bin/bash
set -e
. /root/admin-openrc-v3
openstack domain show heat || {
openstack domain create --description "Stack projects and users" heat
}
openstack user show --domain heat heat_domain_admin || {
openstack user create --domain heat --password `leader-get heat-domain-admin-passwd` heat_domain_admin
}
openstack role add --domain heat --user-domain heat --user heat_domain_admin admin || {
# NOTE(jamespage): Fallback to trying older style --user-domain -less configuration
openstack role add --domain heat --user heat_domain_admin admin
}
openstack role show heat_stack_user || {
openstack role create heat_stack_user
}