library/ceph_pool.py
def compare_pool_config(user_pool_config, running_pool_details):
    '''
    Compare user input config pool details with current running pool details
    '''

    delta = {}
    filter_keys = ['pg_num', 'pg_placement_num', 'size',
                   'pg_autoscale_mode', 'target_size_ratio']
    for key in filter_keys:
        if (str(running_pool_details[key]) != user_pool_config[key]['value'] and  # noqa: E501
                user_pool_config[key]['value']):
            delta[key] = user_pool_config[key]

    if (running_pool_details['application'] !=
            user_pool_config['application']['value'] and
            user_pool_config['application']['value']):
        delta['application'] = {}
        delta['application']['new_application'] = user_pool_config['application']['value']  # noqa: E501
        # to be improved (for update_pools()...)
        delta['application']['value'] = delta['application']['new_application']
        delta['application']['old_application'] = running_pool_details['application']  # noqa: E501

    return delta

    Compare user input config pool details with current running pool details
    
Compare user input config pool details with current running pool details
Compare user input config pool details with current running pool details
def compare_pool_config(user_pool_config, running_pool_details):
    delta = {}
    filter_keys = ['pg_num', 'pg_placement_num', 'size',
                   'pg_autoscale_mode', 'target_size_ratio']
    for key in filter_keys:
        if (str(running_pool_details[key]) != user_pool_config[key]['value'] and  
                user_pool_config[key]['value']):
            delta[key] = user_pool_config[key]
    if (running_pool_details['application'] !=
            user_pool_config['application']['value'] and
            user_pool_config['application']['value']):
        delta['application'] = {}
        delta['application']['new_application'] = user_pool_config['application']['value']  
        delta['application']['value'] = delta['application']['new_application']
        delta['application']['old_application'] = running_pool_details['application']  
    return delta
def compare_pool_config ( user_pool_config , running_pool_details ) : delta = { } filter_keys = [ 'pg_num' , 'pg_placement_num' , 'size' , 'pg_autoscale_mode' , 'target_size_ratio' ] for key in filter_keys : if ( str ( running_pool_details [ key ] ) != user_pool_config [ key ] [ 'value' ] and user_pool_config [ key ] [ 'value' ] ) : delta [ key ] = user_pool_config [ key ] if ( running_pool_details [ 'application' ] != user_pool_config [ 'application' ] [ 'value' ] and user_pool_config [ 'application' ] [ 'value' ] ) : delta [ 'application' ] = { } delta [ 'application' ] [ 'new_application' ] = user_pool_config [ 'application' ] [ 'value' ] delta [ 'application' ] [ 'value' ] = delta [ 'application' ] [ 'new_application' ] delta [ 'application' ] [ 'old_application' ] = running_pool_details [ 'application' ] return delta
Compare user input config pool details with current running pool details
Compare user input config pool details with current running pool details
'''
    Compare user input config pool details with current running pool details
    ''' # noqa: E501 # noqa: E501 # to be improved (for update_pools()...) # noqa: E501
user_pool_config
running_pool_details