Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
ipolat
Explorer

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.

 

failures.png

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

That looks like you haven't installed the required Python module as instructed in the README.

0 Kudos
ipolat
Explorer

 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

0 Kudos
Dan_Cannon
Contributor

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/

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events