Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
WarpTeam
Participant

python import_export_package.py

Hello,

I need to export a policy package from one SMS and import into another with several policies already in place so I´m trying to use the python API import_export_package.py. The problem is that when exporting finishes at least the Network objects, services and time objects are not exported. Initially I thought it was not being imported correctly but then I realised these objects are not on the exported files. The rules are exported and imported correctly. 

I´m using python version  3.11.8 and SMS is n R81.10.

Can anyone give me some ideas about this?

Thank you.

Nuno

0 Kudos
16 Replies
the_rock
Legend
Legend

0 Kudos
WarpTeam
Participant

Hi Andy,

yes it was. Worked fine for the rules but not for the rest.

the_rock
Legend
Legend

If you send me the exact process you followed, happy to try it in the lab.

Best,

Andy

0 Kudos
the_rock
Legend
Legend

As a matter of fact, let me test it now. I will build brand new mgmt in eve-ng on R81.20 and let you know what happens.

Andy

0 Kudos
WarpTeam
Participant

OK. Let me know.

Thank you.

Nuno

the_rock
Legend
Legend

Will do. BUT, just to keep it consistent, as I like to do everything the right way the first time, can you please send the EXACT steps you did, so I can follow the same?

Best,

Andy

0 Kudos
WarpTeam
Participant

Sure, please find attached the copy of the script that I run.

0 Kudos
the_rock
Legend
Legend

I think I will just use built in version 3.9 from $FWDIR/Python dir.

Thank you.

Andy

0 Kudos
the_rock
Legend
Legend

Just working on something else now, but will do it later on, for sure.

Andy

0 Kudos
the_rock
Legend
Legend

My colleague and I are having some challenges doing this from ssh, we even tried running it from $FWDIR/Python/bin dir, but no joy. Your screenshot would indicate you did this from windows PC?

Andy

0 Kudos
WarpTeam
Participant

That´s correct, was done from a win PC.

Nuno.

0 Kudos
the_rock
Legend
Legend

Ok, thats what I thought. Let us see if we can get this going from the actual CP mgmt server, we will try dedicated mgmt and also standalone one.

Best,

Andy

0 Kudos
the_rock
Legend
Legend

K, was able to replicate it, exact same issue as you on R81.10. I tested it on R81.20, jumbo 45.

Best,

Andy

0 Kudos
WarpTeam
Participant

Hello Andy,

so is there a way to fix this? Did it worked with other versions in the past?

this would be a great solution to import a policy package from one SMS to another one with several policy packages already in place. Migrate_server export and import is not feasible here as it would rewrite contents in destination and doing this manually will consume a lot of hours.

Thank you.

Nuno

 

0 Kudos
the_rock
Legend
Legend

Agree. Migrate server imports everything. Not sure about older versions, never tried. Might be worth TAC case.

Andy

0 Kudos
mscott5002
Explorer

Hi Nuno.

I'd like to get involved in this test.  Is there a specific version/package of Python you installed on your Win PC?  I'd like to minimize the differences in our environments for my testing.

Thanks, Mike

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events