<?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: ExportImportPolicyPackage import error in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197423#M8181</link>
    <description>&lt;P&gt;I would prefer to resolve it by setting the request items all the time.&lt;/P&gt;
&lt;P&gt;It makes a lot more sense in the audit logs.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 12:55:38 GMT</pubDate>
    <dc:creator>Hugo_vd_Kooij</dc:creator>
    <dc:date>2023-11-08T12:55:38Z</dc:date>
    <item>
      <title>ExportImportPolicyPackage import error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197391#M8179</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have been testing&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt;&amp;nbsp;importing and exporting policy packages in the lab and it was all good.&lt;BR /&gt;However I am trying to import a policy package in a production Firewall Manager running r81.10 take 110 (it was initially r80.40 and upgraded to r81.10 a while ago) and the scripts breaks pretty much from the beginning.&lt;BR /&gt;&lt;BR /&gt;These are the errors I get:&amp;nbsp;&lt;BR /&gt;- The trace shows that the script breaks when it tries to publish&lt;BR /&gt;-&amp;nbsp;&amp;nbsp;/opt/CPsuite-R81.10/fw1/log/api.elg shows that publish fails due to "Publish cannot be performed without entering a session name and description"&lt;BR /&gt;&lt;BR /&gt;Exactly the same import operation is successful&amp;nbsp; in the lab firewall manager&amp;nbsp; running r81.10 take 95&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Creating a Policy Package named [Policy]&lt;/P&gt;
&lt;P&gt;Importing general objects&lt;/P&gt;
&lt;P&gt;Adding hosts&lt;/P&gt;
&lt;P&gt;Managed to import API object from type host by add-objects-batch API call.&lt;BR /&gt;Now trying to publish.&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 71, in &amp;lt;module&amp;gt;&lt;BR /&gt;import_package(client, args)&lt;BR /&gt;File "/home/admin/software/ExportImportPolicyPackage-master/importing/import_package.py", line 56, in import_package&lt;BR /&gt;layers_to_attach = import_objects(args.file, client, {}, package, None, args)&lt;BR /&gt;File "/home/admin/software/ExportImportPolicyPackage-master/importing/import_objects.py", line 185, in import_objects&lt;BR /&gt;batch_succeeded = add_batch_objects(api_type, command, client, args, batch_payload)&lt;BR /&gt;File "/home/admin/software/ExportImportPolicyPackage-master/importing/import_objects.py", line 862, in add_batch_objects&lt;BR /&gt;api_reply = handle_publish(client, api_type)&lt;BR /&gt;File "/home/admin/software/ExportImportPolicyPackage-master/importing/import_objects.py", line 899, in handle_publish&lt;BR /&gt;" from said file were not imported!. Message: " + str(publish_reply.error_message),&lt;BR /&gt;AttributeError: 'APIResponse' object has no attribute 'error_message'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/CPsuite-R81.10/fw1/log/api.elg&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2023-11-08 09:53:01,537 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:412 [qtp-2043826156-157589] - Executing [show-task] of version [1.6.1] (references 1.3)&lt;BR /&gt;2023-11-08 09:53:01,538 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp-2043826156-157589] - Outbound Message&lt;BR /&gt;---------------------------&lt;BR /&gt;ID: 2480&lt;BR /&gt;Response-Code: 200&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], Date=[Wed, 08 Nov 2023 09:53:01 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt;"tasks" : [ {&lt;BR /&gt;"task-id" : "abcdef01-2345-6789-a1c6-460bc3c21856",&lt;BR /&gt;"task-name" : "add-objects-batch",&lt;BR /&gt;"status" : "succeeded",&lt;BR /&gt;"progress-percentage" : 100,&lt;BR /&gt;"progress-description" : "Operation Complete",&lt;BR /&gt;"suppressed" : false,&lt;BR /&gt;"task-details" : [ {&lt;BR /&gt;"status" : "Batch operation completed successfully"&lt;BR /&gt;} ]&lt;BR /&gt;} ]&lt;BR /&gt;}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:01,539 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp-2043826156-192060] - Inbound Message&lt;BR /&gt;----------------------------&lt;BR /&gt;ID: 2481&lt;BR /&gt;Address: &lt;A href="http://127.0.0.1:51133/web_api/v1.6.1/publish" target="_blank"&gt;http://127.0.0.1:51133/web_api/v1.6.1/publish&lt;/A&gt;&lt;BR /&gt;Encoding: UTF-8&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Accept=[*/*], accept-encoding=[identity], connection=[keep-alive], Content-Length=[2], content-type=[application/json], Host=[127.0.0.1:51133], User-Agent=[python-api-wrapper], X-chkp-sid=[574e70eb0d92745c80697faf2b3b2a21], X-Forwarded-For=[127.0.0.1], X-Forwarded-Host=[127.0.0.1], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.71.11.71]}&lt;BR /&gt;Payload: {}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:01,539 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:412 [qtp-2043826156-192060] - Executing [publish] of version [1.6.1] (references 1)&lt;BR /&gt;2023-11-08 09:53:01,545 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp-2043826156-192060] - Outbound Message&lt;BR /&gt;---------------------------&lt;BR /&gt;ID: 2481&lt;BR /&gt;Response-Code: 200&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], X-chkp-sync-task-id=[01234567-89ab-cdef-ae62-db43e4242700], Date=[Wed, 08 Nov 2023 09:53:01 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt;"task-id" : "01234567-89ab-cdef-ae62-db43e4242700"&lt;BR /&gt;}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:01,546 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp-2043826156-157589] - Inbound Message&lt;BR /&gt;----------------------------&lt;BR /&gt;ID: 2482&lt;BR /&gt;Address: &lt;A href="http://127.0.0.1:51133/web_api/v1.6.1/show-task" target="_blank"&gt;http://127.0.0.1:51133/web_api/v1.6.1/show-task&lt;/A&gt;&lt;BR /&gt;Encoding: UTF-8&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Accept=[*/*], accept-encoding=[identity], connection=[keep-alive], Content-Length=[76], content-type=[application/json], Host=[127.0.0.1:51133], User-Agent=[python-api-wrapper], X-chkp-sid=[574e70eb0d92745c80697faf2b3b2a21], X-Forwarded-For=[127.0.0.1], X-Forwarded-Host=[127.0.0.1], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.71.11.71]}&lt;BR /&gt;Payload: {"task-id": "01234567-89ab-cdef-ae62-db43e4242700", "details-level": "full"}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:01,546 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:412 [qtp-2043826156-157589] - Executing [show-task] of version [1.6.1] (references 1.3)&lt;BR /&gt;2023-11-08 09:53:01,547 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp-2043826156-157589] - Outbound Message&lt;BR /&gt;---------------------------&lt;BR /&gt;ID: 2482&lt;BR /&gt;Response-Code: 200&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], Date=[Wed, 08 Nov 2023 09:53:01 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt;"tasks" : [ {&lt;BR /&gt;"task-id" : "01234567-89ab-cdef-ae62-db43e4242700",&lt;BR /&gt;"task-name" : "Publish operation",&lt;BR /&gt;"status" : "in progress",&lt;BR /&gt;"progress-percentage" : 0,&lt;BR /&gt;"suppressed" : false&lt;BR /&gt;} ]&lt;BR /&gt;}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:03,550 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp-2043826156-192060] - Inbound Message&lt;BR /&gt;----------------------------&lt;BR /&gt;ID: 2483&lt;BR /&gt;Address: &lt;A href="http://127.0.0.1:51133/web_api/v1.6.1/show-task" target="_blank"&gt;http://127.0.0.1:51133/web_api/v1.6.1/show-task&lt;/A&gt;&lt;BR /&gt;Encoding: UTF-8&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Accept=[*/*], accept-encoding=[identity], connection=[keep-alive], Content-Length=[76], content-type=[application/json], Host=[127.0.0.1:51133], User-Agent=[python-api-wrapper], X-chkp-sid=[574e70eb0d92745c80697faf2b3b2a21], X-Forwarded-For=[127.0.0.1], X-Forwarded-Host=[127.0.0.1], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.71.11.71]}&lt;BR /&gt;Payload: {"task-id": "01234567-89ab-cdef-ae62-db43e4242700", "details-level": "full"}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:03,551 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:412 [qtp-2043826156-192060] - Executing [show-task] of version [1.6.1] (references 1.3)&lt;BR /&gt;2023-11-08 09:53:03,552 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp-2043826156-192060] - Outbound Message&lt;BR /&gt;---------------------------&lt;BR /&gt;ID: 2483&lt;BR /&gt;Response-Code: 200&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], Date=[Wed, 08 Nov 2023 09:53:03 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt;"tasks" : [ {&lt;BR /&gt;"task-id" : "01234567-89ab-cdef-ae62-db43e4242700",&lt;BR /&gt;"task-name" : "Publish operation",&lt;BR /&gt;"status" : "failed",&lt;BR /&gt;"progress-percentage" : 100,&lt;BR /&gt;"suppressed" : false,&lt;BR /&gt;"task-details" : [ {&lt;BR /&gt;"fault-message" : "Publish cannot be performed without entering a session name and description."&lt;BR /&gt;} ]&lt;BR /&gt;} ]&lt;BR /&gt;}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:03,553 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp-2043826156-157589] - Inbound Message&lt;BR /&gt;----------------------------&lt;BR /&gt;ID: 2484&lt;BR /&gt;Address: &lt;A href="http://127.0.0.1:51133/web_api/v1.6.1/logout" target="_blank"&gt;http://127.0.0.1:51133/web_api/v1.6.1/logout&lt;/A&gt;&lt;BR /&gt;Encoding: UTF-8&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Accept=[*/*], accept-encoding=[identity], connection=[keep-alive], Content-Length=[2], content-type=[application/json], Host=[127.0.0.1:51133], User-Agent=[python-api-wrapper], X-chkp-sid=[574e70eb0d92745c80697faf2b3b2a21], X-Forwarded-For=[127.0.0.1], X-Forwarded-Host=[127.0.0.1], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.71.11.71]}&lt;BR /&gt;Payload: {}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2023-11-08 09:53:03,554 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:412 [qtp-2043826156-157589] - Executing [logout] of version [1.6.1] (references 1)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:18:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197391#M8179</guid>
      <dc:creator>Luis_Miguel_Mig</dc:creator>
      <dc:date>2023-11-08T10:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: ExportImportPolicyPackage import error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197406#M8180</link>
      <description>&lt;P&gt;I got it sorted by disabling "all sessions must have a description" at manage/settings -&amp;gt; Sessions -&amp;gt; Advanced&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditor_3850b23c676c07Luis_Miguel_Mig_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:46:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197406#M8180</guid>
      <dc:creator>Luis_Miguel_Mig</dc:creator>
      <dc:date>2023-11-08T10:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: ExportImportPolicyPackage import error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197423#M8181</link>
      <description>&lt;P&gt;I would prefer to resolve it by setting the request items all the time.&lt;/P&gt;
&lt;P&gt;It makes a lot more sense in the audit logs.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 12:55:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197423#M8181</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2023-11-08T12:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: ExportImportPolicyPackage import error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197424#M8182</link>
      <description>&lt;P&gt;Me too, but it requires modifying the python script. It may be a good feature request&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 13:01:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197424#M8182</guid>
      <dc:creator>Luis_Miguel_Mig</dc:creator>
      <dc:date>2023-11-08T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: ExportImportPolicyPackage import error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197509#M8186</link>
      <description>&lt;P&gt;The script is Open Source, so you can submit a pull request with the relevant change.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 21:43:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/ExportImportPolicyPackage-import-error/m-p/197509#M8186</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-11-08T21:43:54Z</dc:date>
    </item>
  </channel>
</rss>

