- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Python library for using R80 management server API...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Python library for using R80 management server APIsExportImportPolicyPackage
Hi All,
Can someone please help me? I am trying to merge two separate R80.10 SMC into a single R80.10 using ExportImportPolicyPackage-master, while using script i am getting below errors,
File "import_export_package.py", line 5, in <module>
from cp_mgmt_api_python_sdk.lib import APIClientArgs
ImportError: cannot import name 'APIClientArgs'
I tried to fix but no luck, would really appreciate if someone can help
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please look at the instructions:
https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/#instructions
Particularly at:
https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/#sdk-usage-from-a-management-machine
It can run on either the Management server or somewhere else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure that cp_mgmt_api_python_sdk is in same folder as your script, otherwise it will fail to load those modules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Martin, Its working for me now. one doubt about something VPN and NAT as completely not merged even it did not copied any gateways as well, finally i had manual work to complete these items, so is it a normal behavior with this script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm assuming you're referring to this script: Python tool for exporting/importing a policy package or parts of it
The script does have some limitations, namely because the API does not expose everything you need to export and import.
Read the discussion attached to the script for details.
This means some items will have to be done manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Dameon Welch-Abernathy thank you so much for your response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
As well as adding others, if an error like this still appears, first install the cp_mgmt_api_python_sdk-master. By way of cmd, move to that directory, run setup.py
the details: C: \cp_mgmt_api_python_sdk-master> setup.py
Hope this helps us all.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having the same issue as this thread. Does this need to be run from a remote host, or can i run this from the management server itself? the directions is a bit iffy.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please look at the instructions:
https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/#instructions
Particularly at:
https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/#sdk-usage-from-a-management-machine
It can run on either the Management server or somewhere else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did that but still no luck.
echo $PYTHONPATH
:/home/admin/cp_mgmt_api_python_sdk-master/:/home/admin/cp_mgmt_api_python_sdk-master/:/home/admin/cp_mgmt_api_python_sdk-master/
ls -lh
total 104M
drwxr-xr-x 3 admin root 4.0K Feb 18 19:42 ExportImportPolicyPackage-master
-rwxr----- 1 admin root 1.6M Nov 27 2019 IPSUpdateRevert
drwxr-xr-x 3 admin root 4.0K Feb 18 20:11 cp_mgmt_api_python_sdk-master
/opt/CPsuite-R80/fw1/Python/bin/python2.7 /home/admin/ExportImportP olicyPackage-master/ExportImportPolicyPackage-master/import_export_package.py
Traceback (most recent call last):
File "/home/admin/ExportImportPolicyPackage-master/ExportImportPolicyPackage-master/im port_export_package.py", line 5, in <module>
from cpapi import APIClient, APIClientArgs
ImportError: No module named cpapi
