def discover(self):
        # Send list command to server and get response
        self.ctrl_sock.send_json(msgs.list_req())
        reply = self.ctrl_sock.recv_json()

        if reply["type"] != "list_reply":
            print "Error discovering objects: {}".format(reply)
            return False

        # 'self.objects' is a dict indexed by object name, whose values
        # are lists of method names.
        self.objects = reply["objects"]

        # Creates/updates CtrlClient instance vars, giving them the
        # names of exported objects. Each stores an ApiClass that acts
        # as a local representation of that object (including its
        # exported methods).
        for obj_name, methods in self.objects.items():
            setattr(self, obj_name, ApiClass(
                self.ctrl_sock, obj_name, methods))
Perform a gluster --xml command and log result.
dataset/ETHPy150Open IEEERobotics/bot/bot/client/ctrl_client.py/CtrlClient.discover--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/glusterfs.py/_gluster_xml