-
Notifications
You must be signed in to change notification settings - Fork 3
Basic Core Help Example
Chris Smith edited this page Feb 14, 2017
·
10 revisions
This sample invokes and displays the results of the “core help” remote command via the ePO DXL service. The “core help” command lists the remote commands that are exposed by the particular ePO server.
The majority of the sample code is shown below:
# The ePO unique identifier
EPO_UNIQUE_ID = "epo1"
# Create the client
with DxlClient(config) as client:
# Connect to the fabric
client.connect()
# Create the request
req = Request("/mcafee/service/epo/remote/{0}".format(EPO_UNIQUE_ID))
# Set the payload for the request (core.help remote command)
req.payload = \
json.dumps({
"command": "core.help",
"output": "verbose",
"params": {}
}).encode(encoding="utf-8")
# Send the request
res = client.sync_request(req)
if res.message_type != Message.MESSAGE_TYPE_ERROR:
# Display resulting payload
print res.payload.decode(encoding='utf-8')
else:
print "Error: {0} ({1}) ".format(res.error_message, str(res.error_code))McAfee ePolicy Orchestrator (ePO) DXL Python Service
Documentation
-
Release Documentation
- (Steps to install, configure, and run the service)
-
Docker Support
- (Steps to run the service in a Docker container)
Examples