Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices.update_device only changes SimpleMDM name #38

Closed
bryanheinz opened this issue Sep 28, 2021 · 0 comments
Closed

Devices.update_device only changes SimpleMDM name #38

bryanheinz opened this issue Sep 28, 2021 · 0 comments
Labels
bug Something isn't working resolved in dev Resolved in the dev branch, but not committed to main yet.

Comments

@bryanheinz
Copy link
Collaborator

The Devices.update_device() function claims to update both the SimpleMDM name and device name. However, it only updates the SimpleMDM name.

def update_device(self, name, device_id):
"""Update the SimpleMDM name or device name of a device object."""
url = self.url + "/" + str(device_id)
data = {'name': name}
return self._patch_data(url, data)

SimpleMDM API Devices - Update

Argument Description
name The name of the device within SimpleMDM.
device_name The name that appears on the device itself. Requires supervision. This operation is asynchronous and occurs when the device is online.
@bryanheinz bryanheinz added the bug Something isn't working label Sep 28, 2021
bryanheinz added a commit to bryanheinz/simpleMDMpy that referenced this issue Sep 28, 2021
- Updated update_device input to accept both name and device_name input (breaking change)
- data is now updated with the inputs
- Added validation that data has input
- Updated the README with update_device's new inputs
@bryanheinz bryanheinz linked a pull request Sep 28, 2021 that will close this issue
bryanheinz added a commit to bryanheinz/simpleMDMpy that referenced this issue Nov 5, 2021
* Resolves issue macadmins#38
* Resolves issue macadmins#24

- Updated update_device input to accept both name and device_name input (breaking change)
- Data is now updated with the inputs
- Added validation that data has input
- Updated the README with update_device's new inputs
bryanheinz added a commit that referenced this issue Jan 17, 2022
- Closes issue #24
- Closes issue #38
- Closes issue #25
- Closes issue #26
@bryanheinz bryanheinz added the resolved in dev Resolved in the dev branch, but not committed to main yet. label May 30, 2022
@MagerValp MagerValp mentioned this issue Dec 1, 2022
rickheil pushed a commit that referenced this issue Dec 2, 2022
* resolves the bug in issue #25 by removing id_override, replacing data with params, and adding specific input parameters.

* required changes to resolve the bug in issue #25. migrated from updating the url in _get_data to a local _params variable that is updated with the input params var.

* added Unreleased section and updated with issue #25 changes.

* Fix calls that return a single item.

* Return single items without wrapping in list.

* added params= to be explicit, and marked a potential bug.

* updated CHANGELOG

* added docstring

* updated CHANGELOG

* Resolves Issue 38 (#1)

* Resolves issue #38
* Resolves issue #24

- Updated update_device input to accept both name and device_name input (breaking change)
- Data is now updated with the inputs
- Added validation that data has input
- Updated the README with update_device's new inputs

* Adding download option to profile

* Update CHANGELOG.md

* v3.0.7

* adding _get_xml connection

* update CHANGELOG

* update README

* Adding include_awaiting_enrollment option #43 (#44)

* Merging dev branch (#46)

* Use request params instead of url string in SimpleMDM._get_data()

* Fix Devices.delete_device()

* Add methods for enabling/disabling remote desktop

* Add /devices request rate limiting

* Add profile and user listing

* Add retry on 5xx errors to GET requests

* Updates gitignore and changelog (#47)

- Added ignoring egg files
- Updated changelog

* A little clean up, some fixen, and a few tests. (#48)

- Cleaned up my bad merge on Devices.get_device() and adds some help docs
- Closes the session on deinit that the Connection class now opens
- Resolves issue #45 by preserving input parameters instead of overwriting them
- Added setup.cfg and pyproject.toml files for packaging new releases
- Added a few basic tests
- Updates the changelog and gitignore files

* Add script support

* Add error handling for update_script

* Fix handling of req_params for pagination

* Update CHANGELOG.md

* Fix handling of req_params for pagination

* Update CHANGELOG.md

* Add Sample Projects

Adding some samples projects for issue #28

* Use monotonic time for rate limit and fix sleep time calc

* Update CHANGELOG.md

Co-authored-by: Steve <steve.kueng@gmail.com>
Co-authored-by: Bryan Heinz <git@bryanheinz.com>
Co-authored-by: Jon Crain <joncrain@users.noreply.github.com>
@rickheil rickheil closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved in dev Resolved in the dev branch, but not committed to main yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants