Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAT rulebase export issue #29

Open
0dadj1an opened this issue Aug 24, 2020 · 1 comment
Open

NAT rulebase export issue #29

0dadj1an opened this issue Aug 24, 2020 · 1 comment

Comments

@0dadj1an
Copy link

When NAT policy has just one manual rule defined (rest are auto rules based on object NAT), script failed completely.
Workaround is just to add second manual fake NAT rule, than it works OK
NAt_rules

Exporting NAT policy

Getting information from show-nat-rulebase

Retrieved 50 out of 292 rules (17%)

Retrieved 100 out of 292 rules (34%)

Traceback (most recent call last):
File "/home/ivo.hrbacek/scripts/ExportImportPolicyPackage/import_export_package.py", line 59, in
export_package(client, args)
File "/home/ivo.hrbacek/scripts/ExportImportPolicyPackage/exporting/export_package.py", line 59, in export_package
nat_data_dict, nat_unexportable_objects = export_nat_rulebase(show_package.data["name"], client)
File "/home/ivo.hrbacek/scripts/ExportImportPolicyPackage/exporting/export_nat_rulebase.py", line 13, in export_nat_rulebase
rulebase_rules, general_objects = get_query_nat_rulebase_data(client, {"package": package})
File "/home/ivo.hrbacek/scripts/ExportImportPolicyPackage/exporting/export_objects.py", line 187, in get_query_nat_rulebase_data
rulebase_items[len(rulebase_items) - 1]["rulebase"].extend(non_empty_rulebase_items[0]["rulebase"])
KeyError: 'rulebase'

@chkp-royl
Copy link
Contributor

chkp-royl commented Aug 25, 2020

Hi @0dadj1an , please do the following:

  1. Reproduce the issue
  2. Connect to Mgmt via SSH and execute api status -s
  3. Send the output (.tgz file) + tool logs to [email protected]
  4. Specify from which version you try to export

Thanks,
Roy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants