Public | Automated Build

Last pushed: a year ago
Short Description
Basic container for running WHD-CLI Python script
Full Description


Docker container for WHD-CLI

To use this container:

  1. Create the com.github.nmcspadden.whd-cli.plist file containing authentication for WebHelpDesk:

     <?xml version="1.0" encoding="UTF-8"?>
     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
     <plist version="1.0">

    You'll need to generate the API key for authentication.

  2. This file can either be mounted using -v or configured during build. A default plist has already been added to the container, so the Dockerfile can easily be forked.
  3. Run the container:
    docker run -it --name whdcli -v com.github.nmcspadden.whd-cli.plist:/whdcli/com.github.nmcspadden.whd-cli.plist nmcspadden/whdcli /usr/bin/python
  4. Inside the container, run Python to use it:

    import whdcli
    whd_prefs = whdcli.WHDPrefs("/whdcli/com.github.nmcspadden.whd-cli.plist")
    w = whdcli.WHD(whd_prefs, None, None, False)
    w.getDetailedAssetByAttribute('serialNumber','<serial number>', True)
    w.getAssetBySerial("<serial number>")`

Docker Pull Command
Source Repository