'Commit the candidate configuration.
Commit the entered configuration. Raise an error and return the failure
if the commit fails.
Automatically enters configuration mode
default:
command_string = commit
(device_and_network or policy_and_objects or vsys or
no_vsys) and not partial:
Exception'

def commit(self, force=False, partial=False, device_and_network=False, policy_and_objects=False, vsys=u'', no_vsys=False, delay_factor=0.1):

    delay_factor = self.select_delay_factor(delay_factor)
    if ((device_and_network or policy_and_objects or vsys or no_vsys) and (not partial)):
        raise ValueError(u"'partial'    must    be    True    when    using    device_and_network    or    policy_and_objects    or    vsys    or    no_vsys.")
    command_string = u'commit'
    commit_marker = u'configuration    committed    successfully'
    if force:
        command_string += u'    force'
    if partial:
        command_string += u'    partial'
        if vsys:
            command_string += u'    {0}'.format(vsys)
        if device_and_network:
            command_string += u'    device-and-network'
        if policy_and_objects:
            command_string += u'    device-and-network'
        if no_vsys:
            command_string += u'    no-vsys'
        command_string += u'    excluded'
    output = self.config_mode()
    output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, expect_string=u'100%', delay_factor=delay_factor)
    if (commit_marker not in output.lower()):
        raise ValueError(u'Commit    failed    with    the    following    errors:\n\n{0}'.format(output))
    return output
