vmware / python-client-for-vmware-cloud-on-aws

Python Client for VMware Cloud on AWS is an open-source Python-based tool. Written in Python, the tool enables VMware Cloud on AWS users to automate the consumption of their VMware Cloud on AWS SDDC.
Other
24 stars 20 forks source link

delete T1 doesn't validate the name #190

Closed dlp-aws closed 1 year ago

dlp-aws commented 1 year ago

Describe the bug

When trying to delete an additional T1 gateway, there is no validation of the name provided. The code should throw an error if the name given doesn't exist. If a customer fat-fingers the network name and expects it to be deleted, they'll think it was because the CLI will exit successfully.

Reproduction steps

  1. "./pyVMC.py t1 delete -n <network name that doesn't exist>"
  2. This will result in "Tier1 gateway <network name that doesn't exist> has been deleted."

Expected behavior

It should throw an error stating " does not exist".

Additional context

No response

maulepilot117 commented 1 year ago

Completely agree we should be validating the T1 exists prior to attempting the deletion. Added this to feature request for the pyVMC 2.1 release.