Raclist Class
Setropts Administration functions for modifying if a class has the Raclist attribute.
SetroptsAdmin.add_raclist_classes()
def add_raclist_classes(self, class_names: Union[str, List[str]]) -> Union[dict, bytes]:
📄 Description
Add a class to the list of classes that RACF has Raclisted.
📥 Parameters
class_name
The name of the class to add the raclist attribute to.
📤 Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if theSetroptsAdmin.generate_requests_only
class attribute is set toTrue
.
❌ Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
💻 Example
Python REPL
>>> from pyracf import SetroptsAdmin
>>> setropts_admin = SetroptsAdmin()
>>> setropts_admin.add_raclist_classes("ELIJTEST")
{'step1': {'securityResult': {'systemSettings': {'operation': 'set', 'requestId': 'SetroptsRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'SETROPTS RACLIST (ELIJTEST)'}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}}
Security Result Steps Dictionary as JSON
{
"step1":{
"securityResult":{
"systemSettings":{
"operation":"set",
"requestId":"SetroptsRequest",
"commands":[
{
"safReturnCode":0,
"returnCode":0,
"reasonCode":0,
"image":"SETROPTS RACLIST (ELIJTEST)"
}
]
},
"returnCode":0,
"reasonCode":0
}
}
}
SetroptsAdmin.remove_raclist_classes()
remove_raclist_class
def remove_raclist_classes(self, class_names: Union[str, List[str]]) -> Union[dict, bytes]:
📄 Description
Remove a class from the list of classes that RACF has Raclisted.
📥 Parameters
class_name
The name of the class to remove the raclist attribute from.
📤 Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if theSetroptsAdmin.generate_requests_only
class attribute is set toTrue
.
❌ Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
💻 Example
Python REPL
>>> from pyracf import SetroptsAdmin
>>> setropts_admin = SetroptsAdmin()
>>> setropts_admin.remove_raclist_classes("ELIJTEST")
{'step1': {'securityResult': {'systemSettings': {'operation': 'set', 'requestId': 'SetroptsRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'SETROPTS NORACLIST (ELIJTEST)'}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}}
Security Result Steps Dictionary as JSON
{
"step1":{
"securityResult":{
"systemSettings":{
"operation":"set",
"requestId":"SetroptsRequest",
"commands":[
{
"safReturnCode":0,
"returnCode":0,
"reasonCode":0,
"image":"SETROPTS NORACLIST (ELIJTEST)"
}
]
},
"returnCode":0,
"reasonCode":0
}
}
}