pinkopy is a Python wrapper for the Commvault api. Of course it does very little initially, but there is no reason to duplicate work across projects.
git clone [email protected]:theherk/pinkopy.git
pip install pinkopy
from pinkopy import CommvaultSession
config = {
'service': 'service url',
'user': 'username',
'pw': 'password'
}
with CommvaultSession(**config) as s:
client_jobs = s.get_jobs('1234', job_filter="Backup")
cust_jobs = s.get_subclient_jobs(client_jobs, '12345678', last=3)
# multi status
for job in cust_jobs:
job_id = job['jobSummary']['@jobId']
job_details = s.get_job_details('1234', job_id)
job_vmstatus = s.get_job_vmstatus(job_details)
Please do contribute to this repository. It currently only supports a small set of the api provided by Commvault. However, if you do contribute, please follow these guidelines.
- Use Gitflow. Your pull requests must come from a Gitflow branch.
- feature/yourfeature
- bugfix/issuenumber
- ONLY imperative commit messages. Line one is one imperative, brief sentence. Following lines may have more details.
- Builds must pass (which should be pretty easy right now, since there are no tests).
- Never commit binary files.
- Make sure you are committing with your Github user.
The name was originally going to be commpy, but then I liked commiepy. From here it was only a small leap to pinkopy, a tribute to a dear friend of mine.