- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Python tool for exporting/importing a policy p...
- 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 tool for exporting/importing a policy package failure cpapi module not import
Hello everyone,
R80.30 We have a checkpoint management server. And we need to export the policy package. For this, we used the blog linked below.
"https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Python-tool-for-exporting-importi... "
However, we provided all the prerequisites mentioned on the blog and when we first ran the script we got the error on the screen. What is the cause of the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That looks like you haven't installed the required Python module as instructed in the README.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PhoneBoy,
Thanks for your quickly answer. But we can not install cpapi module into gaia operating system. Do we apply this procedure in checkpoint management sheel or our windows machine?
Thanks Again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it depends on where you are running the script. If it is locally on your machine then install the cpapi as per the readme and test again.
but if it's on the management you need to be careful to follow the below instructions and make sure you add the path variable. Otherwise the script will fail.
SDK usage from a management machine
Follow the instructions above in the "Download the repository" section, to download the repository but do not run pip install .
After the downloading, copy the SDK to the machine (use scp, WinSCP or similar tool).
Configure your environment variables
export PYTHONPATH=$PYTHONPATH:<“CP-SDK” FULL PATH>
For example, if you copied the SDK to the path “/home/admin/” the command will be:
export PYTHONPATH=$PYTHONPATH:/home/admin/cp_mgmt_api_python_sdk/
