You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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'
The text was updated successfully, but these errors were encountered:
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
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'
The text was updated successfully, but these errors were encountered: