added bulk delete vpg by vm example

This commit is contained in:
Mushkin
2026-01-23 16:23:16 -05:00
parent ad5f6ac4c4
commit 71067072e2
2 changed files with 183 additions and 0 deletions
+17
View File
@@ -118,12 +118,29 @@ The script will:
3. Ask for confirmation before applying
4. Apply changes if confirmed
## Step 6: Delete VPGs by VM List
Delete VPGs associated with VMs listed in a CSV file. The CSV must include a `VMName` column
(case-insensitive). Each VM is validated with the `vms.list_vms` API before deletion.
```bash
cd examples/bulk_vpg_actions
python delete_vpgs_from_csv.py \
--zvm_address "192.168.111.20" \
--client_id "zerto-api" \
--client_secret "your-secret-here" \
--csv_file "vm_list.csv" \
--sync \
--ignore_ssl
```
## File Structure
All scripts and templates are located in the `examples/bulk_vpg_actions` directory:
```
examples/bulk_vpg_actions/
├── README.md
├── delete_vpgs_from_csv.py
├── export_site_resources_to_csv.py
├── export_vpg_settings_nics_to_csv.py
├── import_vpg_settings_nics_from_csv.py