if __name__ == "__main__": log_config.config(logger) parser = argparse.ArgumentParser(description="Test pull restore job") parser.add_argument(dest="group_id", type=ObjectId, help="The group id to utilize") parser.add_argument(dest="hostname", type=str, help="The previously provisioned hostname.") parser.add_argument("-c", dest="cluster_id", type=ObjectId, help="Cluster to work upon. If blank, will create one.") parser.add_argument("-wt", dest="wired_tiger", action="store_const", const=True, help="Start backup as Wired Tiger.") args = parser.parse_args() mms_client = MMSClient( config['mms_api_base_url'], config['mms_api_username'], config['mms_api_key'] ) automation_client = mms_client.get_automation_client() backup_client = mms_client.get_backup_client() cluster_client = mms_client.get_cluster_client() snapshot_client = mms_client.get_snapshot_client() restore_client = mms_client.get_restore_client() host_client = mms_client.get_host_client() isdb_client = pymongo.MongoClient(host=config["mms_backup_db_host"], port=config["mms_backup_db_port"]) group_id = args.group_id hostname = args.hostname cluster_id = args.cluster_id wired_tiger = args.wired_tiger ## SET UP A BACKUP if not cluster_id: rs_id = add_replica_set_to_group(automation_client, hostname, group_id, run_id)