Commit 7c28c575 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

ganeti.rpc: Convert to ganeti.serializer

This is one of the last places where the simplejson module is
used directly.

Reviewed-by: iustinp
parent ecfe9491
......@@ -35,11 +35,10 @@ import socket
import httplib
import logging
import simplejson
from ganeti import utils
from ganeti import objects
from ganeti import http
from ganeti import serializer
class Client:
......@@ -57,7 +56,7 @@ class Client:
def __init__(self, procedure, args):
self.procedure = procedure
self.args = args
self.body = simplejson.dumps(args)
self.body = serializer.DumpJson(args, indent=False)
self.port = utils.GetNodeDaemonPort()
self.nodepw = utils.GetNodeDaemonPassword()
......@@ -115,7 +114,7 @@ class Client:
for name, req in self.nc.iteritems():
if req.success and req.resp_status == http.HTTP_OK:
results[name] = simplejson.loads(req.resp_body)
results[name] = serializer.LoadJson(req.resp_body)
continue
if req.error:
......
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