Skip to content

Remove redundant SSH public file checks in callers of core/keys.py's generate_ssh_keys #7267

@adewaleo

Description

@adewaleo

In #7105, code to check if an SSH public key file exists were added to generate_ssh_keys in src/azure-cli-core/azure/cli/core/keys.py. However, the callers of this function essentially make this check. So we should update them and remove these checks.

See:

  • _generate_ssh_keys() in src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py

  • validate_ssh_key() in src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_validators.py

  • validate_ssh_key() in src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py


Environment summary

N/A

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions