Merge lp:~hopem/charms/trusty/keystone/service-admin-prefix-option into lp:~openstack-charmers-archive/charms/trusty/keystone/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 89
Proposed branch: lp:~hopem/charms/trusty/keystone/service-admin-prefix-option
Merge into: lp:~openstack-charmers-archive/charms/trusty/keystone/next
Diff against target: 48 lines (+20/-0)
2 files modified
config.yaml (+8/-0)
hooks/keystone_utils.py (+12/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/keystone/service-admin-prefix-option
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+243528@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_lint_check #1317 keystone-next for hopem mp243528
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option os-public-network has no default value
  I: config.yaml: option os-admin-network has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option os-internal-network has no default value

Full lint test output: http://paste.ubuntu.com/9355733/
Build: http://10.98.191.181:8080/job/charm_lint_check/1317/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_unit_test #1151 keystone-next for hopem mp243528
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/keystone_ssl 158 132 16% 106-128, 132-146, 150-158, 162-172, 176-177, 182-193, 197-206, 210-221, 225-237, 243-256, 259-266, 269-279, 282-296, 299-302
  hooks/keystone_utils 393 204 48% 204, 218, 242-247, 290-299, 306-321, 328-336, 341-351, 358-384, 389-398, 403-417, 422-444, 449-466, 480-503, 512-517, 522, 529-539, 544-552, 557-562, 566-573, 581-586, 597-612, 616-624, 649-650, 681, 738, 741, 744, 793-806, 830-834, 838-850
  TOTAL 803 392 51%
  Ran 38 tests in 3.123s
  OK

Full unit test output: http://paste.ubuntu.com/9355735/
Build: http://10.98.191.181:8080/job/charm_unit_test/1151/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_amulet_test #583 keystone-next for hopem mp243528
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor.15-basic-trusty-icehouse RESULT :
  juju-test.conductor DEBUG : Tearing down osci-sv05 juju environment
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv05"
  WARNING cannot delete security group "juju-osci-sv05-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

Full amulet test output: http://paste.ubuntu.com/9355842/
Build: http://10.98.191.181:8080/job/charm_amulet_test/583/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_lint_check #99 keystone-next for hopem mp243528
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option os-public-network has no default value
  I: config.yaml: option os-admin-network has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option os-internal-network has no default value

Full lint test output: pastebin not avail., cmd error
Build: http://10.230.18.80:8080/job/charm_lint_check/99/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_unit_test #99 keystone-next for hopem mp243528
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/keystone_ssl 158 132 16% 106-128, 132-146, 150-158, 162-172, 176-177, 182-193, 197-206, 210-221, 225-237, 243-256, 259-266, 269-279, 282-296, 299-302
  hooks/keystone_utils 393 204 48% 204, 218, 242-247, 290-299, 306-321, 328-336, 341-351, 358-384, 389-398, 403-417, 422-444, 449-466, 480-503, 512-517, 522, 529-539, 544-552, 557-562, 566-573, 581-586, 597-612, 616-624, 649-650, 681, 738, 741, 744, 793-806, 830-834, 838-850
  TOTAL 803 392 51%
  Ran 38 tests in 3.518s
  OK

Full unit test output: pastebin not avail., cmd error
Build: http://10.230.18.80:8080/job/charm_unit_test/99/

Revision history for this message
James Page (james-page) :
review: Needs Fixing
91. By Edward Hope-Morley

fix default value

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-10-07 12:29:11 +0000
3+++ config.yaml 2014-12-12 10:41:26 +0000
4@@ -70,6 +70,14 @@
5 default: "services"
6 type: string
7 description: "Name of tenant to associate service credentials."
8+ service-admin-prefix:
9+ type: string
10+ default:
11+ description: |
12+ When service relations are joined they provide a name used to create a
13+ service admin_username in keystone. The name used may be too crude for
14+ some situations e.g. pre-populated LDAP identity backend. If set, this
15+ option will be prepended to each service admin_username.
16 # Database settings used to request access via shared-db-relation-* relations
17 database:
18 default: "keystone"
19
20=== modified file 'hooks/keystone_utils.py'
21--- hooks/keystone_utils.py 2014-10-07 12:29:11 +0000
22+++ hooks/keystone_utils.py 2014-12-12 10:41:26 +0000
23@@ -672,7 +672,14 @@
24 publicurl=settings['public_url'],
25 adminurl=settings['admin_url'],
26 internalurl=settings['internal_url'])
27+
28+ # If an admin username prefix is provided, ensure all services use
29+ # it.
30 service_username = settings['service']
31+ prefix = config('service-admin-prefix')
32+ if prefix:
33+ service_username = "%s%s" % (prefix, service_username)
34+
35 # NOTE(jamespage) internal IP for backwards compat for SSL certs
36 internal_cn = urlparse.urlparse(settings['internal_url']).hostname
37 https_cns.append(internal_cn)
38@@ -725,6 +732,11 @@
39 https_cns.append(urlparse.urlparse(ep['admin_url']).hostname)
40 service_username = '_'.join(services)
41
42+ # If an admin username prefix is provided, ensure all services use it.
43+ prefix = config('service-admin-prefix')
44+ if prefix:
45+ service_username = "%s%s" % (prefix, service_username)
46+
47 if 'None' in [v for k, v in settings.iteritems()]:
48 return
49

Subscribers

People subscribed via source and target branches