From d7644474598f79d3711a5c8ee84405d1561343b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Tue, 21 Jun 2011 17:41:13 +0200 Subject: [PATCH] Marshall/unmarshall parameter. It is required in order to pass values like None. --- master/product/Vifib/Tool/SlapTool.py | 2 ++ slapos/slap/slap.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/master/product/Vifib/Tool/SlapTool.py b/master/product/Vifib/Tool/SlapTool.py index a5c2f9960..6ab9ee3b9 100644 --- a/master/product/Vifib/Tool/SlapTool.py +++ b/master/product/Vifib/Tool/SlapTool.py @@ -578,6 +578,8 @@ class SlapTool(BaseTool): In any other case returns not important data and HTTP code is 403 Forbidden """ + if state: + state = xml_marshaller.xml_marshaller.loads(state) if state is None: state = 'started' if shared_xml: diff --git a/slapos/slap/slap.py b/slapos/slap/slap.py index 84bdc7481..cdf8ae5e8 100644 --- a/slapos/slap/slap.py +++ b/slapos/slap/slap.py @@ -307,7 +307,7 @@ class ComputerPartition(SlapDocument): 'partition_parameter_xml': xml_marshaller.dumps( partition_parameter_kw), 'filter_xml': xml_marshaller.dumps(filter_kw), - 'state': state, + 'state': xml_marshaller.dumps(state), } self._connection_helper.POST('/requestComputerPartition', request_dict) xml = self._connection_helper.response.read() -- 2.30.9