-
Notifications
You must be signed in to change notification settings - Fork 18
vtc attach-vpc and detach-vpc should include an option for attachment id #182
Description
Is your feature request related to a problem? Please describe.
Currently the vtc attach-vpc and detach-vpc subcommands do not have an option to accept all the incoming vpc attachments. It expects a manual user intervention to select the attachment number
./pyVMC.py vtc attach-vpc -h
usage: vtc attach-vpc [-h] [--oauth [OAUTH]] -aid AWS_ACCOUNT_ID -gid SDDC_GROUP_ID
options:
-h, --help show this help message and exit
--oauth [OAUTH] Used to specify use of OAuth app ID and secret in config.ini instead of 'refresh_token' (default).
-aid AWS_ACCOUNT_ID, --aws_account_id AWS_ACCOUNT_ID
The ID of the AWS Account that owns the resource (DXGE / VPC, etc) you wish to configure.
-gid SDDC_GROUP_ID, --sddc_group_id SDDC_GROUP_ID
The ID of the SDDC Group to attach to. Use 'get-group-info' for a list of SDDCs Groups with IDs.
mithilra@b0be83701edd python-client-for-vmware-cloud-on-aws-development % ./pyVMC.py vtc detach-vpc -h
usage: vtc detach-vpc [-h] [--oauth [OAUTH]] -aid AWS_ACCOUNT_ID -gid SDDC_GROUP_ID
options:
-h, --help show this help message and exit
--oauth [OAUTH] Used to specify use of OAuth app ID and secret in config.ini instead of 'refresh_token' (default).
-aid AWS_ACCOUNT_ID, --aws_account_id AWS_ACCOUNT_ID
The ID of the AWS Account that owns the resource (DXGE / VPC, etc) you wish to configure.
-gid SDDC_GROUP_ID, --sddc_group_id SDDC_GROUP_ID
The ID of the SDDC Group to attach to. Use 'get-group-info' for a list of SDDCs Groups with IDs.
mithilra@b0be83701edd python-client-for-vmware-cloud-on-aws-development % ./pyVMC.py vtc attach-vpc -aid 310793149708 -gid 1edeb6b5-8742-6d21-b1f9-0d126ed6be4b
=====Attaching VPCs=========
Account: 310793149708
1: VPC attachment = tgw-attach-0d62cefdfe050f07c
Select VPC to attach: 1
PENDING
............................................
FINISHED in 02min 07sec
This could be a challenge for implementing complete automation without any manual intervention.
Same holds true for detach-vpc as well:
mithilra@b0be83701edd python-client-for-vmware-cloud-on-aws-development % ./pyVMC.py vtc detach-vpc -aid 310793149708 -gid 1edeb6b5-8742-6d21-b1f9-0d126ed6be4b
=====Detaching VPCs=========
Account: 310793149708
1: VPC attachment = tgw-attach-0d62cefdfe050f07c
Select VPC to detach: 1
PENDING
........................................
FINISHED in 01min 54sec
Describe the solution you'd like
If an option of attachment number e.g. 1,2 or all is passed that would eliminate manual intervention. We could also look at the tgw-attachment id as an option, but that would come from AWS.
Describe alternatives you've considered
No response
Additional context
No response