From d5ec4f725030538d44ecf914e48e12e1ee7bfa78 Mon Sep 17 00:00:00 2001 From: Marek Denis Date: Wed, 15 Oct 2014 13:42:39 +0200 Subject: [PATCH] Fix mappings.Mapping docstring Rules examples in ``create`` and ``update`` methods should be list of rules, as this is what should be passed as an argument. Change-Id: Ibebc28aa0697879b00437c5efe31e1c0d7c4c29d --- .../v3/contrib/federation/mappings.py | 99 +++++++++---------- 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/keystoneclient/v3/contrib/federation/mappings.py b/keystoneclient/v3/contrib/federation/mappings.py index d0c033f13..1cdb87934 100644 --- a/keystoneclient/v3/contrib/federation/mappings.py +++ b/keystoneclient/v3/contrib/federation/mappings.py @@ -48,35 +48,30 @@ class MappingManager(base.CrudManager): :param mapping_id: user defined string identifier of the federation mapping. - :param rules: a JSON dictionary with list a list - of mapping rules. + :param rules: a list of mapping rules. - Example of the ``rules``:: + Example of the ``rules`` parameter:: - { - "mapping": { - "rules": [ - { - "local": [ - { - "group": { - "id": "0cd5e9" - } - } - ], - "remote": [ - { - "type": "orgPersonType", - "not_any_of": [ - "Contractor", - "Guest" - ] - } - ] - } - ] - } - } + [ + { + "local": [ + { + "group": { + "id": "0cd5e9" + } + } + ], + "remote": [ + { + "type": "orgPersonType", + "not_any_of": [ + "Contractor", + "Guest" + ] + } + ] + } + ] """ return self._build_url_and_put( @@ -112,35 +107,31 @@ class MappingManager(base.CrudManager): :param mapping: a Mapping type object with mapping id stored inside. - :param rules: a JSON dictionary with list a list - of mapping rules. + :param rules: a list of mapping rules. - Example of the ``rules``:: + Example of the ``rules`` parameter:: - { - "mapping": { - "rules": [ - { - "local": [ - { - "group": { - "id": "0cd5e9" - } - } - ], - "remote": [ - { - "type": "orgPersonType", - "not_any_of": [ - "Contractor", - "Guest" - ] - } - ] - } - ] - } - } + + [ + { + "local": [ + { + "group": { + "id": "0cd5e9" + } + } + ], + "remote": [ + { + "type": "orgPersonType", + "not_any_of": [ + "Contractor", + "Guest" + ] + } + ] + } + ] """ return super(MappingManager, self).update(