azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[ACR] Remove hard coded api-version when importing SDK

Open djyou opened this issue 7 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Remove hard coded api-version when importing SDK such as https://github.com/Azure/azure-cli/blob/dev/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/run.py#L12

This also includes cleaning up deprecated legacy commands using old api-versions such as https://github.com/Azure/azure-cli/blob/dev/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build_task.py#L11

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

djyou avatar Jan 16 '19 22:01 djyou

Should involve:

  1. Add a resource type to _shared.py for 'latest' profile.
  2. Specify that resource type in your module __init__.py
  3. Update your model import to use self.get_models('ModelA', 'ModelB') etc.

Ping me with questions.

tjprescott avatar Jan 16 '19 22:01 tjprescott

https://github.com/Azure/azure-cli/issues/8267 has a bit more explicit guidance if that's helpful.

tjprescott avatar Jan 16 '19 23:01 tjprescott