def get_vs_if_shared_vip(self, avi_config, controller_version):
    '\n        This function checks if same vip is used for other vs\n        :param avi_config: avi config dict\n        :param controller_version:\n        :return: None\n        '
    vs_list = [v for v in avi_config['VirtualService'] if ('port_range_end' in v['services'][0])]
    for vs in vs_list:
        if (parse_version(controller_version) >= parse_version('17.1')):
            vs_port_list = [int(v['services'][0]['port']) for v in avi_config['VirtualService'] if ((v['vsvip_ref'].split('name=')[1].split('-')[0] == vs['vsvip_ref'].split('name=')[1].split('-')[0]) and ('port_range_end' not in v['services'][0]))]
        else:
            vs_port_list = [int(v['services'][0]['port']) for v in avi_config['VirtualService'] if ((v['ip_address']['addr'] == vs['ip_address']['addr']) and ('port_range_end' not in v['services'][0]))]
        if vs_port_list:
            min_port = min(vs_port_list)
            max_port = max(vs_port_list)
            vs['services'][0]['port_range_end'] = str((min_port - 1))
            service = {'enable_ssl': False, 'port': str((max_port + 1)), 'port_range_end': '65535'}
            vs['services'].append(service)
This function checks if same vip is used for other vs
:param avi_config: avi config dict
:param controller_version:
:return: None
def get_vs_if_shared_vip(self, avi_config, controller_version):
    '\n        This function checks if same vip is used for other vs\n        :param avi_config: avi config dict\n        :param controller_version:\n        :return: None\n        '
    vs_list = [v for v in avi_config['VirtualService'] if ('port_range_end' in v['services'][0])]
    for vs in vs_list:
        if (parse_version(controller_version) >= parse_version('17.1')):
            vs_port_list = [int(v['services'][0]['port']) for v in avi_config['VirtualService'] if ((v['vsvip_ref'].split('name=')[1].split('-')[0] == vs['vsvip_ref'].split('name=')[1].split('-')[0]) and ('port_range_end' not in v['services'][0]))]
        else:
            vs_port_list = [int(v['services'][0]['port']) for v in avi_config['VirtualService'] if ((v['ip_address']['addr'] == vs['ip_address']['addr']) and ('port_range_end' not in v['services'][0]))]
        if vs_port_list:
            min_port = min(vs_port_list)
            max_port = max(vs_port_list)
            vs['services'][0]['port_range_end'] = str((min_port - 1))
            service = {'enable_ssl': False, 'port': str((max_port + 1)), 'port_range_end': '65535'}
            vs['services'].append(service)