From fa955680ea6698e1db8263e4ce28eab2669d16f1 Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Thu, 10 Jul 2014 23:10:43 -0400 Subject: [PATCH] Update oslo-incubator cliutils module Changes - * Set pbr 'warnerrors' option for doc build Change-Id: I44f6f95687463b79443cf81cedaa7a06b03132cd --- saharaclient/openstack/common/cliutils.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/saharaclient/openstack/common/cliutils.py b/saharaclient/openstack/common/cliutils.py index 657d3802..81c6b94f 100644 --- a/saharaclient/openstack/common/cliutils.py +++ b/saharaclient/openstack/common/cliutils.py @@ -223,6 +223,8 @@ def find_resource(manager, name_or_id, **find_args): Used as a helper for the _find_* methods. Example: + .. code-block:: python + def _find_hypervisor(cs, hypervisor): #Get a hypervisor by name or ID. return cliutils.find_resource(cs.hypervisors, hypervisor) @@ -287,9 +289,12 @@ def service_type(stype): """Adds 'service_type' attribute to decorated function. Usage: - @service_type('volume') - def mymethod(f): - ... + + .. code-block:: python + + @service_type('volume') + def mymethod(f): + ... """ def inner(f): f.service_type = stype