Add missing reflection + uuidutils docs

These do not seem to have been created and
made appear, so make them appear and make sure
the exposed public API(s) have docstrings so
that they appear in the generated docs.

Change-Id: Ie34e46647b0b20d936ddaa15dc824d0e2d2ca99d
This commit is contained in:
Joshua Harlow 2015-04-13 09:00:39 -07:00 committed by Joshua Harlow
parent 8c4bae3158
commit 3a7fca5e9d
5 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,6 @@
============
reflection
============
.. automodule:: oslo_utils.reflection
:members:

View File

@ -0,0 +1,6 @@
===========
uuidutils
===========
.. automodule:: oslo_utils.uuidutils
:members:

View File

@ -25,9 +25,11 @@ API Documentation
api/fixture api/fixture
api/importutils api/importutils
api/netutils api/netutils
api/reflection
api/strutils api/strutils
api/timeutils api/timeutils
api/units api/units
api/uuidutils
Indices and tables Indices and tables
================== ==================

View File

@ -130,6 +130,7 @@ def get_callable_name(function):
def get_method_self(method): def get_method_self(method):
"""Gets the ``self`` object attached to this method (or none)."""
if not inspect.ismethod(method): if not inspect.ismethod(method):
return None return None
try: try:
@ -187,7 +188,7 @@ def _get_arg_spec(function):
def get_callable_args(function, required_only=False): def get_callable_args(function, required_only=False):
"""Get names of callable arguments. """Get names of callable arguments.
Special arguments (like *args and **kwargs) are not included into Special arguments (like ``*args`` and ``**kwargs``) are not included into
output. output.
If required_only is True, optional arguments (with default values) If required_only is True, optional arguments (with default values)

View File

@ -21,6 +21,10 @@ import uuid
def generate_uuid(): def generate_uuid():
"""Creates a random uuid string.
:returns: string
"""
return str(uuid.uuid4()) return str(uuid.uuid4())