diff options
author | Ruby Loo <rloo@yahoo-inc.com> | 2014-10-27 21:37:22 +0000 |
---|---|---|
committer | Ruby Loo <rloo@yahoo-inc.com> | 2014-10-27 21:47:18 +0000 |
commit | fb6cf77d97d05c7b0f50204f12c1905cda7552f4 (patch) | |
tree | 384775ab5da0739e749d3a40278ea93770076296 /ironic/api/controllers/base.py | |
parent | 9cee24e257031c74afcbc9e37c0b705240e9b399 (diff) | |
download | ironic-fb6cf77d97d05c7b0f50204f12c1905cda7552f4.tar.gz |
Use docstrings for attributes in api/controllers
We're using one double-quote for delimiting the strings that describe
attributes. If the string spans more than one line, only the first line
is used when sphinx generates the documentation. eg, for last_error, the
generated documentation shows:
Any error from the most recent (last) asynchronous transaction that
instead of
Any error from the most recent (last) asynchronous transaction that
started but failed to finish.
Using the docstring (three double-quotes) syntax addresses this. All the
attributes in api/controllers were modified accordingly. This makes them
consistent so that any additions/changes to these strings in the future
will appear in the generated documentation as expected. (As opposed to
only changing the ones that span more than one line.)
[1] http://docs.openstack.org/developer/ironic/webapi/v1.html
Change-Id: I84e4ba9c22827838ff31ba96a788cfc22609c8a5
Diffstat (limited to 'ironic/api/controllers/base.py')
-rw-r--r-- | ironic/api/controllers/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic/api/controllers/base.py b/ironic/api/controllers/base.py index 8a10ffbfc..a132a339f 100644 --- a/ironic/api/controllers/base.py +++ b/ironic/api/controllers/base.py @@ -21,10 +21,10 @@ from wsme import types as wtypes class APIBase(wtypes.Base): created_at = wsme.wsattr(datetime.datetime, readonly=True) - "The time in UTC at which the object is created" + """The time in UTC at which the object is created""" updated_at = wsme.wsattr(datetime.datetime, readonly=True) - "The time in UTC at which the object is updated" + """The time in UTC at which the object is updated""" def as_dict(self): """Render this object as a dict of its fields.""" |