<?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 Problem to Migrate policy from CMA to SMS by Python script in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134419#M6439</link>
    <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to migrate one policy from CMA to SMS&amp;nbsp;&lt;/P&gt;&lt;P&gt;i saw here the tool&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I installed the SDK on the Security management Home/admin/python and when i execute the python&amp;nbsp;import_export_package.py cmd to export the policy i has an error message&lt;/P&gt;&lt;P&gt;can't open file ' import_export_package.py' errno 2 no such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The python folder cp_mgmt_api_python_sdk-master is on python folder and i execute the command under this folder&lt;/P&gt;&lt;P&gt;someone can help please ??&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 15:54:58 GMT</pubDate>
    <dc:creator>BN</dc:creator>
    <dc:date>2021-11-18T15:54:58Z</dc:date>
    <item>
      <title>Problem to Migrate policy from CMA to SMS by Python script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134419#M6439</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to migrate one policy from CMA to SMS&amp;nbsp;&lt;/P&gt;&lt;P&gt;i saw here the tool&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I installed the SDK on the Security management Home/admin/python and when i execute the python&amp;nbsp;import_export_package.py cmd to export the policy i has an error message&lt;/P&gt;&lt;P&gt;can't open file ' import_export_package.py' errno 2 no such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The python folder cp_mgmt_api_python_sdk-master is on python folder and i execute the command under this folder&lt;/P&gt;&lt;P&gt;someone can help please ??&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 15:54:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134419#M6439</guid>
      <dc:creator>BN</dc:creator>
      <dc:date>2021-11-18T15:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Migrate policy from CMA to SMS by Python script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134424#M6440</link>
      <description>&lt;P&gt;If you’re using R80.20 or above with a recent JHF, we have more official tools for exporting a CMA into an SMS:&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk156072&amp;amp;partition=Basic&amp;amp;product=Multi-Domain" target="_blank" rel="noopener"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk156072&amp;amp;partition=Basic&amp;amp;product=Multi-Domain&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:31:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134424#M6440</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-11-18T17:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Migrate policy from CMA to SMS by Python script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134427#M6441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need just to migrate one policy with this procedure will migrate all the CMA( all object , all policies,..)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now the script is running but just i have an error when i enter the username :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# python import_export_package.py&lt;BR /&gt;Welcome to the Policy Package Import/Export Tool.&lt;BR /&gt;What would you like to do?&lt;BR /&gt;1. Import a package&lt;BR /&gt;2. Export a package&lt;BR /&gt;99. Exit&lt;BR /&gt;2&lt;BR /&gt;Please enter a Policy Package name to export:&lt;BR /&gt;'IE1_Migration_to_not_be_install'&lt;BR /&gt;Please select a login method:&lt;BR /&gt;1. Enter user credentials manually&lt;BR /&gt;2. Login as Root&lt;BR /&gt;3. Use an existing session file&lt;BR /&gt;4. Use an existing session UID&lt;BR /&gt;99. Back&lt;BR /&gt;3&lt;BR /&gt;The script will run with the following parameters:&lt;BR /&gt;Export Access-Control layers = True&lt;BR /&gt;Export NAT layers = True&lt;BR /&gt;Export Threat-Prevention layers = True&lt;BR /&gt;Export HTTPS Inspection layers = True&lt;BR /&gt;Output-file name = None&lt;BR /&gt;Management Server IP = 127.0.0.1&lt;BR /&gt;Management Server Port = 443&lt;BR /&gt;Management Server Domain = None&lt;BR /&gt;1. Change Settings&lt;BR /&gt;2. Run&lt;BR /&gt;99. Back&lt;BR /&gt;2&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 26, in &amp;lt;module&amp;gt;&lt;BR /&gt;args = process_arguments(arg_parser)&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/utils.py", line 108, in process_arguments&lt;BR /&gt;log_file = open(args.log_file, "w",newline='')&lt;BR /&gt;TypeError: 'newline' is an invalid keyword argument for this function&lt;BR /&gt;[Expert@CBSL011:0]# python import_export_package.py&lt;/P&gt;&lt;P&gt;Welcome to the Policy Package Import/Export Tool.&lt;BR /&gt;What would you like to do?&lt;BR /&gt;1. Import a package&lt;BR /&gt;2. Export a package&lt;BR /&gt;99. Exit&lt;BR /&gt;2&lt;BR /&gt;Please enter a Policy Package name to export:&lt;BR /&gt;'IE1_Migration_to_not_be_install'&lt;BR /&gt;Please select a login method:&lt;BR /&gt;1. Enter user credentials manually&lt;BR /&gt;2. Login as Root&lt;BR /&gt;3. Use an existing session file&lt;BR /&gt;4. Use an existing session UID&lt;BR /&gt;99. Back&lt;BR /&gt;1&lt;BR /&gt;The script will run with the following parameters:&lt;BR /&gt;Export Access-Control layers = True&lt;BR /&gt;Export NAT layers = True&lt;BR /&gt;Export Threat-Prevention layers = True&lt;BR /&gt;Export HTTPS Inspection layers = True&lt;BR /&gt;Output-file name = None&lt;BR /&gt;Management Server IP = 127.0.0.1&lt;BR /&gt;Management Server Port = 443&lt;BR /&gt;Management Server Domain = None&lt;BR /&gt;1. Change Settings&lt;BR /&gt;2. Run&lt;BR /&gt;99. Back&lt;BR /&gt;2&lt;BR /&gt;Please enter your username:&lt;BR /&gt;admin&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 26, in &amp;lt;module&amp;gt;&lt;BR /&gt;args = process_arguments(arg_parser)&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/utils.py", line 98, in process_arguments&lt;BR /&gt;args = Menu(args).self_args&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 21, in __init__&lt;BR /&gt;self.build()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 259, in handle_input&lt;BR /&gt;self.self_args.username = input()&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;NameError: name 'admin' is not defined&lt;BR /&gt;[Expert@CBSL011:0]#&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;can you help me please ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:42:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134427#M6441</guid>
      <dc:creator>BN</dc:creator>
      <dc:date>2021-11-18T17:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Migrate policy from CMA to SMS by Python script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134431#M6442</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i exported the package now on the CMA&lt;/P&gt;&lt;P&gt;i have exported access layer .gz and exported package .gz files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;someone can help to import it on the SMS please&lt;/P&gt;&lt;P&gt;&amp;nbsp;which command i need to use please&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:18:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134431#M6442</guid>
      <dc:creator>BN</dc:creator>
      <dc:date>2021-11-18T18:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Migrate policy from CMA to SMS by Python script</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134479#M6443</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying to import the package now and i had this error :&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;&lt;P&gt;Creating a Policy Package named [site1_policy]&lt;/P&gt;&lt;P&gt;Importing general objects&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 63, in &amp;lt;module&amp;gt;&lt;BR /&gt;import_package(client, args)&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/importing/import_package.py", line 53, in import_package&lt;BR /&gt;layers_to_attach = import_objects(args.file, client, {}, package, None, args)&lt;BR /&gt;File "/home/admin/python/ExportImportPolicyPackage-master/importing/import_objects.py", line 63, in import_objects&lt;BR /&gt;export_tar.extractall()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 2081, in extractall&lt;BR /&gt;self.extract(tarinfo, path)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 2118, in extract&lt;BR /&gt;self._extract_member(tarinfo, os.path.join(path, tarinfo.name))&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 2194, in _extract_member&lt;BR /&gt;self.makefile(tarinfo, targetpath)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 2235, in makefile&lt;BR /&gt;copyfileobj(source, target)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 266, in copyfileobj&lt;BR /&gt;shutil.copyfileobj(src, dst)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/shutil.py", line 63, in copyfileobj&lt;BR /&gt;buf = fsrc.read(length)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 831, in read&lt;BR /&gt;buf += self.fileobj.read(size - len(buf))&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 743, in read&lt;BR /&gt;return self.readnormal(size)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 758, in readnormal&lt;BR /&gt;return self.__read(size)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/tarfile.py", line 748, in __read&lt;BR /&gt;buf = self.fileobj.read(size)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/gzip.py", line 267, in read&lt;BR /&gt;self._read(readsize)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/gzip.py", line 314, in _read&lt;BR /&gt;self._read_eof()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/lib/python2.7/gzip.py", line 353, in _read_eof&lt;BR /&gt;hex(self.crc)))&lt;BR /&gt;IOError: CRC check failed 0x171ffe7c != 0xcfb4bea4L&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;someone can help me please ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 11:08:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-Migrate-policy-from-CMA-to-SMS-by-Python-script/m-p/134479#M6443</guid>
      <dc:creator>BN</dc:creator>
      <dc:date>2021-11-19T11:08:02Z</dc:date>
    </item>
  </channel>
</rss>

