tests.system.amazon.aws.example_dms

Note: DMS requires you to configure specific IAM roles/permissions. For more information, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.APIRole

Attributes

DAG_ID

SUBNET_GROUP_KEY

SECURITY_GROUP_KEY

REPLICATION_SUBNET_GROUP_KEY

sys_test_context_task

RDS_ENGINE

RDS_PROTOCOL

RDS_USERNAME

RDS_PASSWORD

TABLE_HEADERS

SAMPLE_DATA

test_context

test_run

Functions

create_security_group(security_group_name, vpc_id[, ...])

build_rds_kwargs(db_name, engine_version, ...[, ...])

Assemble the kwargs for RdsCreateDbInstanceOperator at runtime.

create_db_parameter_group(parameter_group_name)

create_sample_table(instance_name, db_name, table_name)

create_target_database(instance_name, source_db_name, ...)

await_table_load(replication_task_arn, schema_name, ...)

create_dms_assets(source_db_name, target_db_name, ...)

delete_dms_assets(replication_instance_arn, ...)

print_and_delete_dms_task_logs(log_group_name)

Copy the DMS task logs into this task's log, then delete their CloudWatch log group.

delete_security_group(security_group_id, ...[, ...])

delete_db_parameter_group(parameter_group_name)

Module Contents

tests.system.amazon.aws.example_dms.DAG_ID = 'example_dms'[source]
tests.system.amazon.aws.example_dms.SUBNET_GROUP_KEY = 'SUBNET_GROUP'[source]
tests.system.amazon.aws.example_dms.SECURITY_GROUP_KEY = 'SECURITY_GROUP'[source]
tests.system.amazon.aws.example_dms.REPLICATION_SUBNET_GROUP_KEY = 'REPLICATION_SUBNET_GROUP'[source]
tests.system.amazon.aws.example_dms.sys_test_context_task[source]
tests.system.amazon.aws.example_dms.RDS_ENGINE = 'postgres'[source]
tests.system.amazon.aws.example_dms.RDS_PROTOCOL = 'postgresql'[source]
tests.system.amazon.aws.example_dms.RDS_USERNAME = 'username'[source]
tests.system.amazon.aws.example_dms.RDS_PASSWORD = 'rds_password'[source]
tests.system.amazon.aws.example_dms.TABLE_HEADERS = ['apache_project', 'release_year'][source]
tests.system.amazon.aws.example_dms.SAMPLE_DATA = [('Airflow', '2015'), ('OpenOffice', '2012'), ('Subversion', '2000'), ('NiFi', '2006')][source]
tests.system.amazon.aws.example_dms.create_security_group(security_group_name, vpc_id, existing_security_group=None)[source]
tests.system.amazon.aws.example_dms.build_rds_kwargs(db_name, engine_version, parameter_group_name, security_group_id, subnet_group=None)[source]

Assemble the kwargs for RdsCreateDbInstanceOperator at runtime.

When a DB subnet group is provided via the test context, the instance is placed in it (e.g. private subnets reachable by the test runner), otherwise it lands in the default VPC.

tests.system.amazon.aws.example_dms.create_db_parameter_group(parameter_group_name)[source]
tests.system.amazon.aws.example_dms.create_sample_table(instance_name, db_name, table_name)[source]
tests.system.amazon.aws.example_dms.create_target_database(instance_name, source_db_name, target_db_name)[source]
tests.system.amazon.aws.example_dms.await_table_load(replication_task_arn, schema_name, table_name)[source]
tests.system.amazon.aws.example_dms.create_dms_assets(source_db_name, target_db_name, instance_name, replication_instance_name, source_endpoint_identifier, target_endpoint_identifier, replication_subnet_group=None)[source]
tests.system.amazon.aws.example_dms.delete_dms_assets(replication_instance_arn, source_endpoint_arn, target_endpoint_arn, source_endpoint_identifier, target_endpoint_identifier, replication_instance_name)[source]
tests.system.amazon.aws.example_dms.print_and_delete_dms_task_logs(log_group_name)[source]

Copy the DMS task logs into this task’s log, then delete their CloudWatch log group.

Runs after the replication instance is deleted, so DMS has finished shipping the task logs.

tests.system.amazon.aws.example_dms.delete_security_group(security_group_id, security_group_name, existing_security_group=None)[source]
tests.system.amazon.aws.example_dms.delete_db_parameter_group(parameter_group_name)[source]
tests.system.amazon.aws.example_dms.test_context = None[source]
tests.system.amazon.aws.example_dms.test_run[source]

Was this entry helpful?