From 992ca1558a8f364579a81c8088d1d8051e0e04c1 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 7 Mar 2017 22:31:51 +0100 Subject: [PATCH] [5137] Parameters generation fixed. --- src/bin/shell/kea_conn.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bin/shell/kea_conn.py b/src/bin/shell/kea_conn.py index d7791469c7..c41e739a63 100644 --- a/src/bin/shell/kea_conn.py +++ b/src/bin/shell/kea_conn.py @@ -24,10 +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 += '}' + self.content += ', "parameters": { ' + self.params + ' }' + self.content += ' }' # Generate HTTP headers # @@ -40,7 +40,7 @@ class CARequest: # This is a storage for generated command (input data to be sent over POST) content = '' - + # This class represents the HTTP response class CAResponse: @@ -67,4 +67,3 @@ class CAResponse: print(self.status) print(self.reason) print(self.body) - -- 2.47.3