mds_plugin/util.py
def create_bucket_import_pars(object_name_prefix, bucket_name, db_system_name,
                              compartment_id, config):
    """Creates the PARs needed for an import from a bucket

    Args:
        object_name_prefix (str): The prefix used for the object names
        bucket_name (str): The name of the bucket
        db_system_name (str): The name of the MySQL DB System
        compartment_id (str): The OCID of the compartment
        config (object): An OCI config object or None.
    """
    from mds_plugin import object_store

    par = object_store.create_bucket_object_par(
        bucket_object_name=f'{object_name_prefix}@.manifest.json',
        bucket_name=bucket_name,
        access_type="r",
        compartment_id=compartment_id,
        config=config,
        return_object=True)
    if par is None:
        print(f"Could not create PAR for manifest file. Operation cancelled.\n")

    progress_par = object_store.create_bucket_object_par(
        bucket_object_name=f'{object_name_prefix}@.{db_system_name}.progress',
        bucket_name=bucket_name,
        access_type="rw",
        compartment_id=compartment_id,
        config=config,
        return_object=True)
    if progress_par is None:
        print(f"Could not create PAR for progress file. Operation cancelled.\n")

    return par, progress_par
Creates the PARs needed for an import from a bucket

    Args:
        object_name_prefix (str): The prefix used for the object names
        bucket_name (str): The name of the bucket
        db_system_name (str): The name of the MySQL DB System
        compartment_id (str): The OCID of the compartment
        config (object): An OCI config object or None.
    
Creates the PARs needed for an import from a bucket
Creates the PARs needed for an import from a bucket
def create_bucket_import_pars(object_name_prefix, bucket_name, db_system_name,
                              compartment_id, config):
    from mds_plugin import object_store
    par = object_store.create_bucket_object_par(
        bucket_object_name=f'{object_name_prefix}@.manifest.json',
        bucket_name=bucket_name,
        access_type="r",
        compartment_id=compartment_id,
        config=config,
        return_object=True)
    if par is None:
        print(f"Could not create PAR for manifest file. Operation cancelled.\n")
    progress_par = object_store.create_bucket_object_par(
        bucket_object_name=f'{object_name_prefix}@.{db_system_name}.progress',
        bucket_name=bucket_name,
        access_type="rw",
        compartment_id=compartment_id,
        config=config,
        return_object=True)
    if progress_par is None:
        print(f"Could not create PAR for progress file. Operation cancelled.\n")
    return par, progress_par
def create_bucket_import_pars ( object_name_prefix , bucket_name , db_system_name , compartment_id , config ) : from mds_plugin import object_store par = object_store . create_bucket_object_par ( bucket_object_name = f'{object_name_prefix}@.manifest.json' , bucket_name = bucket_name , access_type = "r" , compartment_id = compartment_id , config = config , return_object = True ) if par is None : print ( f"Could not create PAR for manifest file. Operation cancelled.\n" ) progress_par = object_store . create_bucket_object_par ( bucket_object_name = f'{object_name_prefix}@.{db_system_name}.progress' , bucket_name = bucket_name , access_type = "rw" , compartment_id = compartment_id , config = config , return_object = True ) if progress_par is None : print ( f"Could not create PAR for progress file. Operation cancelled.\n" ) return par , progress_par
Creates the PARs needed for an import from a bucket
Creates the PARs needed for an import from a bucket
"""Creates the PARs needed for an import from a bucket

    Args:
        object_name_prefix (str): The prefix used for the object names
        bucket_name (str): The name of the bucket
        db_system_name (str): The name of the MySQL DB System
        compartment_id (str): The OCID of the compartment
        config (object): An OCI config object or None.
    """
object_name_prefix
The prefix used for the object names
The prefix used for the object names
bucket_name
The name of the bucket
The name of the bucket
db_system_name
The name of the MySQL DB System
The name of the MySQL DB System
compartment_id
The OCID of the compartment
The OCID of the compartment
config
An OCI config object or None.
An OCI config object or None .