MachineState must enable MachineAgent monitoring
Bug #617046 reported by
Gustavo Niemeyer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
Medium
|
Kapil Thangavelu |
Bug Description
The MachineState should enable the MachineAgent reponsible for this machine to be monitored.
Here is a suggested API:
class MachineState:
def has_agent(self):
"""Return boolean deferred informing whether an agent is connected."""
def watch_agent(self):
"""Return two boolean deferreds informing whether an agent is connected, and whether a change happened."""
def connect_
"""Inform Ensemble that this is a machine agent alive."""
This is needed by the MachineAgent (bug #617042) and future work in the ProvisioningAgent (bug #616565).
Related branches
lp://staging/~hazmat/pyjuju/agent-state
- Gustavo Niemeyer: Approve
-
Diff: 287 lines (+188/-2)7 files modifiedensemble/lib/testing.py (+9/-0)
ensemble/state/agent.py (+42/-0)
ensemble/state/machine.py (+7/-1)
ensemble/state/service.py (+6/-1)
ensemble/state/tests/test_agent.py (+94/-0)
ensemble/state/tests/test_machine.py (+14/-0)
ensemble/state/tests/test_service.py (+16/-0)
description: | updated |
Changed in ensemble: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in ensemble: | |
assignee: | nobody → Jim Baker (jimbaker) |
Changed in ensemble: | |
assignee: | Jim Baker (jimbaker) → Kapil Thangavelu (hazmat) |
Changed in ensemble: | |
status: | In Progress → Fix Committed |
Changed in ensemble: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
i'm working on this in conjunction with generic agent monitoring for domain objects, likely as a mixin state class.