diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/cli.py b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/cli.py index 2dac90832c..039c564cf9 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/cli.py +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/cli.py @@ -311,6 +311,7 @@ def get_metrics_data_cmd(ctx, component, metric_name, statistic, lookback): # ##################### UTILITIES ################### + @cli.command() @click.option( "--config-file", default="/etc/migration_services.yaml", help="Path to config file" @@ -348,16 +349,16 @@ def completion(ctx, config_file, json, shell): try: completion_script = completion_class(lambda: cli(ctx, config_file, json), - {}, - "console", + {}, + "console", "_CONSOLE_COMPLETE").source() click.echo(completion_script) except RuntimeError as exc: click.echo(f"Error: {exc}", err=True) ctx.exit(1) + ################################################# if __name__ == "__main__": cli() - diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/snapshot.py b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/snapshot.py index 13a551e049..b86aa56d4a 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/snapshot.py +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/snapshot.py @@ -106,6 +106,9 @@ def create(self, *args, **kwargs) -> CommandResult: command.append("--target-insecure") if not wait: command.append("--no-wait") + if max_snapshot_rate_mb_per_node is not None: + command.extend(["--max-snapshot-rate-mb-per-node", + str(max_snapshot_rate_mb_per_node)]) logger.info(f"Creating snapshot with command: {' '.join(command)}") try: @@ -129,8 +132,6 @@ def __init__(self, config: Dict, source_cluster: Cluster, target_cluster: Cluste def create(self, *args, **kwargs) -> CommandResult: assert isinstance(self.target_cluster, Cluster) - wait = kwargs.get('wait', False) - max_snapshot_rate_mb_per_node = kwargs.get('max_snapshot_rate_mb_per_node', None) if self.source_cluster.auth_type != AuthMethod.NO_AUTH: raise NotImplementedError("Source cluster authentication is not supported for creating snapshots") @@ -147,11 +148,6 @@ def create(self, *args, **kwargs) -> CommandResult: if self.source_cluster.allow_insecure: command.append("--source-insecure") - if not wait: - command.append("--no-wait") - if max_snapshot_rate_mb_per_node is not None: - command.extend(["--max-snapshot-rate-mb-per-node", - str(max_snapshot_rate_mb_per_node)]) logger.info(f"Creating snapshot with command: {' '.join(command)}") try: