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:
parent
8c4bae3158
commit
3a7fca5e9d
6
doc/source/api/reflection.rst
Normal file
6
doc/source/api/reflection.rst
Normal file
@ -0,0 +1,6 @@
|
||||
============
|
||||
reflection
|
||||
============
|
||||
|
||||
.. automodule:: oslo_utils.reflection
|
||||
:members:
|
6
doc/source/api/uuidutils.rst
Normal file
6
doc/source/api/uuidutils.rst
Normal file
@ -0,0 +1,6 @@
|
||||
===========
|
||||
uuidutils
|
||||
===========
|
||||
|
||||
.. automodule:: oslo_utils.uuidutils
|
||||
:members:
|
@ -25,9 +25,11 @@ API Documentation
|
||||
api/fixture
|
||||
api/importutils
|
||||
api/netutils
|
||||
api/reflection
|
||||
api/strutils
|
||||
api/timeutils
|
||||
api/units
|
||||
api/uuidutils
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@ -130,6 +130,7 @@ def get_callable_name(function):
|
||||
|
||||
|
||||
def get_method_self(method):
|
||||
"""Gets the ``self`` object attached to this method (or none)."""
|
||||
if not inspect.ismethod(method):
|
||||
return None
|
||||
try:
|
||||
@ -187,7 +188,7 @@ def _get_arg_spec(function):
|
||||
def get_callable_args(function, required_only=False):
|
||||
"""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.
|
||||
|
||||
If required_only is True, optional arguments (with default values)
|
||||
|
@ -21,6 +21,10 @@ import uuid
|
||||
|
||||
|
||||
def generate_uuid():
|
||||
"""Creates a random uuid string.
|
||||
|
||||
:returns: string
|
||||
"""
|
||||
return str(uuid.uuid4())
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user