mds_plugin/object_store.py
def upload_file_from_list_to_bucket(index, upload_manager, files,
                                    namespace_name, bucket_name,
                                    object_name_prefix):
    """Uploads a file from a file list

    Args:
        index (int): The thread index, specifying which files from the list to 
            upload
        upload_manager (object): An oci upload_manager instance
        files (list): The list of filenames as strings
        namespace_name (str): The OCI object store namespace of the tenancy
        bucket_name (str): The name of the bucket to upload to

    Returns:
       None
    """
    import os.path

    if object_name_prefix is None:
        object_name_prefix = ""

    for file_name in files:
        if hash(file_name) % NTHREAD == index:
            file_size = sizeof_fmt(os.path.getsize(file_name))
            object_name = object_name_prefix + os.path.basename(file_name)
            print(f"{object_name} ({file_size}) ...")

            upload_manager.upload_file(
                namespace_name=namespace_name, bucket_name=bucket_name,
                object_name=object_name,
                file_path=file_name)
Uploads a file from a file list

    Args:
        index (int): The thread index, specifying which files from the list to 
            upload
        upload_manager (object): An oci upload_manager instance
        files (list): The list of filenames as strings
        namespace_name (str): The OCI object store namespace of the tenancy
        bucket_name (str): The name of the bucket to upload to

    Returns:
       None
    
Uploads a file from a file list
Uploads a file from a file list
def upload_file_from_list_to_bucket(index, upload_manager, files,
                                    namespace_name, bucket_name,
                                    object_name_prefix):
    import os.path
    if object_name_prefix is None:
        object_name_prefix = ""
    for file_name in files:
        if hash(file_name) % NTHREAD == index:
            file_size = sizeof_fmt(os.path.getsize(file_name))
            object_name = object_name_prefix + os.path.basename(file_name)
            print(f"{object_name} ({file_size}) ...")
            upload_manager.upload_file(
                namespace_name=namespace_name, bucket_name=bucket_name,
                object_name=object_name,
                file_path=file_name)
def upload_file_from_list_to_bucket ( index , upload_manager , files , namespace_name , bucket_name , object_name_prefix ) : import os . path if object_name_prefix is None : object_name_prefix = "" for file_name in files : if hash ( file_name ) % NTHREAD == index : file_size = sizeof_fmt ( os . path . getsize ( file_name ) ) object_name = object_name_prefix + os . path . basename ( file_name ) print ( f"{object_name} ({file_size}) ..." ) upload_manager . upload_file ( namespace_name = namespace_name , bucket_name = bucket_name , object_name = object_name , file_path = file_name )
Uploads a file from a file list
Uploads a file from a file list
"""Uploads a file from a file list

    Args:
        index (int): The thread index, specifying which files from the list to 
            upload
        upload_manager (object): An oci upload_manager instance
        files (list): The list of filenames as strings
        namespace_name (str): The OCI object store namespace of the tenancy
        bucket_name (str): The name of the bucket to upload to

    Returns:
       None
    """
None
index
The thread index, specifying which files from the list to
upload
The thread index specifying which files from the list to upload
upload_manager
An oci upload_manager instance
An oci upload_manager instance
files
The list of filenames as strings
The list of filenames as strings
namespace_name
The OCI object store namespace of the tenancy
The OCI object store namespace of the tenancy
bucket_name
The name of the bucket to upload to
The name of the bucket to upload to
object_name_prefix