Merge "Fix mappings.Mapping docstring"

This commit is contained in:
Jenkins
2014-10-20 00:51:25 +00:00
committed by Gerrit Code Review

View File

@@ -48,35 +48,30 @@ class MappingManager(base.CrudManager):
:param mapping_id: user defined string identifier of the federation :param mapping_id: user defined string identifier of the federation
mapping. mapping.
:param rules: a JSON dictionary with list a list :param rules: a list of mapping rules.
of mapping rules.
Example of the ``rules``:: Example of the ``rules`` parameter::
{ [
"mapping": { {
"rules": [ "local": [
{ {
"local": [ "group": {
{ "id": "0cd5e9"
"group": { }
"id": "0cd5e9" }
} ],
} "remote": [
], {
"remote": [ "type": "orgPersonType",
{ "not_any_of": [
"type": "orgPersonType", "Contractor",
"not_any_of": [ "Guest"
"Contractor", ]
"Guest" }
] ]
} }
] ]
}
]
}
}
""" """
return self._build_url_and_put( return self._build_url_and_put(
@@ -112,35 +107,31 @@ class MappingManager(base.CrudManager):
:param mapping: a Mapping type object with mapping id :param mapping: a Mapping type object with mapping id
stored inside. stored inside.
:param rules: a JSON dictionary with list a list :param rules: a list of mapping rules.
of mapping rules.
Example of the ``rules``:: Example of the ``rules`` parameter::
{
"mapping": { [
"rules": [ {
{ "local": [
"local": [ {
{ "group": {
"group": { "id": "0cd5e9"
"id": "0cd5e9" }
} }
} ],
], "remote": [
"remote": [ {
{ "type": "orgPersonType",
"type": "orgPersonType", "not_any_of": [
"not_any_of": [ "Contractor",
"Contractor", "Guest"
"Guest" ]
] }
} ]
] }
} ]
]
}
}
""" """
return super(MappingManager, self).update( return super(MappingManager, self).update(