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

Show specific rule using api

I have a r80.30 SMS with 5 policies

I am working on recreating this on another SMS server, but i only am wanting to take a subset of the rules out, so i am going through one by one to determine if i need this or not and if a rule above would encompass that.

When i find a rule that i want to copy over i am just manually creating it on the new SMS server. I was looking for a way to be able to run the mgmt_cli on the old SMS and specify the rule number and get that output and then use to create the same rule on the new SMS.

Is there a way of doing this. I am stuck trying to figure out how to even export a specific rule using mgmt_cli using the show access rule-base filter but can't figure out what to put in the filter to specify policy name and rule number in that policy

 

 

 

0 Kudos
Reply
4 Replies
Contributor

Going on in that way, if you have a new SMS, you need to create also the objects...

If your goal is to copy for each policy packages on the old SMS only the rules that you need into the new SMS, i suggest you to leverage on the import export tool to copy all the policy packages and objects.
Then on the new SMS use the mgmt_cli with the appropiate filter to delete the rules that you don't need and eventually the unused objects.

Take a look to api guide  for same examples on how to use filter...

0 Kudos
Reply
Participant

Yes i agree and i have already imported all the objects so all of them exist in the new SMS

And in a perfect world i would use the import/export tool to do this and delete the rules i don't need. But under the circumstances i am in, this is the only way i can do it, so i am trying to make this as easy as possible, which seems to be this way.

0 Kudos
Reply
Contributor

Can this post help you?

0 Kudos
Reply
Admin
Admin

If you right click on a rule, one of the options is "Copy Rule UID."
You can use that to do something like show access-rule uid X.
From there, you could probably script the equivalent add access-rule cli/api call.
0 Kudos
Reply