def config_control():

    result = True
    comment = ''

    changed, not_changed_reason = config_changed()
    if not changed:
        return (changed, not_changed_reason)

    # config changed, thus let's try to commit
    try_commit = commit()
    if not try_commit.get('result'):
        result = False
        comment = 'Unable to commit the changes: {reason}.\n\
        Will try to rollback now!'.format(
            reason=try_commit.get('comment')
        )
        try_rollback = rollback()
        if not try_rollback.get('result'):
            comment += '\nCannot rollback! {reason}'.format(
                reason=try_rollback.get('comment')
            )

    return result, comment

# <---- Configuration specific functions -------------------------------------------------------------------------------
Asserts the "like"-ness of `topic` and `expected` as strings.
dataset/ETHPy150Open saltstack/salt/salt/modules/napalm_network.py/config_control--crossover with--dataset/ETHPy150Open heynemann/preggy/preggy/assertions/like.py/_compare_strings