Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Management API

Jump to solution

Hello

 

Multi MDS R80.10

 

Is there any way to non-interactively install policy using management API ?

Im asking because i want to script policy installations to happen periodically, as there is no option to use expect, how can i go through policy installations non-interactively ?

1 Solution

Accepted Solutions
Highlighted
All you need to do is create a small script on the management server that contains:
mgmt_cli --root true -u admin -p <passw> install-policy <policyname>
Schedule this script in cron and you are done.
Regards, Maarten

View solution in original post

7 Replies
Highlighted
Is it a thing for 80.10 ?
0 Kudos
Highlighted
All you need to do is create a small script on the management server that contains:
mgmt_cli --root true -u admin -p <passw> install-policy <policyname>
Schedule this script in cron and you are done.
Regards, Maarten

View solution in original post

Highlighted
Thanks!
That works to me, however flags "[...]--root true -u admin[...]" bring ambiguous parameters error, beside this all is fine.
I was looking exactly for something like this, my bad i didnt go carefully enough through management API reference to catch optional switches...
0 Kudos
Highlighted
Nickel

@piotrsz90 wrote:
That works to me, however flags "[...]--root true -u admin[...]" bring ambiguous parameters error, beside this all is fine.

Because of MDS you have to use domain:

mgmt_cli --root true --domain <domain> install-policy <policyname>

BTW: You can add "prepare-only true" to a first test.

Highlighted
Hello

All is sorted, thanks
Highlighted
Employee++
Employee++

Also look in the Management API Reference Guide:

https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/install-policy~v1.5%20

 

Another option you can use is Install Policy Presets that were added in R80.20 to Multi-Domain SmartConsole.

0 Kudos