DSS class interface
I have been mucking around with getting information in and out of Deploy Studio Server(DSS). DSS uses a web service which, apart from the web page itself, doesn’t appear to be documented anywhere.
After trial and error (using wireshark and my hex editor 0xED) I have managed to get a DSS php class together.
It’s function is currently limited to:
- Add Computer
- Delete Computer
- Add Group
- Add Multiple Computers
- Delete Group
- Get all Groups
Using this class in combination with a bit of dscl scripting, it is possible to ‘mirror’ the group membership of Workgroup Manager (WGM) on OS X server with DSS. It does not currently ’sync’ the group membership info, but it may well do that already, I have just not tested it yet.
Please feel free to enhance this classes functions, but if you do please let me know so that it may be added to this class for all to make use of.
Documentation
Please see here for my class documentation
Requirements:
- PHP >=5.2.6 (that’s what my test system is on.. – 10.5.4 server) It will probably work on 5.0 and above
- class.curl.php from http://munroe.users.phpclasses.org/browse/package/1988.html
- If you want to get groups from WGM to DSS then you need command line access to the WGM server
- A little bit of php programming knowledge, while I’m sure my code is working, it is not foolproof. Please use this code with care as I will not accept any liability or responsibility for any data loss or damage caused as a result of running this code in your environment
Files in the zip package
- The DSS class (class.dss_int.php)
- The XML template files
- An example script (example1.php) note if you run this script as is, you will get errors. You will need to edit it to test functionality.
- A script (wgm_import.php) which will import group and computer information from WGM to DSS. This script must be run on a machine that is bound to your OD and also has network access to the DSS server. there are some fields you will need to set – DSS_URL, DSS_adminuser, DSS_adminpass. You may also want to filter the WGM computer list – ie if you have a ’server’ group you probably don’t want this added to DSS.