diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-05-29 21:58:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-05-29 21:58:50 +0000 |
| commit | d69bd2b05462b484342557403fa9461d5994336b (patch) | |
| tree | 74419be07c150b0d786b32b90cbe3b5911ff983e /ironic_python_agent/agent.py | |
| parent | 340a888689246112a75aeb5b528eca014cc6e03d (diff) | |
| parent | ed4460990e9e71994c631dde545f50005b5ef769 (diff) | |
| download | ironic-python-agent-d69bd2b05462b484342557403fa9461d5994336b.tar.gz | |
Merge "Make encoding.serialize() more programmatical"
Diffstat (limited to 'ironic_python_agent/agent.py')
| -rw-r--r-- | ironic_python_agent/agent.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ironic_python_agent/agent.py b/ironic_python_agent/agent.py index e140f36d..1fb6f556 100644 --- a/ironic_python_agent/agent.py +++ b/ironic_python_agent/agent.py @@ -27,7 +27,6 @@ from ironic_python_agent.extensions import base from ironic_python_agent import hardware from ironic_python_agent import ironic_api_client from ironic_python_agent.openstack.common import log -from ironic_python_agent import utils def _time(): @@ -36,17 +35,12 @@ def _time(): class IronicPythonAgentStatus(encoding.Serializable): + serializable_fields = ('started_at', 'version') + def __init__(self, started_at, version): self.started_at = started_at self.version = version - def serialize(self): - """Turn the status into a dict.""" - return utils.get_ordereddict([ - ('started_at', self.started_at), - ('version', self.version), - ]) - class IronicPythonAgentHeartbeater(threading.Thread): # If we could wait at most N seconds between heartbeats (or in case of an |
