+ def _MultiNodeCall(self, node_list, procedure, args):
+ """Helper for making a multi-node call
+
+ """
+ body = serializer.DumpJson(args, indent=False)
+ c = Client(procedure, body, self.port)
+ skip_dict = self._ConnectList(c, node_list, procedure)
+ skip_dict.update(c.GetResults())
+ return skip_dict
+
+ @classmethod
+ def _StaticMultiNodeCall(cls, node_list, procedure, args,
+ address_list=None):
+ """Helper for making a multi-node static call
+
+ """
+ body = serializer.DumpJson(args, indent=False)
+ c = Client(procedure, body, utils.GetDaemonPort(constants.NODED))
+ c.ConnectList(node_list, address_list=address_list)
+ return c.GetResults()
+
+ def _SingleNodeCall(self, node, procedure, args):
+ """Helper for making a single-node call
+
+ """
+ body = serializer.DumpJson(args, indent=False)
+ c = Client(procedure, body, self.port)
+ result = self._ConnectNode(c, node, procedure)
+ if result is None:
+ # we did connect, node is not offline
+ result = c.GetResults()[node]
+ return result
+
+ @classmethod
+ def _StaticSingleNodeCall(cls, node, procedure, args):
+ """Helper for making a single-node static call
+
+ """
+ body = serializer.DumpJson(args, indent=False)
+ c = Client(procedure, body, utils.GetDaemonPort(constants.NODED))
+ c.ConnectNode(node)
+ return c.GetResults()[node]
+
+ @staticmethod
+ def _Compress(data):
+ """Compresses a string for transport over RPC.
+
+ Small amounts of data are not compressed.
+
+ @type data: str
+ @param data: Data
+ @rtype: tuple
+ @return: Encoded data to send
+
+ """
+ # Small amounts of data are not compressed
+ if len(data) < 512:
+ return (constants.RPC_ENCODING_NONE, data)
+
+ # Compress with zlib and encode in base64
+ return (constants.RPC_ENCODING_ZLIB_BASE64,
+ base64.b64encode(zlib.compress(data, 3)))
+
+ #
+ # Begin RPC calls
+ #
+
+ def call_lv_list(self, node_list, vg_name):