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

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

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