Update Existing Segment Traits
Update existing valid segment traits dictionary.
This functionality is Experimental and is subject to major changes and even being removed entirely.
Changes made using the functionality described here are scoped to the target “Admin” object instance.
The use of the word update is used to indicate that any mappings specified in the
update_existing_segment_traits
constructor argument of an “Admin” object will be written to the existing_valid_segment_traits
dictionary belonging to said “Admin” object meaning that this results in a modification of the existing_valid_segment_traits
dictionary. Any segment/trait mappings in the dictionary provided through theupdate_existing_segment_traits
constructor argument of an “Admin” object that match segment/trait mappings in the existing_valid_segment_traits
dictionary belonging to said “Admin” object will be replaced. Any segment/traits mappings in the dictionary provided through theupdate_existing_sgement_traits
contructor argument of an “Admin” object that do NOT match segment/trait mappings in the existing_valid_segment_traits
dictionary of said “Admin” object will be added.
The existing _valid_segment_traits
dictionary that defines the mappings between pyRACF segment/trait keys to IRRSMO00 XML fields can be updated using a user specified dictionary that defines custom mappings by setting the update_existing_segment_traits
consturctor argument upon creation of any “Admin” object. This can allow for pyRACF to access custom field data in the csdata
segment, and may also enable compatibility with other security managers with alternative mappings.
Example
Python Script
from pyracf import UserAdmin
segment_traits = {
"csdata": {
"csdata:newfield": "newfield"
}
}
user_admin = UserAdmin(update_existing_segment_traits=segment_traits)