|
24 | 24 | import time
|
25 | 25 | import subprocess
|
26 | 26 | import traceback
|
27 |
| -import uuid |
28 | 27 | import pprint
|
29 | 28 | from concurrent.futures import ProcessPoolExecutor
|
30 | 29 | from pathlib import Path
|
|
109 | 108 | from sdcm.send_email import get_running_instances_for_email_report, read_email_data_from_file, build_reporter, \
|
110 | 109 | send_perf_email
|
111 | 110 | from sdcm.parallel_timeline_report.generate_pt_report import ParallelTimelinesReportGenerator
|
112 |
| -from sdcm.utils.aws_utils import AwsArchType, is_using_aws_mock |
| 111 | +from sdcm.utils.aws_utils import AwsArchType |
113 | 112 | from sdcm.utils.aws_okta import try_auth_with_okta
|
114 | 113 | from sdcm.utils.gce_utils import SUPPORTED_PROJECTS, gce_public_addresses
|
115 | 114 | from sdcm.utils.context_managers import environment
|
|
119 | 118 | import sdcm.provision.azure.utils as azure_utils
|
120 | 119 | from utils.build_system.create_test_release_jobs import JenkinsPipelines # pylint: disable=no-name-in-module,import-error
|
121 | 120 | from utils.get_supported_scylla_base_versions import UpgradeBaseVersion # pylint: disable=no-name-in-module,import-error
|
122 |
| -from utils.mocks.aws_mock import AwsMock # pylint: disable=no-name-in-module,import-error |
123 | 121 |
|
124 | 122 |
|
125 | 123 | SUPPORTED_CLOUDS = ("aws", "gce", "azure",)
|
@@ -196,11 +194,10 @@ def cli():
|
196 | 194 | disable_loggers_during_startup()
|
197 | 195 | try_auth_with_okta()
|
198 | 196 |
|
199 |
| - if not is_using_aws_mock(): |
200 |
| - key_store = KeyStore() |
201 |
| - # TODO: still leaving old keys, until we'll rebuild runner images - and reconfigure jenkins |
202 |
| - key_store.sync(keys=['scylla-qa-ec2', 'scylla-test', 'scylla_test_id_ed25519'], |
203 |
| - local_path=Path('~/.ssh/').expanduser(), permissions=0o0600) |
| 197 | + key_store = KeyStore() |
| 198 | + # TODO: still leaving old keys, until we'll rebuild runner images - and reconfigure jenkins |
| 199 | + key_store.sync(keys=['scylla-qa-ec2', 'scylla-test', 'scylla_test_id_ed25519'], |
| 200 | + local_path=Path('~/.ssh/').expanduser(), permissions=0o0600) |
204 | 201 |
|
205 | 202 | docker_hub_login(remoter=LOCALRUNNER)
|
206 | 203 |
|
@@ -1643,40 +1640,6 @@ def clean_runner_instances(runner_ip, test_status, backend, dry_run, force):
|
1643 | 1640 | test_runner_ip=runner_ip, test_status=test_status, backend=backend, dry_run=dry_run, force=force)
|
1644 | 1641 |
|
1645 | 1642 |
|
1646 |
| -@cli.command("run-aws-mock", help="Start AWS Mock server Docker container") |
1647 |
| -@click.option( |
1648 |
| - "-r", "--mock-region", |
1649 |
| - required=True, |
1650 |
| - multiple=True, |
1651 |
| - type=CloudRegion(cloud_provider="aws"), |
1652 |
| - help="Mock this AWS region", |
1653 |
| -) |
1654 |
| -@click.option("-f", "--force", is_flag=True, default=False, help="don't check aws_mock_ip") |
1655 |
| -@click.option("-t", "--test-id", required=False, help="SCT Test ID") |
1656 |
| -def run_aws_mock(mock_region: list[str], force: bool = False, test_id: str | None = None) -> None: |
1657 |
| - add_file_logger() |
1658 |
| - if test_id is None: |
1659 |
| - test_id = str(uuid.uuid4()) |
1660 |
| - aws_mock_ip = AwsMock(test_id=test_id, regions=mock_region).run(force=force) |
1661 |
| - LOGGER.info("New mock for %r AWS regions started and listen on %s:443 (TestId=%s)", |
1662 |
| - mock_region, aws_mock_ip, test_id) |
1663 |
| - |
1664 |
| - |
1665 |
| -@cli.command("clean-aws-mocks", help="Clean running AWS mock Docker containers") |
1666 |
| -@click.option("-t", "--test-id", required=False, help="Clean AWS Mock container for test id") |
1667 |
| -@click.option( |
1668 |
| - "-a", "--all", "all_mocks", |
1669 |
| - is_flag=True, |
1670 |
| - default=False, |
1671 |
| - help="Clean all AWS Mock containers running on this host", |
1672 |
| -) |
1673 |
| -@click.option('--verbose', is_flag=True, default=False, help="if enable, will log progress") |
1674 |
| -@click.option("--dry-run", is_flag=True, default=False, help="dry run") |
1675 |
| -def clean_aws_mocks(test_id: str | None, all_mocks: bool, verbose: bool, dry_run: bool) -> None: |
1676 |
| - add_file_logger() |
1677 |
| - AwsMock.clean(test_id=test_id, all_mocks=all_mocks, verbose=verbose, dry_run=dry_run) |
1678 |
| - |
1679 |
| - |
1680 | 1643 | @cli.command("generate-pt-report", help="Generate parallel timelines representation for the SCT test events")
|
1681 | 1644 | @click.option("-t", "--test-id", envvar='SCT_TEST_ID', help="Test ID to search in sct-results")
|
1682 | 1645 | @click.option("-d", "--logdir", envvar='HOME', type=click.Path(exists=True),
|
|
0 commit comments