def filter_vms_with_filter_config_file(self, src_data_list):
        loaded_data = self.load_file(self.filter_file_path)
        filter_dict = loaded_data[0]

        current_data_list = list(src_data_list)
        popped_vm_list = []

        if 'tenants' in filter_dict:
            filtered_vms_by_tenant = []
            for vm in current_data_list:
                if vm.tenant_id in filter_dict['tenants']['tenant_id']:
                    filtered_vms_by_tenant.append(vm)
                else:
                    popped_vm_list.append(vm)
            current_data_list = filtered_vms_by_tenant

        if 'instances' in filter_dict:
            filtered_vms_by_id = []
            for vm in current_data_list:
                if vm.id in filter_dict['instances']['id']:
                    filtered_vms_by_id.append(vm)
                else:
                    popped_vm_list.append(vm)
            current_data_list = filtered_vms_by_id

        return [current_data_list, popped_vm_list]
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry_devlab/cloudferry_devlab/tests/utils.py/FilteringUtils.filter_vms_with_filter_config_file/original