<?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: Output from show-gateways-and-servers API call in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227788#M8750</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I reinstalled a policy package for the virtual system that was causing issues, and everything started working as expected. However, I still consider this to be a bug, with the reinstallation serving only as the workaround. When using the 'show-gateways-and-servers' API call, you should receive a non-empty 'policy' object for each virtual system where a policy package was previously installed.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ZdenekR&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2024 14:59:10 GMT</pubDate>
    <dc:creator>ZdenekR</dc:creator>
    <dc:date>2024-09-24T14:59:10Z</dc:date>
    <item>
      <title>Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226855#M8736</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am working on the script that collects a policy package for the specific gateway (virtual system).&lt;BR /&gt;It works very well in the lab but in production environment I noticed the following&lt;BR /&gt;behavior.&lt;/P&gt;&lt;P&gt;API call "show-gateways-and-servers" with "details-level full" should return&lt;BR /&gt;list of objects. If the object type is equal to "CpmiVsxClusterNetobj" and it is&lt;BR /&gt;virtual system there should be "policy" object that contains the key "access-policy-name".&lt;/P&gt;&lt;P&gt;See the example below (the output is shortened):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "uid" : "f47b987d-f3d8-4ae2-b5ca-a562c7fd43ef",
    "name" : "VS01",
    "type" : "CpmiVsClusterNetobj",
    "domain" : {
      "uid" : "886fb185-487f-4ccf-94f4-ddc8443f6760",
      "name" : "DOM02",
      "domain-type" : "domain"
    },
    "policy" : {
      "access-policy-installed" : true,
      "access-policy-name" : "VS01_POL01",
      "access-policy-installation-date" : {
        "posix" : 1726439380347,
        "iso-8601" : "2024-09-16T00:29+0200"
      },
      "threat-policy-installed" : false&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But in production there are several virtual systems which has the "policy" object empty like in the following example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "uid" : "f47b987d-f3d8-4ae2-b5ca-a562c7fd43ef",
    "name" : "VS05",
    "type" : "CpmiVsClusterNetobj",
    "domain" : {
      "uid" : "886fb185-487f-4ccf-94f4-ddc8443f6761",
      "name" : "DOM05",
      "domain-type" : "domain"
    },
    "policy" : {
    },
      "threat-policy-installed" : false&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;My understanding is that in case a policy package was successfully installed on a virtual system, the "policy" object should not stay empty. Is my understanding correct? Or are there any corner cases when this is not true? Like after MDS server upgrade or after purging all revisions from a domain. To be honest, I have already tested all mentioned corner cases in a lab, but I was not able to simulate the situation with empty "policy" object.&lt;/P&gt;&lt;P&gt;We are using 2x MDS server with version R81.20 Take 76 + 2x MLM. Firewalls are using VSX R81.10 or R81.20. I have noticed that if the "policy" object is empty also "Installation History" shows empty "Access Control Policy" and "Access Installation Date" in SmartConsole application. Like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="smartconsole.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/27653iFBEC5787A55A2A2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="smartconsole.png" alt="smartconsole.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea about this behavior? Is this a bug?&lt;/P&gt;&lt;P&gt;Any suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ZdenekR&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, 16 Sep 2024 23:21:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226855#M8736</guid>
      <dc:creator>ZdenekR</dc:creator>
      <dc:date>2024-09-16T23:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226882#M8738</link>
      <description>&lt;P&gt;Before anything else, can you show what your script looks like? Also, do you actually follow up the policy installation process results in your script? Installation success/error messages could give you a clue.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 07:29:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226882#M8738</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2024-09-17T07:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226893#M8739</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your quick reply. To be honest, it is a python module on which I am working, which probably will be difficult to present here. But I created another bash script which can be easily understood and can show the problem I am dealing with. See this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash
fwname=$1
mgmt_cli -r true login &amp;gt; session
fwname="VS01"
[Expert@MDS01:0]# mgmt_cli show gateways-and-servers details-level full -f json -s session | jq --arg fwname "$fwname" -r '.["objects"][] | select(.type=="CpmiVsClusterNetobj" and .name==$fwname) | [.name,.policy]'
mgmt_cli logout -s session&lt;/LI-CODE&gt;&lt;P&gt;In my lab the output from the above script looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Expert@MDS01:0]# ./getppol.sh VS01
[
  "VS01",
  {
    "access-policy-installed": true,
    "access-policy-name": "VS01_POL01",
    "access-policy-installation-date": {
      "posix": 1726439380347,
      "iso-8601": "2024-09-16T00:29+0200"
    },
    "threat-policy-installed": false
  }
]
message: "OK"

[Expert@MDS01:0]#&lt;/LI-CODE&gt;&lt;P&gt;In production environment the output looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Expert@srv01_mds01:0]# ./getppol.sh VS02
[
  "VS02",
  {
  }
]
message: "OK"

[Expert@srv01_mds01:0]#&lt;/LI-CODE&gt;&lt;P&gt;I will probably open a TAC case with Check Point but before I do it I would like to know someones view on this problem. Is this a bug? or Does this shows a problem within the production environment? or Might this be a result of an upgrade and simple policy installation will resolve this issue?&lt;/P&gt;&lt;P&gt;I have not tried to install a policy yet as this means to open a change, go through an approval process and to answer lots of questions. But this will be probably the next step before I open the TAC case.&lt;/P&gt;&lt;P&gt;Anyway, any help and comment is really appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ZdenekR&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 09:29:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/226893#M8739</guid>
      <dc:creator>ZdenekR</dc:creator>
      <dc:date>2024-09-17T09:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227006#M8740</link>
      <description>&lt;P&gt;Not sure how well VS objects are handled here.&lt;BR /&gt;Tagging&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/37502"&gt;@Omer_Kleinstern&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 21:28:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227006#M8740</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-09-17T21:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227788#M8750</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I reinstalled a policy package for the virtual system that was causing issues, and everything started working as expected. However, I still consider this to be a bug, with the reinstallation serving only as the workaround. When using the 'show-gateways-and-servers' API call, you should receive a non-empty 'policy' object for each virtual system where a policy package was previously installed.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ZdenekR&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:59:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227788#M8750</guid>
      <dc:creator>ZdenekR</dc:creator>
      <dc:date>2024-09-24T14:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Output from show-gateways-and-servers API call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227932#M8751</link>
      <description>&lt;P&gt;This should probably be addressed through a TAC case: &lt;A href="https://help.checkpoint.com" target="_blank"&gt;https://help.checkpoint.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 17:12:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Output-from-show-gateways-and-servers-API-call/m-p/227932#M8751</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-09-25T17:12:13Z</dc:date>
    </item>
  </channel>
</rss>

