'Create staticmethods for each command in command_list using setattr and the
result_parser
:param result_parser: function that generates functions that parse the result of command.
:type result_parser: function
:param command_list: list of all the commands, e.g. start, stop, restart, etc.
:type command_list: list'

def __init__(self, result_parser, command_list=COMMANDS):

    self.commands = command_list
    for command in self.commands:
        setattr(self, command, result_parser(command))
