'Commit the candidate configuration.
Commit the entered configuration. Raise an error and return the failure
if the commit fails.
default:
command_string = commit
comment:
command_string = commit comment <comment>'

def commit(self, comment=u'', delay_factor=0.1):

    delay_factor = self.select_delay_factor(delay_factor)
    error_marker = u'Failed    to    generate    committed    config'
    command_string = u'commit'
    if comment:
        command_string += u'    comment    "{}"'.format(comment)
    output = self.config_mode()
    output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, delay_factor=delay_factor)
    if (error_marker in output):
        raise ValueError(u'Commit    failed    with    following    errors:\n\n{}'.format(output))
    return output
