<?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: Creating multiple object via CSV in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3049#M262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to break the operation up into smaller (500 max) item pieces and then verify via json output that you don't have errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also don't forget command extensions like "--ignore-errors true" to ensure that warnings don't kill your operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would post the additions in blocks of 250-500, publish, then proceed, and wait for visible confirmation in SmartConsole that you have the objects before proceeding with adding them to groups and such.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With large volume additions via the CLI API, I've noticed that back end processing and updating the database can take time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also may be taxing the management host's resources, which may need to expand to meet the real needs of the operation, so I would keep an eye on top and critical resources like memory and CPU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 16:49:27 GMT</pubDate>
    <dc:creator>Eric_Beasley</dc:creator>
    <dc:date>2017-03-22T16:49:27Z</dc:date>
    <item>
      <title>Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3048#M261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left;"&gt;I'm trying to use the Management API to create multiple network objects and then populate them into a group.&amp;nbsp; I have syntax working, however, when executing SmartConsole crashes and only imports ~150 networks.&amp;nbsp; There are 3000+ networks to be created.&amp;nbsp; Is there a limitation of number of entries that can be imported via SmartConsole CLI?&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;I'm trying to get the Microsoft Azure Datacenter IP Ranges added so we can create firewall rules.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;A href="https://www.microsoft.com/en-us/download/details.aspx?id=41653" title="https://www.microsoft.com/en-us/download/details.aspx?id=41653"&gt;Download Microsoft Azure Datacenter IP Ranges from Official Microsoft Download Center&lt;/A&gt; &lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;CLI syntax: &lt;SPAN style="line-height: 107%; font-family: 'Calibri',sans-serif; font-size: 12pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;add network -d 10.x.x.x --batch /var/tmp/filename.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;CSV sample&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="151" style="width: 788px; height: 75px;" width="785"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;name&lt;/TD&gt;&lt;TD width="64"&gt;subnet4&lt;/TD&gt;&lt;TD width="64"&gt;mask-length4&lt;/TD&gt;&lt;TD width="64"&gt;color&lt;/TD&gt;&lt;TD width="64"&gt;comments&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;07032017-azure-europewest1&lt;/TD&gt;&lt;TD&gt;40.112.124.0&lt;/TD&gt;&lt;TD align="right"&gt;24&lt;/TD&gt;&lt;TD&gt;slate blue&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Microsoft Azure Datacenter IP Ranges - March 7, 2017&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 20:23:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3048#M261</guid>
      <dc:creator>Raj_Khatri</dc:creator>
      <dc:date>2017-03-07T20:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3049#M262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to break the operation up into smaller (500 max) item pieces and then verify via json output that you don't have errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also don't forget command extensions like "--ignore-errors true" to ensure that warnings don't kill your operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would post the additions in blocks of 250-500, publish, then proceed, and wait for visible confirmation in SmartConsole that you have the objects before proceeding with adding them to groups and such.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With large volume additions via the CLI API, I've noticed that back end processing and updating the database can take time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also may be taxing the management host's resources, which may need to expand to meet the real needs of the operation, so I would keep an eye on top and critical resources like memory and CPU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:49:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3049#M262</guid>
      <dc:creator>Eric_Beasley</dc:creator>
      <dc:date>2017-03-22T16:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3050#M263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this post: &lt;A href="https://community.checkpoint.com/docs/DOC-2023"&gt;Create objects for Azure Data-Center IP ranges - Pythonscript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I hope this is what you were looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Mar 2017 15:48:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3050#M263</guid>
      <dc:creator>Uri_Bialik</dc:creator>
      <dc:date>2017-03-26T15:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3051#M264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uri, thanks for sharing that post.&amp;nbsp; I haven't tried the script yet but wanted to know if the networks and groups are written to the database immediately or if I'll get the option to publish changes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:54:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3051#M264</guid>
      <dc:creator>Raj_Khatri</dc:creator>
      <dc:date>2017-04-05T17:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3052#M265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uri, I was able to get the script to execute, however, once it was completed the networks didn't get added to the groups although it said it was doing that.&amp;nbsp; See screenshots.&amp;nbsp; What would cause this?&lt;IMG alt="1.jpg" class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/55892_1.jpg" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.jpg" class="image-2 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/55893_2.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 19:11:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3052#M265</guid>
      <dc:creator>Raj_Khatri</dc:creator>
      <dc:date>2017-04-12T19:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3053#M266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that making a large volume of changes requires some processing time at the back end for the management server when then having those entries ready for next steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I didn't write the original script used, I can't say what needs to be fixed, but my generic approach would be to generate the objects, but between object type, publish.&amp;nbsp; Before starting a group member add/set operation, the last added member should be checked to ensure it exists and is usable, then proceed to the add/set operation when the check is successful or kill the process after a suitable timeout to ensure things aren't caught in a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processing of updates on management depends on activity and connectivity, so cloud solutions may be impacted by limited bandwidth, ergo slower to perform massive updates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 20:03:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3053#M266</guid>
      <dc:creator>Eric_Beasley</dc:creator>
      <dc:date>2017-07-14T20:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3054#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj...What CSV format did you use to add to the group as I cannot find a way to "create" network objects and "add" them to the group in a single CSV&lt;/P&gt;&lt;P&gt;Currently I am doing 2-step process of creating networks first by using 'add network' command and then 'set group' to add them to an existing group using another CSV with appropriate headers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Usman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:08:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3054#M267</guid>
      <dc:creator>Usman_Shaikh</dc:creator>
      <dc:date>2018-10-15T14:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple object via CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3055#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it working by adding "groups" column to the CSV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:13:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-multiple-object-via-CSV/m-p/3055#M268</guid>
      <dc:creator>Usman_Shaikh</dc:creator>
      <dc:date>2018-10-15T14:13:59Z</dc:date>
    </item>
  </channel>
</rss>

