Merge lp://staging/~chad.smith/charms/precise/storage/storage-nfs-python-provider into lp://staging/~dpb/charms/precise/storage/trunk
Status: | Merged |
---|---|
Merged at revision: | 30 |
Proposed branch: | lp://staging/~chad.smith/charms/precise/storage/storage-nfs-python-provider |
Merge into: | lp://staging/~dpb/charms/precise/storage/trunk |
Diff against target: |
2318 lines (+1932/-206) 27 files modified
.bzrignore (+2/-0) Makefile (+19/-0) charm-helpers.yaml (+5/-0) config.yaml (+8/-27) hooks/charmhelpers/cli/README.rst (+57/-0) hooks/charmhelpers/cli/__init__.py (+147/-0) hooks/charmhelpers/cli/commands.py (+2/-0) hooks/charmhelpers/cli/host.py (+15/-0) hooks/charmhelpers/core/hookenv.py (+395/-0) hooks/charmhelpers/core/host.py (+291/-0) hooks/common_util.py (+219/-0) hooks/hooks (+3/-15) hooks/install (+0/-2) hooks/storage-provider.d/nfs/config-changed (+12/-0) hooks/storage-provider.d/nfs/data-relation-changed (+12/-0) hooks/storage-provider.d/nfs/data-relation-departed (+5/-0) hooks/storage-provider.d/nfs/nfs-relation-changed (+23/-0) hooks/storage-provider.d/nfs/nfs-relation-departed (+7/-0) hooks/storage-provider.d/nova/common (+0/-120) hooks/storage-provider.d/nova/config-changed (+0/-14) hooks/storage-provider.d/nova/data-relation-broken (+0/-7) hooks/storage-provider.d/nova/data-relation-changed (+0/-7) hooks/storage-provider.d/nova/start (+0/-6) hooks/storage-provider.d/nova/stop (+0/-7) hooks/test_common_util.py (+607/-0) hooks/testing.py (+101/-0) metadata.yaml (+2/-1) |
To merge this branch: | bzr merge lp://staging/~chad.smith/charms/precise/storage/storage-nfs-python-provider |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Britton | Approve | ||
Fernando Correa Neto (community) | Approve | ||
Adam Collard (community) | Abstain | ||
Review via email: mp+202379@code.staging.launchpad.net |
Description of the change
- Add nfs provider type to the storage charm.
- centralize common functions in common_util.py
- move all nova functions into nova_util.py for ease of testing in the future
- Add a heaping pile of unit tests to the storage charm as well as a common TestHookenv class for intercepting juju commands
- Add a makefile with "test" and "lint" targets
- convert most of the bash to python for easier unit testing
- use charm-helpers.core code to standardize juju interaction with other charms
Note: this MP is not to review any of the charmhelpers code as that didn't change, it was only included unaltered in this charm
In terms of storage charm interaction:
1. the storage charm now requires the principal charm to set its requested mountpoint via relation-set mountpoint=
2. when the device (nfs/nova) is attached, initialized, fsck'd and mounted the storage charm will respond to the principal over the "data" relation that the mount is ready by setting the mountpoint to publish the mounted device path
Simplest deployment using juju-deployer:
common:
constraint s: mem=2048
options:
extra- packages: python-apt postgresql-contrib postgresql- 9.1-debversion
max_connectio ns: 500
options:
provider: nova
key: <your_os_name>
tenant: <your_os_ name>_project
secret: <your_os_password>
endpoint: https:/ /keystone. canonistack. canonical. com:443/ v2.0/
region: lcy01
services:
postgresql:
branch: lp:charms/precise/postgresql
storage:
branch: lp:~fcorrea/charms/precise/storage/consume-principal-charm-mountpoint
doit:
inherits: common
series: precise
juju-deployer -c postgres- storage. cfg doit