'Sends configuration commands to the remote device'

def configure(self, commands):

    if (not self.check_authorization()):
        self._module.fail_json(msg='configuration    operations    require    privilege    escalation')
    conn = get_connection(self)
    (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'))
    (rc, out, err) = self.send_config(commands)
    if (rc != 0):
        self._module.fail_json(msg=to_text(err, errors='surrogate_then_replace'))
    self.exec_command('end')
    return {}
