def execute(self, group, command, *args, **kwargs):
"""Executes the given command with MySQL protocol
Executes the given command with the given parameters.
Returns an iterator to navigate to navigate through the result set
returned by Fabric
"""
params = self.create_params(*args, **kwargs)
cmd = "CALL {0}.{1}({2})".format(group, command, params)
fab_set = None
try:
data = self._execute_cmd(cmd)
fab_set = FabricMySQLSet(data)
except (Fault, socket.error, InterfaceError) as exc:
msg = "Executing {group}.{command} failed: {error}".format(
group=group, command=command, error=str(exc))
raise InterfaceError(msg)
return fab_set
评论列表
文章目录