Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew-OCD
Contributor

Error when using Import/Export script - not in singular_to_plural_dictionary[client.api_version]

Dear Check Mates,

I recently uploaded the latest version of the following files:-

ExportImportPolicyPackage-master

cp_mgmt_api_python_sdk-master

to my MDSM and when I try to use the import_export_package.py I am getting the following error on a relatively simple policy.

 

This is the error I get returned:-

Exporting Access Control layers

Exporting Access Layer [TEMPLATE-FWOT001-Policy Network]

Retrieved 14 out of 14 rules (100%)

Traceback (most recent call last):
File "/home/Andrew/Python/ExportImportPolicyPackage-master/import_export_package.py", line 73, in <module>
export_package(client, args)
File "/home/Andrew/Python/ExportImportPolicyPackage-master/exporting/export_package.py", line 44, in export_package
= export_access_rulebase(show_package.data["name"], access_layer["name"], access_layer["uid"], client, timestamp, tar_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Andrew/Python/ExportImportPolicyPackage-master/exporting/export_access_rulebase.py", line 16, in export_access_rulebase
get_query_rulebase_data(client, "access-rulebase", {"name": layer, "uid": layer_uid, "package": package})
File "/home/Andrew/Python/ExportImportPolicyPackage-master/exporting/export_objects.py", line 118, in get_query_rulebase_data
check_for_export_error(general_object, client)
File "/home/Andrew/Python/ExportImportPolicyPackage-master/utils.py", line 474, in check_for_export_error
general_object["type"] not in singular_to_plural_dictionary[client.api_version]):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: '2.0.1'

 

This is the output I get in the import_export.log:-

Checking existence of package [TEMPLATE-FWOT001-Policy]

Exporting Access Control layers

Exporting Access Layer [TEMPLATE-FWOT001-Policy Network]

Getting layer information for layer [TEMPLATE-FWOT001-Policy Network]

Getting information from show-access-rulebase

Retrieved 14 out of 14 rules (100%)

##Show presented object of type RulebaseAction with name Accept

##Show presented object of type CpmiAnyObject with name Any

##Show presented object of type host with name BROADCAST

 

I have tried to perform this export with multiple policies and I get the same error message.

Has anybody else seen such behaviour and can suggest a course of action to track down the fault? 

Thanks

Andrew

0 Kudos
2 Replies
Andrew-OCD
Contributor

FYI

MDSM running R82 JHF Take 91

0 Kudos
Tal_Paz-Fridman
MVP Platinum CHKP MVP Platinum CHKP
MVP Platinum CHKP

Hi @Andrew-OCD 

I will forward your post to the relevant owners in R&D to see if they can help

Thanks

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events