Skip to content

Commit

Permalink
Pull Dev Changes
Browse files Browse the repository at this point in the history
Pull Dev Changes and Fix resulting conflicts

Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
  • Loading branch information
ElijahSwiftIBM committed Oct 25, 2023
1 parent d542dab commit ea0577f
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 39 deletions.
12 changes: 8 additions & 4 deletions pyracf/setropts/setropts_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def refresh_raclist(self, class_names: Union[List[str], str]) -> Union[dict, byt
# ============================================================================
# Get attributes
# ============================================================================
def get_classes_attributes(self, class_name: str) -> Union[list, bytes]:
def get_class_attributes(self, class_name: str) -> Union[list, bytes]:
"""Get RACF get attributes."""
profile = self.list_racf_options(options_only=True)
if not isinstance(profile, dict):
Expand All @@ -159,7 +159,7 @@ def remove_audit_classes(
) -> Union[dict, bytes]:
"""Remove class(es) from the list of classes that RACF performs auditing for."""
result = self.alter(options={"delete:base:audit_classes": class_names})

return self._to_steps(result)

# ============================================================================
# Active Classes
Expand Down Expand Up @@ -220,7 +220,9 @@ def remove_generic_command_processing_classes(
Remove class(es) from the list of classes that
have generic profile command processing enabled.
"""
result = self.alter(options={"delete:base:general_command_classes": class_names})
result = self.alter(
options={"delete:base:general_command_classes": class_names}
)
return self._to_steps(result)

# ============================================================================
Expand Down Expand Up @@ -254,7 +256,9 @@ def add_generic_profile_sharing_classes(
Add class(es) to the list of classes that are eligible for
general resource profile sharing in common storage.
"""
result = self.alter(options={"base:generic_profile_sharing_classes": class_names})
result = self.alter(
options={"base:generic_profile_sharing_classes": class_names}
)
return self._to_steps(result)

def remove_generic_profile_sharing_classes(
Expand Down
15 changes: 10 additions & 5 deletions tests/user/test_user_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,16 @@ def get_sample(sample_file: str) -> Union[str, bytes]:
"extract_user_result_with_command_audit_trail.xml"
)
TEST_EXTRACT_USER_RESULT_INVALID_ATTRIBUTE_XML = get_sample(
"extract_user_result_invattr_error.xml"
"extract_user_result_invalid_attribute_error.xml"
)
TEST_EXTRACT_USER_RESULT_INVALID_ATTRIBUTE_JSON = get_sample(
"extract_user_result_invattr_error.json"
"extract_user_result_invalid_attribute_error.json"
)
TEST_EXTRACT_USER_RESULT_BASE_OMVS_TSO_REVOKE_RESUME_XML = get_sample(
"extract_user_result_base_omvs_tso_revoke_resume.xml"
)
TEST_EXTRACT_USER_RESULT_BASE_OMVS_TSO_REVOKE_RESUME_DICTIONARY = get_sample(
"extract_user_result_base_omvs_tso_revoke_resume.json"
)

# Delete User
Expand Down Expand Up @@ -170,7 +176,6 @@ def get_sample(sample_file: str) -> Union[str, bytes]:
TEST_ALTER_USER_REQUEST_XML = get_sample("alter_user_request.xml")
TEST_ALTER_USER_REQUEST_TRAITS = {
"base:special": False,
"base:operator": True,
"omvs:home_directory": "/u/clarinet",
"omvs:default_shell": False,
}
Expand All @@ -179,8 +184,8 @@ def get_sample(sample_file: str) -> Union[str, bytes]:
"base:owner": "leonard",
"base:special": True,
"omvs:uid": "2424",
"omvs:home": "/u/squidwrd",
"omvs:program": "/bin/sh",
"omvs:home_directory": "/u/squidwrd",
"omvs:default_shell": "/bin/sh",
}
TEST_ALTER_USER_REQUEST_TRAITS_PASSWORD = dict(TEST_ALTER_USER_REQUEST_TRAITS_EXTENDED)
TEST_ALTER_USER_REQUEST_TRAITS_PASSWORD["base:password"] = "GIyTTqdF"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -191,11 +191,11 @@
"value": "********",
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -191,11 +191,11 @@
"value": "********",
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_error.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -191,11 +191,11 @@
"value": 90000000000,
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -199,11 +199,11 @@
"value": 90000000000,
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -199,11 +199,11 @@
"value": "2424",
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_passphrase_error.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -195,11 +195,11 @@
"value": 90000000000,
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_passphrase_success.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -195,11 +195,11 @@
"value": "2424",
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_password_error.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -195,11 +195,11 @@
"value": 90000000000,
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_password_success.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -195,11 +195,11 @@
"value": "2424",
"operation": null
},
"omvs:home": {
"omvs:home_directory": {
"value": "/u/squidwrd",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": "/bin/sh",
"operation": null
}
Expand Down
6 changes: 3 additions & 3 deletions tests/user/user_log_samples/alter_user_success.log
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"connectDate": "4/4/2023",
"connects": 0,
"uacc": null,
"lastConnect": "unknown",
"lastConnect": null,
"connectAttributes": [],
"revokeDate": null,
"resumeDate": null
Expand Down Expand Up @@ -179,11 +179,11 @@
}
},
"omvs": {
"omvs:home": {
"omvs:home_directory": {
"value": "/u/clarinet",
"operation": null
},
"omvs:program": {
"omvs:default_shell": {
"value": false,
"operation": "delete"
}
Expand Down

0 comments on commit ea0577f

Please sign in to comment.