Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
992ca155
Commit
992ca155
authored
Mar 07, 2017
by
Tomek Mrugalski
🛰
Browse files
[5137] Parameters generation fixed.
parent
2939c088
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/shell/kea_conn.py
View file @
992ca155
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment