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
23 stars 20 forks source link

vtc delete-sddc-group crashes #184

Closed mithil2906 closed 1 year ago

mithil2906 commented 1 year ago

Describe the bug

While trying to delete the sddc-group (that does not contain any SDDC), it crashes as follows:

mithilra@b0be83701edd python-client-for-vmware-cloud-on-aws-development % ./pyVMC.py vtc delete-sddc-group -gid 1edeb6b5-8742-6d21-b1f9-0d126ed6be4b

Traceback (most recent call last): File "/Users/mithilra/pyvmc/python-client-for-vmware-cloud-on-aws-development/./pyVMC.py", line 1409, in main() File "/Users/mithilra/pyvmc/python-client-for-vmware-cloud-on-aws-development/./pyVMC.py", line 1404, in main args.func(**params) File "/Users/mithilra/pyvmc/python-client-for-vmware-cloud-on-aws-development/pyvmc_fxns.py", line 1339, in delete_sddc_group sddc_group_id = kwargs['group_id'] # the id of the group.

Screenshot 2023-05-06 at 8 42 08 PM SDDC_Group_Info

KeyError: 'group_id'

Attached is the screenshot of SDDC Group and its ID

Reproduction steps

  1. Delete all the VPC attachments, Associated AWS account and SDDC from the SDDC Group.
  2. Execute ./pyVMC.py vtc delete-sddc-group -gid . The CLI crashes as mentioned above

Expected behavior

vtc delete-sddc-group -gid should delete the group without any errors

Additional context

No response