/usr/lib/python2.6/site-packages/openstackclient/identity/v3
Edit: /usr/lib/python2.6/site-packages/openstackclient/identity/v3/mapping.pyc (7996B)
Ñò
;vVc @ s d Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d d k Z d d k l Z d d k l
Z
d e f d „ ƒ YZ d
e i
e f d „ ƒ YZ d e i f d
„ ƒ YZ d e i f d „ ƒ YZ d e i e f d „ ƒ YZ d e i
f d „ ƒ YZ d S( s5 Identity v3 federation mapping action implementationsiÿÿÿÿN( t command( t lister( t show( t
exceptions( t utilst _RulesReaderc B s e Z d Z d „ Z RS( s0 Helper class capable of reading rules from filesc C s[ t i | ƒ } y t i | ƒ } Wn. t j
o" } t i d | | f ƒ ‚ n X| Sd S( so Read and parse rules from path
Expect the file to contain a valid JSON structure.
:param path: path to the file
:return: loaded and valid dictionary with rules
:raises exception.CommandError: In case the file cannot be
accessed or the content is not a valid JSON.
Example of the content of the file:
[
{
"local": [
{
"group": {
"id": "85a868"
}
}
],
"remote": [
{
"type": "orgPersonType",
"any_one_of": [
"Employee"
]
},
{
"type": "sn",
"any_one_of": [
"Young"
]
}
]
}
]
s5 An error occurred when reading rules from file %s: %sN( R t read_blob_file_contentst jsont loadst
ValueErrorR t CommandError( t selft patht blobt rulest e( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyt _read_rules! s &( t __name__t
__module__t __doc__R ( ( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyR s t
CreateMappingc B s3 e Z d Z e i e d ƒ Z d „ Z d „ Z RS( s Create new mappings .CreateMappingc C sT t t | ƒ i | ƒ } | i d d d d d ƒ| i d d d d t d d ƒ| S(
Nt mappingt metavars
t helps! New mapping name (must be unique)s --ruless
t requireds8 Filename that contains a set of mapping rules (required)( t superR t
get_parsert add_argumentt True( R t prog_namet parser( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyR W s c C s… | i i d | ƒ | i i i } | i | i ƒ } | i i i d | i
d | ƒ } | i i d d ƒ t t t i | i ƒ ƒ Œ S( Ns take_action(%s)t
mapping_idR t links( t logt debugt appt client_managert identityR R t
federationt mappingst createR t _infot popt Nonet zipt sortedt sixt iteritems( R t parsed_argst identity_clientR R ( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyt take_actione s ( R R R t loggingt getLoggerR! R R2 ( ( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyR R s t
DeleteMappingc B s3 e Z d Z e i e d ƒ Z d „ Z d „ Z RS( s Delete mappings .DeleteMappingc C s5 t t | ƒ i | ƒ } | i d d d d d ƒ| S( NR R s R s Mapping to delete( R R5 R R ( R R R ( ( sS /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/v3/mapping.pyR w s c C s= | i i d | ƒ | i i i } | i i i | i ƒ d S( Ns take_action(%s)( R! R" R# R$ R% R&