1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-22 01:39:58 -05:00
vsphere-automation-sdk-python/samples/vsan/snapservice
2024-07-05 12:00:20 +05:30
..
protection_group Adding the deliverables for vcenter, nsx. Adding the new samples. Update the README.md, setup.py and other files for 8.0U3 2024-07-05 12:00:20 +05:30
snapshot Adding the deliverables for vcenter, nsx. Adding the new samples. Update the README.md, setup.py and other files for 8.0U3 2024-07-05 12:00:20 +05:30
__init__.py Adding the deliverables for vcenter, nsx. Adding the new samples. Update the README.md, setup.py and other files for 8.0U3 2024-07-05 12:00:20 +05:30
README.md Adding the deliverables for vcenter, nsx. Adding the new samples. Update the README.md, setup.py and other files for 8.0U3 2024-07-05 12:00:20 +05:30
vsan_snapservice_client.py Adding the deliverables for vcenter, nsx. Adding the new samples. Update the README.md, setup.py and other files for 8.0U3 2024-07-05 12:00:20 +05:30

This directory contains samples for snapservice APIs:

  1. Protection Group Create, List and Delete operations:

    Sample Description
    list_protection_groups.py Demonstrates listing protection groups
    create_protection_group.py Demonstrates creating protection group
    delete_protection_groups.py Demonstrates deleting protection groups
  2. Protection Group Snapshot Delete operations:

    Sample Description
    delete_protection_group_snapshots.py Demonstrates deleting protection group snapshots

To view the available command-line options:

$ python protection_group/list_protection_groups.py --help
$ python protection_group/create_protection_group.py --help
$ python protection_group/delete_protection_groups.py --help
$ python snapshot/delete_protection_group_snapshots.py --help

Running the samples:

Fill "Snapservice protection group creation spec" section in vcenter/setup/testbed.py when calling create_pg.py

$ python protection_group/list_protection_groups.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> -v

$ python protection_group/create_protection_group.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> -v
$ python protection_group/create_protection_group.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> -v -c

$ python protection_group/delete_protection_groups.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> --pgnames <protection groups name to delete> -v
$ python protection_group/delete_protection_groups.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> --pgnames <protection groups name to delete> -v --force

$ python snapshot/delete_protection_group_snapshots.py --server <vCenter Server IP> --username <username> --password <password> --snapservice <snapservice IP> --cluster <cluster name> --pgname <protection group name to delete snapshot> --remain <snapshot remain> -v

Testbed Requirement:

- vCenter Server >= 8.0.3+
- vSAN ESA disk
- vSAN Cluster
- Snapservice = 8.0.3