bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
102 stars 41 forks source link

policyTool in PS and Python add and remove Quiet Times #109

Closed amhaats1 closed 1 year ago

amhaats1 commented 1 year ago

Would you be willing to update the policyTool to be able to add and remove Quiet Times?

The API references it as Blackout Window Example: "blackoutWindow": [ { "day": "Saturday", "startTime": { "hour": 17, "minute": 30 }, "endTime": { "hour": 23, "minute": 30 }

bseltz-cohesity commented 1 year ago

Will do

bseltz-cohesity commented 1 year ago

I have updated policyTool.ps1. I added -addQuietTime and -removeQuietTime parameters, like:

./policyTool.ps1 -vip mycluster -username myuser -policyName test -addQuietTime 'Monday,Friday;04:00;04:30'

https://github.com/bseltz-cohesity/scripts/tree/master/powershell/policyTool

bseltz-cohesity commented 1 year ago

I have updated policyTool.py. I added -aq, --addquiettime and -rq, --removequiettime parameters like:

./policyTool.py -v mycluster -u myusername -p test -aq 'Tuesday,Wednesday;00:00;03:30'

https://github.com/bseltz-cohesity/scripts/tree/master/python/policyTool