Hi,
Thanks for your response
i need just to migrate one policy with this procedure will migrate all the CMA( all object , all policies,..)
now the script is running but just i have an error when i enter the username :
# python import_export_package.py
Welcome to the Policy Package Import/Export Tool.
What would you like to do?
1. Import a package
2. Export a package
99. Exit
2
Please enter a Policy Package name to export:
'IE1_Migration_to_not_be_install'
Please select a login method:
1. Enter user credentials manually
2. Login as Root
3. Use an existing session file
4. Use an existing session UID
99. Back
3
The script will run with the following parameters:
Export Access-Control layers = True
Export NAT layers = True
Export Threat-Prevention layers = True
Export HTTPS Inspection layers = True
Output-file name = None
Management Server IP = 127.0.0.1
Management Server Port = 443
Management Server Domain = None
1. Change Settings
2. Run
99. Back
2
Traceback (most recent call last):
File "import_export_package.py", line 26, in <module>
args = process_arguments(arg_parser)
File "/home/admin/python/ExportImportPolicyPackage-master/utils.py", line 108, in process_arguments
log_file = open(args.log_file, "w",newline='')
TypeError: 'newline' is an invalid keyword argument for this function
[Expert@CBSL011:0]# python import_export_package.py
Welcome to the Policy Package Import/Export Tool.
What would you like to do?
1. Import a package
2. Export a package
99. Exit
2
Please enter a Policy Package name to export:
'IE1_Migration_to_not_be_install'
Please select a login method:
1. Enter user credentials manually
2. Login as Root
3. Use an existing session file
4. Use an existing session UID
99. Back
1
The script will run with the following parameters:
Export Access-Control layers = True
Export NAT layers = True
Export Threat-Prevention layers = True
Export HTTPS Inspection layers = True
Output-file name = None
Management Server IP = 127.0.0.1
Management Server Port = 443
Management Server Domain = None
1. Change Settings
2. Run
99. Back
2
Please enter your username:
admin
Traceback (most recent call last):
File "import_export_package.py", line 26, in <module>
args = process_arguments(arg_parser)
File "/home/admin/python/ExportImportPolicyPackage-master/utils.py", line 98, in process_arguments
args = Menu(args).self_args
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 21, in __init__
self.build()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build
self.display()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display
self.handle_input()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input
self.build()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build
self.display()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display
self.handle_input()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input
self.build()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build
self.display()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display
self.handle_input()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input
self.build()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build
self.display()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display
self.handle_input()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input
self.build()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 146, in build
self.display()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 30, in display
self.handle_input()
File "/home/admin/python/ExportImportPolicyPackage-master/menu.py", line 259, in handle_input
self.self_args.username = input()
File "<string>", line 1, in <module>
NameError: name 'admin' is not defined
[Expert@CBSL011:0]#
can you help me please ?
Thanks