<?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: Global object cleanup in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/80715#M4672</link>
    <description>This script is going over global objects and searching if their are used within each domain, if not then they are reported to be deleted.</description>
    <pubDate>Fri, 03 Apr 2020 08:12:22 GMT</pubDate>
    <dc:creator>Martin_Valenta</dc:creator>
    <dc:date>2020-04-03T08:12:22Z</dc:date>
    <item>
      <title>Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/47041#M3146</link>
      <description>&lt;P&gt;&lt;A href="https://github.com/adi0s/CPCleanupGlobalObject" target="_blank" rel="noopener"&gt;https://github.com/adi0s/CPCleanupGlobalObject&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This tools provides a way how to determine, if some global object created in Check Point global policy is used across all domains or not.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How does it work?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Get all network objects from global policy (hosts,networks,groups,address-range)&lt;BR /&gt;Get list of all domains on MDS&lt;BR /&gt;Search over each domain to check if particular object is used or not - using where-used api command&lt;BR /&gt;Write down results and generate API CLI commands for object deletion for each object type&lt;BR /&gt;By default is generating list of objects, which are not used in any domain or just used in one domain. Example: you have 12 domains on MDS and reported object is not used in any of 12 domains or it's just used on 1 domain from 12 (this kind of object should be only local object)&lt;/P&gt;&lt;P&gt;Requirements: Download and install the Check Point API Python SDK repository, follow the instructions in the SDK repository.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk" target="_blank" rel="noopener"&gt;https://github.com/CheckPointSW/cp_mgmt_api_python_sdk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Written for python3, but if you put in first line also this: from future import print_function it should run on python2&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;How to use? &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;python global_object_cleaner.py -m management_ip -u username -p password -g "global domain name"&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 08:19:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/47041#M3146</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2019-03-25T08:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/47077#M3149</link>
      <description>&lt;P&gt;Very nice.&lt;/P&gt;
&lt;P&gt;Check out&amp;nbsp;&lt;A href="https://community.checkpoint.com/docs/DOC-3472" target="_blank"&gt;SmartConsole Extensions&lt;/A&gt;&amp;nbsp;platform&amp;nbsp;to integrate this useful tool inside SmartConsole&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 15:20:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/47077#M3149</guid>
      <dc:creator>Ron_Izraeli</dc:creator>
      <dc:date>2019-03-15T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48063#M3169</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1702"&gt;@JozkoMrkvicka&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/11456"&gt;@Kaspars_Zibarts&lt;/a&gt;&amp;nbsp;i believe that you guys have for sure environment with MDS, could you please test in your test/qa environments? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 07:14:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48063#M3169</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2019-03-21T07:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48070#M3170</link>
      <description>nicely done, will test on SMS R80.20 with 4 Domains and let you know (VSX). Cheers!</description>
      <pubDate>Thu, 21 Mar 2019 08:43:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48070#M3170</guid>
      <dc:creator>Jerry</dc:creator>
      <dc:date>2019-03-21T08:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48177#M3175</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7423"&gt;@Martin_Valenta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1702"&gt;@JozkoMrkvicka&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/11456"&gt;@Kaspars_Zibarts&lt;/a&gt;&amp;nbsp;i believe that you guys have for sure environment with MDS, could you please test in your test/qa environments? Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will not believe me, but TODAY, I started to think about to script EXACTLY THE SAME, but for R77.30 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Anyway, I do have testing R80.20 MDS with 5 CMAs, using Global policy. Some global objects are used, some not. Will revert back with more updates.&lt;/P&gt;
&lt;P&gt;PS: In production environments, we are using also global services (TCP, UDP, group) and time objects. Maybe a suggestion for further extension&amp;nbsp;of this script - let the user choose what to check (all, only network, only hosts, only ranges, only time objects).&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 21:20:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48177#M3175</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-03-21T21:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48179#M3176</link>
      <description>&lt;P&gt;The file itself has a name:&lt;BR /&gt;global_object_&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;cleaner&lt;/STRONG&gt;&lt;/FONT&gt;.py&lt;/P&gt;
&lt;P&gt;But in instructions, it is stated that we need to run file:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How to use? python global_object_&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;cleanup&lt;/STRONG&gt;&lt;/FONT&gt;.py -m management_ip -u username -p password -g "global domain name"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If I run the script without any parameter, it will ask for username and once entered, the following pop-up:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 776px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/347iEDA624C8AB1E4C9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 22:18:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48179#M3176</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-03-21T22:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48252#M3178</link>
      <description>&lt;P&gt;You run it with python2 right? It will be probably due to differente function on gathering input from console..Python2 have raw_input() and python3 just input.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 09:53:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48252#M3178</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2019-03-22T09:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48454#M3195</link>
      <description>Thanks for suggestion with services!</description>
      <pubDate>Mon, 25 Mar 2019 08:54:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48454#M3195</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2019-03-25T08:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48606#M3201</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7423"&gt;@Martin_Valenta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You run it with python2 right? It will be probably due to differente function on gathering input from console..Python2 have raw_input() and python3 just input.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yep.&lt;/P&gt;
&lt;P&gt;Anyway, what is the point to have output in CSV&amp;nbsp;file? What about a simple text file with all relevant commands?&amp;nbsp;Also, there is no message that the files were created and are stored in the same directory.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 09:21:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48606#M3201</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-03-26T09:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48959#M3218</link>
      <description>Sorry Martin, won't have time right now, totally snowed under &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; even ignoring checkmates for last two weeks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 28 Mar 2019 07:22:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/48959#M3218</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2019-03-28T07:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/80712#M4671</link>
      <description>&lt;P&gt;Is this tool still the best or do you know of any who have developed on this matter?&lt;/P&gt;&lt;P&gt;My exact need, is actually to identify which impact a change of a global object will have in all domains.&lt;/P&gt;&lt;P&gt;Meaning, in what rulesets are the object in use?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 08:03:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/80712#M4671</guid>
      <dc:creator>PEO</dc:creator>
      <dc:date>2020-04-03T08:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Global object cleanup</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/80715#M4672</link>
      <description>This script is going over global objects and searching if their are used within each domain, if not then they are reported to be deleted.</description>
      <pubDate>Fri, 03 Apr 2020 08:12:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Global-object-cleanup/m-p/80715#M4672</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2020-04-03T08:12:22Z</dc:date>
    </item>
  </channel>
</rss>

