<?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 Re: Adding networks via API - err_validation_failed&amp;quot; in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194610#M67119</link>
    <description>&lt;P&gt;That did the trick. Great. Thanks.&lt;/P&gt;
&lt;P&gt;And it works with huge number of networks.&lt;/P&gt;
&lt;P&gt;name,subnet,mask-length,set-if-exists,color,comments,groups,ignore-warnings&lt;BR /&gt;NET-192.168.1.0,192.168.1.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.2.0,192.168.2.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.3.0,192.168.3.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.4.0,192.168.4.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.5.0,192.168.5.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.6.0,192.168.6.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.7.0,192.168.7.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.8.0,192.168.8.0,24,true,red,Net1,PRIVATE1,true&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 07:00:51 GMT</pubDate>
    <dc:creator>S_E_</dc:creator>
    <dc:date>2023-10-10T07:00:51Z</dc:date>
    <item>
      <title>Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194300#M67111</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;while adding networks via API (R81.10) i see following warning.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;mgmt_cli add network name Network_10.1.0.0 subnet 10.1.0.0 subnet-mask 255.255.248.0&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;code: "err_validation_failed"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;message: "Validation failed with 1 warning"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;warnings:&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;- message: "More than one network has the same IP 10.1.0.0/255.255.248.0"&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;mgmt_cli publish -s id.txt&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;"Publish operation" succeeded (100%)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;tasks:&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;- task-id: "01234567-89ab-cdef-a85f-a4014fae5873"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;task-name: "Publish operation"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;status: "succeeded"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;progress-percentage: 100&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;suppressed: false&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;task-details:&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;- publishResponse:&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;numberOfPublishedChanges: 0&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;mode: "async"&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT size="2"&gt;revision: "fc3a7509-1d60-442a-9b3d-77f9b096be31"&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;mgmt_cli publish -s id.txt&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This warning is more an error because the object will not be added.&lt;BR /&gt;The warning is correct from the logic. Another object with the same 'content' exists.&lt;/P&gt;
&lt;P&gt;In SmartConsole. I would simply click ok and ignore this warning.&lt;BR /&gt;How to ignore this via API ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. &lt;BR /&gt;It looks like that the mgmt_cli command has some issue in terms of amount of objects. &lt;BR /&gt;What is the best approach to add ~1000 objects like hosts or networks?&lt;/P&gt;
&lt;P&gt;TXS, Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 10:26:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194300#M67111</guid>
      <dc:creator>S_E_</dc:creator>
      <dc:date>2023-10-05T10:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194308#M67112</link>
      <description>&lt;P&gt;You pass ignore-warnings true to the API call.&lt;/P&gt;
&lt;P&gt;For adding objects in bulk, you should use the batch operations instead.&lt;BR /&gt;For example: &amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-objects-batch~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-objects-batch~v1.9%20&lt;/A&gt;&lt;BR /&gt;Another consideration is to ensure you “publish” every 100 operations or so.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:42:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194308#M67112</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-10-05T12:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194527#M67113</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;tried now the batch approach via these call but still get validation error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mgmt_cli add network --batch /tmp/test3.csv ignore-warnings true ignore-errors true -s id.txt&lt;BR /&gt;mgmt_cli publish -s id.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[test3.csv]&lt;/P&gt;
&lt;P&gt;name,subnet,mask-length,tags,set-if-exists,color,comments,groups&lt;BR /&gt;NET-192.168.1.0,192.168.1.0,24,false,red,Net1,PRIVATE1&lt;BR /&gt;NET-192.168.2.0,192.168.2.0,24,false,red,Net1,PRIVATE1&lt;BR /&gt;NET-192.168.3.0,192.168.3.0,24,false,red,Net1,PRIVATE1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results in &lt;BR /&gt;Line 2: code: "err_validation_failed"&lt;BR /&gt;message: "Validation failed with 1 warning"&lt;BR /&gt;warnings:&lt;BR /&gt;- message: "More than one network has the same IP 192.168.1.0/255.255.255.0"&lt;/P&gt;
&lt;P&gt;Line 3: code: "err_validation_failed"&lt;BR /&gt;message: "Validation failed with 1 warning"&lt;BR /&gt;warnings:&lt;BR /&gt;- message: "More than one network has the same IP 192.168.2.0/255.255.255.0"&lt;/P&gt;
&lt;P&gt;Line 4: code: "err_validation_failed"&lt;BR /&gt;message: "Validation failed with 1 warning"&lt;BR /&gt;warnings:&lt;BR /&gt;- message: "More than one network has the same IP 192.168.3.0/255.255.255.0"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any tipp is welcome&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 11:57:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194527#M67113</guid>
      <dc:creator>S_E_</dc:creator>
      <dc:date>2023-10-09T11:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194529#M67114</link>
      <description>&lt;P&gt;Could it be, you already have the same networks defined?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 12:07:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194529#M67114</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-10-09T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194534#M67115</link>
      <description>&lt;P&gt;Val, I'm pretty sure he does.&lt;/P&gt;
&lt;P&gt;However there is an option to proceed with these warnings to te best of my knowledge.&lt;/P&gt;
&lt;P&gt;But the CLI command only tells us about `--ignore-errors true` as valid option:&lt;/P&gt;
&lt;P&gt;[--ignore-errors] {true|false}&lt;BR /&gt;Ignore errors and continue execution when executing commands from parameters file. See (--batch).&lt;BR /&gt;Default {false}&lt;BR /&gt;Environment variable: MGMT_CLI_IGNORE_ERRORS&lt;/P&gt;
&lt;P&gt;For now yo can use the option '--ignore-erros true'&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 13:09:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194534#M67115</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2023-10-09T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194542#M67116</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes some network are already defined. But it is definetely with a different object-name. However, via SmartConsole it is not an issue.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 14:18:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194542#M67116</guid>
      <dc:creator>S_E_</dc:creator>
      <dc:date>2023-10-09T14:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194543#M67117</link>
      <description>&lt;P&gt;Well, it isn't in the sense that you have to validate that the duplication is not an issue. but --ignore-warnings doen't work or R80.20&lt;/P&gt;
&lt;PRE&gt;[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true add network name Mgmt_NET subnet 192.168.198.0 subnet-mask 255.255.255.0&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [16:29:57] 9/10/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" in progress (10%)&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [16:30:08] 9/10/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" succeeded (100%)&lt;BR /&gt;&lt;BR /&gt;[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0&lt;BR /&gt;code: "err_validation_failed"&lt;BR /&gt;message: "Validation failed with 1 warning"&lt;BR /&gt;warnings:&lt;BR /&gt;- message: "More than one network has the same IP 192.168.198.0/255.255.255.0"&lt;BR /&gt;&lt;BR /&gt;Executed command failed. Changes are discarded.&lt;BR /&gt;&lt;BR /&gt;[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true --ignore-warnings true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0&lt;BR /&gt;Error: The parameters of --ignore-warnings command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.&lt;BR /&gt;[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli --ignore-warnings true -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0&lt;BR /&gt;Error: The parameters of --ignore-warnings command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.&lt;BR /&gt;&lt;BR /&gt;[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli --ignore-errors true -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0&lt;BR /&gt;code: "err_validation_failed"&lt;BR /&gt;message: "Validation failed with 1 warning"&lt;BR /&gt;warnings:&lt;BR /&gt;- message: "More than one network has the same IP 192.168.198.0/255.255.255.0"&lt;BR /&gt;&lt;BR /&gt;Ignore errors is turned on. Publishing changes despite of command execution errors.&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [16:32:27] 9/10/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" succeeded (100%)&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Oct 2023 14:37:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194543#M67117</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2023-10-09T14:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194579#M67118</link>
      <description>&lt;P&gt;The batch API calls do not support using ignore-warnings true...at least directly.&lt;BR /&gt;You have to add this to the CSV file (ignore-warnings to the header, true to the value for each row).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 21:25:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194579#M67118</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-10-09T21:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks via API - err_validation_failed"</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194610#M67119</link>
      <description>&lt;P&gt;That did the trick. Great. Thanks.&lt;/P&gt;
&lt;P&gt;And it works with huge number of networks.&lt;/P&gt;
&lt;P&gt;name,subnet,mask-length,set-if-exists,color,comments,groups,ignore-warnings&lt;BR /&gt;NET-192.168.1.0,192.168.1.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.2.0,192.168.2.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.3.0,192.168.3.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.4.0,192.168.4.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.5.0,192.168.5.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.6.0,192.168.6.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.7.0,192.168.7.0,24,true,red,Net1,PRIVATE1,true&lt;BR /&gt;NET-192.168.8.0,192.168.8.0,24,true,red,Net1,PRIVATE1,true&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 07:00:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Adding-networks-via-API-err-validation-failed-quot/m-p/194610#M67119</guid>
      <dc:creator>S_E_</dc:creator>
      <dc:date>2023-10-10T07:00:51Z</dc:date>
    </item>
  </channel>
</rss>

