def extract_blueprint_archive_to_mgr(archive_path, destination_root):
    # Importing this archives in the global scope causes import loop
    from manager_rest.resources import SUPPORTED_ARCHIVE_TYPES
    # extract application to file server
    tempdir = tempfile.mkdtemp('-blueprint-submit')
    try:
        try:
            archive_util.unpack_archive(archive_path, tempdir)
        except archive_util.UnrecognizedFormat:
            raise manager_exceptions.BadParametersError(
                    'Blueprint archive is of an unrecognized format. '
                    'Supported formats are: {0}'.format(
                            SUPPORTED_ARCHIVE_TYPES))
        archive_file_list = listdir(tempdir)
        if len(archive_file_list) != 1 or not path.isdir(
                path.join(tempdir, archive_file_list[0])):
            raise manager_exceptions.BadParametersError(
                    'archive must contain exactly 1 directory')
        application_dir_base_name = archive_file_list[0]
        # generating temporary unique name for app dir, to allow multiple
        # uploads of apps with the same name (as it appears in the file
        # system, not the app name field inside the blueprint.
        # the latter is guaranteed to be unique).
        generated_app_dir_name = '{0}-{1}'.format(
                application_dir_base_name, uuid.uuid4())
        temp_application_dir = path.join(tempdir,
                                         application_dir_base_name)
        temp_application_target_dir = path.join(tempdir,
                                                generated_app_dir_name)
        shutil.move(temp_application_dir, temp_application_target_dir)
        shutil.move(temp_application_target_dir, destination_root)
        return generated_app_dir_name
    finally:
        shutil.rmtree(tempdir)
Returns a list of filenames for 
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/rest-service/manager_rest/utils.py/extract_blueprint_archive_to_mgr--crossover with--dataset/ETHPy150Open jesolem/PCV/PCV/tools/imtools.py/get_imlist