Commit 14a6d2ec authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[5137] Command parameters added

parent 4530c9b8
......@@ -50,6 +50,13 @@ params.generateHeaders()
conn = kea_connector.KeaConnector()
# Load command processor
# @todo
# Read parameters from stdin (they're optional for some commands)
for line in sys.stdin:
params.params += line
try:
resp = conn.sendCA(params)
except Exception as e:
......
......@@ -16,6 +16,7 @@ class CARequest:
http_port = 0
command = ''
timeout = 0
params = ''
headers = {}
# Generates the content, out of specified command line
......@@ -23,7 +24,10 @@ class CARequest:
# @todo: Add support for parameters
# this stores the output in self.content
def generateBody(self):
self.content = '{"command": "' + self.command + '"}'
self.content = '{ "command": "' + self.command + '" '
if (len(self.params)):
self.content += self.params
self.content += '}'
# Generate HTTP headers
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment