<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automate policy installation in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5487#M101055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. I am planning to automate my Change requests and in order to do that I would like to know how could i use batch options for install-policy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The option I tried:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;[Expert@mapcpmgmt01:0]# mgmt_cli install-policy --batch policypackage.csv --format json&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Line 2: {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; "code" : "generic_err_invalid_parameter_name",&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; "message" : "Unrecognized parameter [standard]"&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;{ "response" : []}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CSV file looked like this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;[Expert@mapcpmgmt01:0]# cat policypackage.csv&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;policy-package,standard,access,true&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;policy-package,standard1,access,true&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Aug 2017 01:16:01 GMT</pubDate>
    <dc:creator>Mikesh_Khanal</dc:creator>
    <dc:date>2017-08-21T01:16:01Z</dc:date>
    <item>
      <title>Automate policy installation</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5487#M101055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. I am planning to automate my Change requests and in order to do that I would like to know how could i use batch options for install-policy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The option I tried:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;[Expert@mapcpmgmt01:0]# mgmt_cli install-policy --batch policypackage.csv --format json&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Line 2: {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; "code" : "generic_err_invalid_parameter_name",&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; "message" : "Unrecognized parameter [standard]"&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;{ "response" : []}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CSV file looked like this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;[Expert@mapcpmgmt01:0]# cat policypackage.csv&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;policy-package,standard,access,true&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;policy-package,standard1,access,true&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 01:16:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5487#M101055</guid>
      <dc:creator>Mikesh_Khanal</dc:creator>
      <dc:date>2017-08-21T01:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automate policy installation</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5488#M101056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mikesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the issue might be with the way you are formatting your CSV file.&lt;/P&gt;&lt;P&gt;The way to use the CSV files is as followed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.checkpoint.com/legacyfs/online/checkpoint/58302_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how I adapted your example:&lt;/P&gt;&lt;P&gt;[Expert@Mgmt]# cat policy.csv&lt;BR /&gt;policy-package,access,&lt;BR /&gt;Standard,true,&lt;/P&gt;&lt;P&gt;[Expert@Mgmt]# mgmt_cli install-policy --batch ./policy.csv --format json -r&amp;nbsp;true&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [11:42:39] 23/8/2017&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Policy installation - Standard" in progress (0%)&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;lt;installation finished successfully&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Expert@Mgmt]#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yonatan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 08:48:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5488#M101056</guid>
      <dc:creator>Yonatan_Philip</dc:creator>
      <dc:date>2017-08-23T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automate policy installation</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5489#M101057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more note for future reference - try checking the output of $FWDIR/log/api.elg.&lt;/P&gt;&lt;P&gt;You can find the actual payload that reached the server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing your output would have looked something along the lines of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;Address: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:50276/web_api/install-policy" rel="nofollow"&gt;http://127.0.0.1:50276/web_api/install-policy&lt;/A&gt;&lt;BR /&gt;Encoding: ISO-8859-1&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Accept=[application/json], connection=[keep-alive], Content-Length=[91], content-type=[application/json], Host=[127.0.0.1:50276], User-Agent=[mgmt_cli], X-chkp-sid=[1KtvuY0yiF_JFFSkhc4o2MJZBcS_q7D4AnzMUQfpHS8], X-Forwarded-For=[127.0.0.1], X-Forwarded-Host=[127.0.0.1], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[192.168.19.131]}&lt;BR /&gt;&lt;STRONG&gt;Payload: {"Standard":"Standard1","access":"access","policy-package":"policy-package","true":"true"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;BR /&gt;2017-08-23 11:54:14,088 INFO com.checkpoint.management.web_api_is.utils.helpers.ApiCache.&amp;lt;init&amp;gt;:25 [qtp-27716996-27] - Cache created and initialized&lt;BR /&gt;2017-08-23 11:54:14,089 ERROR com.checkpoint.management.web_api.utils.WebApiCommandExceptionUtils.getErrorReply:219 [qtp-27716996-27] -&lt;BR /&gt;com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "Standard" (class com.checkpoint.management.web_api.core.handler.commands.on_targets.install_policy.PolicyInstallationRequest), not marked as ignorable (8 known properties: "install-on-each-target-of-the-same-version-independently", "prepare-only", "targets", "threat-prevention", "access", "install-on-all-cluster-members-or-fail", "policy-package", "revision"])&lt;BR /&gt; at [Source: {"Standard":"Standard1","access":"access","policy-package":"policy-package","true":"true"}&lt;BR /&gt;; line: 1, column: 14] (through reference chain: com.checkpoint.management.web_api.core.handler.commands.on_targets.install_policy.PolicyInstallationRequest["Standard"])&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;ID: 32&lt;BR /&gt;Response-Code: 400&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], Date=[Wed, 23 Aug 2017 08:54:14 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt; "code" : "generic_err_invalid_parameter_name",&lt;BR /&gt; "message" : "Unrecognized parameter [Standard]"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would probably have helped you figure this out on your own &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yonatn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 08:56:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5489#M101057</guid>
      <dc:creator>Yonatan_Philip</dc:creator>
      <dc:date>2017-08-23T08:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Automate policy installation</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5490#M101058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Philip. Now, I have a real picture on how to use batch file and how to araange commands in CSV.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 02:30:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automate-policy-installation/m-p/5490#M101058</guid>
      <dc:creator>Mikesh_Khanal</dc:creator>
      <dc:date>2017-08-24T02:30:34Z</dc:date>
    </item>
  </channel>
</rss>

