Merge lp:~johnsca/charms/trusty/cf-cloud-controller/hm9k into lp:~cf-charmers/charms/trusty/cf-cloud-controller/trunk
Proposed by
Cory Johns
Status: | Merged |
---|---|
Merged at revision: | 32 |
Proposed branch: | lp:~johnsca/charms/trusty/cf-cloud-controller/hm9k |
Merge into: | lp:~cf-charmers/charms/trusty/cf-cloud-controller/trunk |
Diff against target: |
76 lines (+25/-5) 4 files modified
hooks/cc-relation-changed (+11/-0) hooks/config.py (+11/-1) metadata.yaml (+1/-2) templates/cloud_controller.yml (+2/-2) |
To merge this branch: | bzr merge lp:~johnsca/charms/trusty/cf-cloud-controller/hm9k |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cloud Foundry Charmers | Pending | ||
Review via email: mp+221771@code.launchpad.net |
Description of the change
Changes to the provided interface for HM9000
To post a comment you must log in.
Reviewers: mp+221771_ code.launchpad. net,
Message:
Please take a look.
Description:
Changes to the provided interface for HM9000
https:/ /code.launchpad .net/~johnsca/ charms/ trusty/ cf-cloud- controller/ hm9k/+merge/ 221771
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/105770043/
Affected files (+27, -5 lines): relation- changed cloud_controlle r.yml
A [revision details]
A hooks/cc-
M hooks/config.py
M metadata.yaml
M templates/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: metadata.yaml
=== modified file 'metadata.yaml'
--- metadata.yaml 2014-05-15 16:40:34 +0000
+++ metadata.yaml 2014-06-02 15:28:01 +0000
@@ -10,7 +10,7 @@
- misc
subordinate: false
provides:
- provides-relation:
+ cc:
interface: cf-cloud-controller
requires:
nats:
@@ -20,4 +20,3 @@
db:
interface: mysql
optional: true
-
Index: hooks/cc- relation- changed cc-relation- changed' relation- changed 1970-01-01 00:00:00 +0000 relation- changed 2014-06-02 15:28:01 +0000 relation_ set( config. API_CONTEXT[ 'api'][ 'hostname' ], API_CONTEXT[ 'api'][ 'port'] , API_CONTEXT[ 'api'][ 'user'] , config. API_CONTEXT[ 'api'][ 'password' ],
=== added file 'hooks/
--- hooks/cc-
+++ hooks/cc-
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+# vim: et ai ts=4 sw=4:
+from charmhelpers.core import hookenv
+import config
+
+hookenv.
+ hostname=
+ port=config.
+ user=config.
+ password=
+)
Index: hooks/config.py log("Finished db:migrate", hookenv.DEBUG)
=== modified file 'hooks/config.py'
--- hooks/config.py 2014-05-29 17:25:49 +0000
+++ hooks/config.py 2014-06-02 15:28:01 +0000
@@ -41,12 +41,22 @@
hookenv.
+API_CONTEXT = contexts. StoredContext( 'api_credential s.yml', { unit_get( 'private- address' ).encode( 'utf-8' ),
'service' : 'cf-cloudcontro ller',
'required_ data': [contexts. NatsRelation( ),
contexts. RouterRelation( ), MysqlRelation( )], MysqlRelation( ),
'data_ ready': [
services. template( source= 'cf-cloudcontro ller.conf' ,
target= '/etc/init/ cf-cloudcontrol ler.conf' ),
+ 'api': {
+ 'hostname': hookenv.
+ 'port': 9022,
+ 'user': host.pwgen(7),
+ 'password': host.pwgen(7),
+ }})
+
+
SERVICES = [
{
- contexts.
+ contexts.
+ API_CONTEXT],
Index: templates/ cloud_controlle r.yml cloud_controlle r.yml' cloud_controlle r.yml 2014-05-16 02:59:59 +0000 cloud_controlle r.yml 2014-06-02 16:06:35 +0000 admin_email: admin@my-org
=== modified file 'templates/
--- templates/
+++ templates/
@@ -21,8 +21,8 @@
bootstrap_
bulk_api: 'password' ]}}"
- auth_user: bulk_api
- auth_password: "Password"
+ auth_user: {{api['user']}}
+ auth_password: "{{api[
nginx:
use_nginx: false