opendxl / opendxl-epo-client-python

McAfee ePolicy Orchestrator (ePO) client library for use with the OpenDXL Python Client
Apache License 2.0
6 stars 5 forks source link

Added ability to use DXL 5 ePO commands service #8

Closed jbarlow-mcafee closed 6 years ago

jbarlow-mcafee commented 6 years ago

This commit adds the ability for the ePO Python client to be able to make remote commands to the ePO 'commands' service, which is being added to the DXL ePO extensions for DXL 5. This commit retains the ability to use the ePO 'remote' service, which is hosted by the standalone DXL ePO Python service, for making remote commands. When an ePO unique id is not provided to the client, the client will search for an ePO 'commands' service, falling back to looking for a 'remote' service if no 'commands' service can be found.

An Exception is raised if an attempt is made to perform a remote command with a non-JSON output format when the target service is a DXL 'commands' service, since this service only supports the JSON output format. The help() method, however, can still be called with an output format of 'verbose'. In this case, the output format requested from the server is JSON. The method flattens the return array into plain text, delimited by line separators, for backward compatibility.

I've published the Sphinx/pydoc changes on this PR to my fork here for preview. This includes the new Authorization page which describes client authorization when using the ePO commands service.