2020-01-27 08:13:57 -05:00
|
|
|
import argparse
|
|
|
|
import requests
|
|
|
|
|
2020-05-19 07:54:15 -04:00
|
|
|
from vmware.vapi.vmc.client import create_vmc_client
|
2020-01-27 08:13:57 -05:00
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument(
|
|
|
|
'--refresh_token',
|
|
|
|
required=True,
|
|
|
|
help='VMware Cloud API refresh token')
|
|
|
|
|
|
|
|
parser.add_argument(
|
|
|
|
'--org_id',
|
|
|
|
required=True,
|
|
|
|
help='Organization identifier.')
|
|
|
|
|
|
|
|
parser.add_argument(
|
|
|
|
'--sddc_id',
|
|
|
|
required=True,
|
|
|
|
help='Sddc Identifier.')
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
refresh_token = args.refresh_token
|
|
|
|
org_id = args.org_id
|
|
|
|
sddc_id = args.sddc_id
|
|
|
|
|
2020-05-19 07:54:15 -04:00
|
|
|
client = create_vmc_client(refresh_token)
|
|
|
|
site_recovery_activation_task = client.draas.SiteRecovery.get(org_id, sddc_id)
|
2020-01-27 08:13:57 -05:00
|
|
|
print(site_recovery_activation_task)
|