Releases: univ-of-utah-marriott-library-apple/python-jamf
Releases · univ-of-utah-marriott-library-apple/python-jamf
0.9.8
Full Changelog: 0.9.7...0.9.8
Fixed
- records.py: auto-fill the self.singular_class.singular_string requirement for create method (required removing it from all sub_records)
- records.py: policy subcommand spreadsheet: check for missing keys (jctl issue 37)
0.9.7
Full Changelog: 0.9.6...0.9.7
Fixed
- config.py: fixed the self.hostname 'fix' added to 0.9.6
- records.py
- usage_print_during: fix print bug
- Add should_refresh_X to control behavior
- Computers.stub_record adds managed:true
0.9.6
Full Changelog: 0.9.5...0.9.6
Fixed
- config.py: remove extra / from hostname
- api.py: add plural support
0.9.5
0.9.4
Full Changelog: 0.9.3...0.9.4
Changed
- config_test.py: rename jamf to python_jamf
- setup.py: rename jamf to python_jamf (again)
- records.py: Fix issue 59, refresh_groups exception
0.9.3
Full Changelog: 0.9.2...0.9.3
Added
- exceptions.py: JamfRecordInvalidPath prints bad path
- records.py: prints bad path
0.9.2
0.9.1
Full Changelog: 0.9.0...0.9.1
Fixed
- setconfig.py: renamed jamf to python_jamf
- GitHub Action: switched it to python 11 instead of 12
- records.py: jctl osxconfigurationprofiles -l generated error. Fixed it.
0.9.0
The biggest change is renaming jamf to python_jamf.
The second biggest change is switching from api.py to jps_api_wrapper (https://pypi.org/project/jps-api-wrapper/).
Full Changelog: 0.8.3...0.9.0
General
Changed
- Renamed jamf to python_jamf.
- Switched to jps_api_wrapper.
- Bumped requests to 2.31.0.
- Improved setconfig.py error handling if the server config is bad or not set.
- Added Error.message property.
- Added error classes: JamfRecordInvalidPath, JamfUnknownClass, JamfAPISurprise.
- Config prompt now removes all /'s at the end of the jamf path.
- convert.py can now force some keys to be arrays ("plural" property) using a dict to
specify which properties are arrays or not.
Deprecated
- api.py.
- api_test.py.
Added
- Added CHANGELOG.
- tests/test_records.py.
- server.py.
records.py changes:
Changed
- Switched from exceptions defined in records.py to exceptions defined in exceptions.py.
- Record constructor now just takes jamf_id and jamf_name (instead of "*args, **kw").
- Improved how Record constructor creates a new record.
- Renamed Records.refresh to Records.refresh_records.
- Record delete, save, refresh_data, and Records refresh_records no longer get
the path from swagger and call the api.py methods,
but now they call the appropriate jps_api_wrapper method (if it exsits). - save method encodes data as "utf-8" before saving.
- Reduced refresh_data calls to avoid constant talking to the server.
- Search for records by path:
jctl computers -p "location/[building==BIOL]"
. - When updating data with set_path, don't edit the data directly, modify a copy of the data.
save() sends the "copy". - Split Package.refresh_related into Package.refresh_patchsoftwaretitles,
Package.refresh_patchpolicies, Package.refresh_policies, and Package.refresh_groups.
Deprecated
- Records.recordWithName(), use Records.recordsWithName() instead (since names are not always unique)
Added
- import random, string, warnings, jps_api_wrapper.
- import exceptions: JamfAPISurprise, JamfRecordInvalidPath, JamfRecordNotFound, JamfUnknownClass.
- Added Records.random_value to create random uuids, semvars, and serial numbers
- Added Records.create, Record.save_override, Record.set_data_name, Record.get_data_name
- Added Records.stub_record, Records.create_override and Records.create for record creation
- Added Records.delete for mass record deletion
- Added Records.set_classic and Records.set_debug
Removed
- ComputerConfigurations, MobileDeviceCommands, NetbootServers.
- JamfError and NotFound error classes.
- ClassicSwagger class and everything that used it.
- Records.createNewRecord()
Fixed
- Bug where record name doesn't show it's updated when it's updated
0.8.3
- Moved keyring code out of api.py to config.py.
- Improved error handling, exits, and printing to STDERR.
- Created exceptions.py.
- Moved all errors to exceptions.py.
- Created more nuanced exceptions like NotFound.
- Improved session management.
- Removed api.py code that wasn't doing anything.
- Applied a little bit of dry to api.py.
- Encode xml data as utf-8 before sending it to Jamf.
- Simplified config.py and setconfig.py by breaking up long methods into multiple methods.
- Created revoke_token .
- Fixed code with null names.
- Cast record id to int if it's a str.
- Added recordsWithName.
- Deprecated recordWithName because Jamf doesn't enforce unique names. recordWithName returns the first item returned by recordsWithName.
- Removed api_mock_test.py and created api_test.py, which runs against a real jamf server.
- Removed/renamed test_config.py to config_test.py and completely rewrote it.
- Removed test_records.py (it's a work in progress)
Known issues
- Creating a new record needs a little work. It needs to get the record right after posting it because the data isn't correct.
- Discovered it's possible to create bad records that can not be deleted and doesn't show up in the GUI.