Need high-level API to model relation endpoints
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
Medium
|
Jim Baker |
Bug Description
Ensemble currently provides a low-level API in ensemble.state to manage the ZooKeeper znodes. In particular, ensemble.
Ensemble also will expose a high-level command line interface for managing relations.
Currently we lack a bridge between this low-level API and what's needed for the high-level CLI. For example, the CLI needs to support establishing a relation between two arbitrary services. (The discussion of removing a relation is
similar.) Users specify the desired relation indirectly by describing the services they would like to connect by the two relation descriptors:
<service name 1>[:<relation name>] <service name 2>[:<relation name>]
We need support for these descriptors as well as support to construct relation endpoints, which add in the relation role and interface (aka relation type).
Related branches
- Gustavo Niemeyer: Approve
-
Diff: 85 lines (+76/-0)2 files modifiedensemble/state/endpoint.py (+42/-0)
ensemble/state/tests/test_endpoint.py (+34/-0)
- Gustavo Niemeyer: Approve
-
Diff: 523 lines (+332/-26)11 files modifiedensemble/formula/metadata.py (+108/-2)
ensemble/formula/tests/repository/mysql/metadata.yaml (+7/-0)
ensemble/formula/tests/repository/riak/metadata.yaml (+13/-0)
ensemble/formula/tests/repository/wordpress/metadata.yaml (+21/-0)
ensemble/formula/tests/test_metadata.py (+86/-4)
ensemble/state/endpoint.py (+10/-11)
ensemble/state/relation.py (+1/-0)
ensemble/state/service.py (+37/-1)
ensemble/state/tests/test_endpoint.py (+8/-7)
ensemble/state/tests/test_relation.py (+1/-1)
ensemble/state/tests/test_service.py (+40/-0)
- Gustavo Niemeyer: Approve
-
Diff: 355 lines (+212/-51)5 files modifiedensemble/formula/tests/repository/varnish/metadata.yaml (+7/-0)
ensemble/formula/tests/repository/wordpress/metadata.yaml (+1/-1)
ensemble/formula/tests/test_metadata.py (+3/-3)
ensemble/state/service.py (+16/-4)
ensemble/state/tests/test_service.py (+185/-43)
- Gustavo Niemeyer: Approve
-
Diff: 1674 lines (+608/-532)12 files modifiedensemble/hooks/tests/test_invoker.py (+9/-5)
ensemble/state/endpoint.py (+6/-6)
ensemble/state/errors.py (+24/-10)
ensemble/state/relation.py (+88/-102)
ensemble/state/service.py (+5/-2)
ensemble/state/tests/test_endpoint.py (+8/-8)
ensemble/state/tests/test_errors.py (+31/-8)
ensemble/state/tests/test_hook.py (+9/-5)
ensemble/state/tests/test_relation.py (+297/-235)
ensemble/state/tests/test_service.py (+49/-142)
ensemble/state/tests/test_topology.py (+55/-7)
ensemble/state/topology.py (+27/-2)
Changed in ensemble: | |
assignee: | nobody → Jim Baker (jimbaker) |
status: | New → In Progress |
Changed in ensemble: | |
importance: | Undecided → Medium |
milestone: | none → 0.3 |
status: | In Progress → Fix Committed |
Changed in ensemble: | |
status: | Fix Committed → Fix Released |