'Sends configuration commands to the remote device'

def load_config(self, config):

    (rc, out, err) = self.exec_command('configure')
    if (rc != 0):
        self._module.fail_json(msg='unable    to    enter    configuration    mode', output=to_text(err, errors='surrogate_then_replace'))
    msgs = []
    for cmd in config:
        (rc, out, err) = self.exec_command(cmd)
        if (rc != 0):
            self._module.fail_json(msg=to_text(err, errors='surrogate_then_replace'))
        elif out:
            msgs.append(out)
    self.exec_command('end')
    return msgs
