diff options
author | Marek Denis <marek.denis@cern.ch> | 2014-10-15 13:42:39 +0200 |
---|---|---|
committer | Marek Denis <marek.denis@cern.ch> | 2014-10-16 08:49:00 +0200 |
commit | d5ec4f725030538d44ecf914e48e12e1ee7bfa78 (patch) | |
tree | ae92443e2ad1487d2781d8bcb9fee9e99dc27f02 | |
parent | 89dc951f7d5a603f0c34b7c2cb9f7d26d73d9916 (diff) | |
download | python-keystoneclient-d5ec4f725030538d44ecf914e48e12e1ee7bfa78.tar.gz |
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
-rw-r--r-- | keystoneclient/v3/contrib/federation/mappings.py | 107 |
1 files changed, 49 insertions, 58 deletions
diff --git a/keystoneclient/v3/contrib/federation/mappings.py b/keystoneclient/v3/contrib/federation/mappings.py index d0c033f..1cdb879 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. - - Example of the ``rules``:: - - { - "mapping": { - "rules": [ - { - "local": [ - { - "group": { - "id": "0cd5e9" - } - } - ], - "remote": [ - { - "type": "orgPersonType", - "not_any_of": [ - "Contractor", - "Guest" - ] - } - ] - } - ] - } - } + :param rules: a list of mapping rules. + + Example of the ``rules`` parameter:: + + [ + { + "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. - - Example of the ``rules``:: - - { - "mapping": { - "rules": [ - { - "local": [ - { - "group": { - "id": "0cd5e9" - } - } - ], - "remote": [ - { - "type": "orgPersonType", - "not_any_of": [ - "Contractor", - "Guest" - ] - } - ] - } - ] - } - } + :param rules: a list of mapping rules. + + Example of the ``rules`` parameter:: + + + [ + { + "local": [ + { + "group": { + "id": "0cd5e9" + } + } + ], + "remote": [ + { + "type": "orgPersonType", + "not_any_of": [ + "Contractor", + "Guest" + ] + } + ] + } + ] """ return super(MappingManager, self).update( |