def vs_redirect_http_to_https(self, avi_config, sysdict):
    '\n        Removes the VS which is redirected to another VS amd update the\n        status and avi object for that VS\n        :param avi_config: avi configuration after all conversion\n        :param sysdict: system configuration\n        :return:\n        '
    vsrem = {}
    LOG.debug('Check started for redirect from HTTP VS to HTTPS VS with no pool')
    for vs in avi_config['VirtualService']:
        if ((not vs.get('pool_group_ref')) and (not vs.get('application_profile_ref')) and vs.get('services', []) and (not all([s.get('enable_ssl', True) for s in vs['services']])) and vs.get('http_policies', []) and vs['http_policies'][0].get('http_policy_set_ref')):
            polname = self.get_name(vs['http_policies'][0]['http_policy_set_ref'])
            pol = [pl for pl in avi_config['HTTPPolicySet'] if (pl['name'] == polname)]
            if (pol and pol[0].get('http_request_policy', {}).get('rules', []) and pol[0]['http_request_policy']['rules'][0].get('redirect_action')):
                iplist = ([ip['ip_address']['addr'] for ip in vs.get('vip', []) if ip.get('ip_address', {}).get('addr')] or ([vs['ip_address']['addr']] if vs.get('ip_address', {}).get('addr') else []))
                if iplist:
                    for nvs in avi_config['VirtualService']:
                        if ((vs['name'] != nvs['name']) and [ip for ip in iplist if (ip in ([nip['ip_address']['addr'] for nip in nvs.get('vip', []) if nip.get('ip_address', {}).get('addr')] or [(nvs['ip_address']['addr'] if nvs.get('ip_address', {}).get('addr') else [])]))]):
                            appname = (self.get_name(nvs['application_profile_ref']) if nvs.get('application_profile_ref') else None)
                            if (appname == 'ns-migrate-http'):
                                LOG.debug(('%s has redirect to %s, hence removing %s' % (vs['name'], nvs['name'], vs['name'])))
                                vsrem[vs['name']] = nvs['name']
                            appprof = [pr for pr in (avi_config['ApplicationProfile'] + sysdict['ApplicationProfile']) if (pr['name'] == appname)]
                            if (appprof and (appprof[0]['type'] == 'APPLICATION_PROFILE_TYPE_HTTP')):
                                if appprof[0].get('http_profile'):
                                    appprof[0]['http_profile']['http_to_https'] = True
                                else:
                                    appprof[0]['http_profile'] = {'http_to_https': True}
                                LOG.debug(("%s has redirect to %s, hence setting 'http_to_https' as true and removing %s" % (vs['name'], nvs['name'], vs['name'])))
                                vsrem[vs['name']] = nvs['name']
                            if ([True for ssl in nvs['services'] if ssl['enable_ssl']] and [True for ssl_vs in vs['services'] if (not ssl_vs['enable_ssl'])]):
                                nvs['services'].append(vs['services'][0])
                                vsrem[vs['name']] = nvs['name']
    LOG.debug('Check completed for redirect from HTTP VS to HTTPS VS with no pool')
    if vsrem:
        avi_config['VirtualService'] = [v for v in avi_config['VirtualService'] if (v['name'] not in vsrem.keys())]
        LOG.debug(('%s VS got removed from AVI configuration' % str(len(vsrem))))
        for cl in csv_writer_dict_list:
            if ((cl['Object Name'] in vsrem.keys()) and (cl['Netscaler Command'] in ['add lb vserver', 'add cs vserver'])):
                cl['Status'] = STATUS_INDIRECT
                cl['AVI Object'] = ('Redirected to %s' % vsrem[cl['Object Name']])
Removes the VS which is redirected to another VS amd update the
status and avi object for that VS
:param avi_config: avi configuration after all conversion
:param sysdict: system configuration
:return:
def vs_redirect_http_to_https(self, avi_config, sysdict):
    '\n        Removes the VS which is redirected to another VS amd update the\n        status and avi object for that VS\n        :param avi_config: avi configuration after all conversion\n        :param sysdict: system configuration\n        :return:\n        '
    vsrem = {}
    LOG.debug('Check started for redirect from HTTP VS to HTTPS VS with no pool')
    for vs in avi_config['VirtualService']:
        if ((not vs.get('pool_group_ref')) and (not vs.get('application_profile_ref')) and vs.get('services', []) and (not all([s.get('enable_ssl', True) for s in vs['services']])) and vs.get('http_policies', []) and vs['http_policies'][0].get('http_policy_set_ref')):
            polname = self.get_name(vs['http_policies'][0]['http_policy_set_ref'])
            pol = [pl for pl in avi_config['HTTPPolicySet'] if (pl['name'] == polname)]
            if (pol and pol[0].get('http_request_policy', {}).get('rules', []) and pol[0]['http_request_policy']['rules'][0].get('redirect_action')):
                iplist = ([ip['ip_address']['addr'] for ip in vs.get('vip', []) if ip.get('ip_address', {}).get('addr')] or ([vs['ip_address']['addr']] if vs.get('ip_address', {}).get('addr') else []))
                if iplist:
                    for nvs in avi_config['VirtualService']:
                        if ((vs['name'] != nvs['name']) and [ip for ip in iplist if (ip in ([nip['ip_address']['addr'] for nip in nvs.get('vip', []) if nip.get('ip_address', {}).get('addr')] or [(nvs['ip_address']['addr'] if nvs.get('ip_address', {}).get('addr') else [])]))]):
                            appname = (self.get_name(nvs['application_profile_ref']) if nvs.get('application_profile_ref') else None)
                            if (appname == 'ns-migrate-http'):
                                LOG.debug(('%s has redirect to %s, hence removing %s' % (vs['name'], nvs['name'], vs['name'])))
                                vsrem[vs['name']] = nvs['name']
                            appprof = [pr for pr in (avi_config['ApplicationProfile'] + sysdict['ApplicationProfile']) if (pr['name'] == appname)]
                            if (appprof and (appprof[0]['type'] == 'APPLICATION_PROFILE_TYPE_HTTP')):
                                if appprof[0].get('http_profile'):
                                    appprof[0]['http_profile']['http_to_https'] = True
                                else:
                                    appprof[0]['http_profile'] = {'http_to_https': True}
                                LOG.debug(("%s has redirect to %s, hence setting 'http_to_https' as true and removing %s" % (vs['name'], nvs['name'], vs['name'])))
                                vsrem[vs['name']] = nvs['name']
                            if ([True for ssl in nvs['services'] if ssl['enable_ssl']] and [True for ssl_vs in vs['services'] if (not ssl_vs['enable_ssl'])]):
                                nvs['services'].append(vs['services'][0])
                                vsrem[vs['name']] = nvs['name']
    LOG.debug('Check completed for redirect from HTTP VS to HTTPS VS with no pool')
    if vsrem:
        avi_config['VirtualService'] = [v for v in avi_config['VirtualService'] if (v['name'] not in vsrem.keys())]
        LOG.debug(('%s VS got removed from AVI configuration' % str(len(vsrem))))
        for cl in csv_writer_dict_list:
            if ((cl['Object Name'] in vsrem.keys()) and (cl['Netscaler Command'] in ['add lb vserver', 'add cs vserver'])):
                cl['Status'] = STATUS_INDIRECT
                cl['AVI Object'] = ('Redirected to %s' % vsrem[cl['Object Name']])