Skip to content

Commit 7502e35

Browse files
Merge pull request #38 from VeritasOS/policyapi-samples
Policy API samples update
2 parents cf7cf12 + a9a934a commit 7502e35

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

recipes/python/README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

recipes/python/policies/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### NetBackup API Code Samples for Policy APIs
2+
3+
This directory contains code samples in Python to invoke NetBackup Policy APIs.
4+
5+
#### Disclaimer
6+
7+
These samples are provided only as reference and not meant for production use.
8+
9+
#### Executing the scripts
10+
11+
Pre-requisites:
12+
- NetBackup 8.1.2 or higher
13+
- Python 3.5 or higher
14+
- Python modules: `requests`
15+
16+
17+
Use the following commands to run the scripts.
18+
- Create a test policy, add clients, backup selections and schedules to the policy, and delete the policy: `python -W ignore create_policy_step_by_step.py -nbmaster <masterServer> -username <username> -password <password> [-domainName <domainName>] [-domainType <domainType>]`
19+
- Create a test policy with default values, and delete the policy: `python -W ignore create_policy_in_one_step.py -nbmaster <masterServer> -username <username> -password <password> [-domainName <domainName>] [-domainType <domainType>]`
20+
- Create RBAC access rule, set object-level permission on policies for test user, create and read policies as per the RBAC permissions, and delete the test policies: `python -W ignore rbac_filtering_in_policy.py -nbmaster <masterServer> -username <username> -password <password> [-domainName <domainName>] [-domainType <domainType>]`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)