def prepareDatasetMigrationList(self, conn, request):
        """
        Prepare the ordered lists of blocks based on input DATASET (note Block is different)
            1. Get list of blocks from source
            2. Check and see if these blocks are already at DST
            3. Check if dataset has parents
            4. Check if parent blocks are already at DST

        """
        ordered_dict = {}
        order_counter = 0
        srcdataset = request["migration_input"]
        url = request["migration_url"]
        try:
            tmp_ordered_dict = self.processDatasetBlocks(url, conn,
                                            srcdataset, order_counter)
            if tmp_ordered_dict != {}:
                ordered_dict.update(tmp_ordered_dict)
		self.logger.debug("ordered_dict length at level %s" %order_counter)
		self.logger.debug(len(ordered_dict))
            else:
                #return {}
                m = 'Requested dataset %s is already in destination' %srcdataset
                dbsExceptionHandler('dbsException-invalid-input2', message=m, serverError=m)
            # Now process the parent datasets
            parent_ordered_dict = self.getParentDatasetsOrderedList(url, conn,
                                                srcdataset, order_counter+1)
            if parent_ordered_dict != {}:
                ordered_dict.update(parent_ordered_dict)
		self.logger.debug("***** parent ordered_dict length at level %s ******" %(order_counter+1))
		self.logger.debug(len(ordered_dict))
            return remove_duplicated_items(ordered_dict)
        except dbsException:
            raise
        except Exception as ex:
            if 'urlopen error' in str(ex):
                message='Connection to source DBS server refused. Check your source url.'
            elif 'Bad Request' in str(ex):
                message='cannot get data from the source DBS server. Check your migration input.'
            else:
                message='Failed to make a dataset migration list.'
            dbsExceptionHandler('dbsException-invalid-input2', \
                serverError="""DBSMigrate/prepareDatasetMigrationList failed
                to prepare ordered block list: %s""" %str(ex), message=message)