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

Add confirmation prompt to `az vmware script-execution create`

Open jonathanhe-msft opened this issue 1 year ago • 4 comments

Ask: az vmware script-execution create --resource-group group1 --private-cloud cloud1 --name newVmfsDatastore0 --script-cmdlet-id "/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/Microsoft.AVS.VMFS/scriptCmdlets/New-VmfsDatastore" --timeout P0Y0M0DT0H10M0S --parameter name=ClusterName type=Value value="Cluster-1" --parameter name=DatastoreName type=Value value="vmfsDatastore" --parameter name=DeviceNaaId type=Value value="{deviceNaaId}" --parameter name=Size type=Value value={sizeInBytes}

I want to emit a warning message if the script-cmdlet-id contains either of the following:

scriptPackages/Microsoft.AVS.VMFS scriptPackages/Microsoft.AVS.NFS scriptPackages/Microsoft.AVS.VVOLS

Example:

image


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • [ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • [ ] Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

jonathanhe-msft avatar Dec 08 '23 19:12 jonathanhe-msft

⚠️Azure CLI Extensions Breaking Change Test
⚠️vmware
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vmware script-execution create cmd vmware script-execution create added parameter yes

Hi @jonathanhe-msft, Please write the description of changes which can be perceived by customers into HISTORY.rst. If you want to release a new extension version, please update the version in setup.py as well.

Thank you for your contribution! We will review the pull request and get back to you soon.

yonzhan avatar Dec 08 '23 19:12 yonzhan

@zhoxing-ms can I get a review for this PR?

jonathanhe-msft avatar Dec 08 '23 20:12 jonathanhe-msft