arubdesu/jss-autopkg-addon — pull request #11 by sheagcraig (2014-06-16 19:28:29+00:00)
Title: Refactor to python jss

Hello Mr. Banks!

I wanted to send you what I've been working on. The overview is this:
1. Added in a copy of my jss.py wrapper for the Jamf API.
2. I then refactored the category, package, group, and policy code into their own methods, and changed them to use the jss.py methods as much as possible.
3. I added in code to handle policy categories. It seems that the lack of a policy results in the JSS just giving it category: -1 / Unknown, so it's safe to not include. That being said, the code doesn't update a policy that has a category into not having a policy, which could be an issue.
4. I also added in a key for os_requirements, since this would also be helpful for me right now (Skype...)

I was thinking about changing the group code to handle an array of groups rather than just a single group, but it's not something I would use, and the code has already diverged quite a bit from yours, so I wanted to hold off on new features.

The python-jss wrapper is hosted here: https://github.com/sheagcraig/python-jss