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

Position of rules in batch upload

Hi All,

I'm using the API with the mgmt_cli --batch parameter to do a mass upload of rules. Has anyone had any luck with using something other than top or bottom in the position parameter? If I run the command manually I can use above, below, etc but when I use those parameters in the csv it returns an error for invalid value for position, and shows the only two values as top or bottom. Anyone have any experience with this?

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

What is the full CLI you are trying?

And have you tried it without the CSV file (i.e. just adding a single rule) to validate the syntax is correct?

Kris_Meldrum
Contributor

Here is a sample of one of the rules. If you try running this just in the CLI it succeeds. If I run this from the batch it'll fail with invalid parameter position. Valid entries are [top, bottom]

mgmt_cli add nat-rule -d Sandbox_Lab_2 package Standard original-source Source1 original-destination Destination1_NAT method static translated-destination Destination1 comments "sample rule"  position.above "# NAT Rules for Vendors"
PhoneBoy
Admin
Admin

I was able to insert NAT rules above a manually created NAT rule successfully.

The CLI call? mgmt_cli -r true add nat-rule --batch csv

The header of my CSV file looks something like this:

package,original-source,original-destination,method,translated-source,translated-destination,comments,position.above

What I used in position.above was the rule UID of the rule I wanted to put the rules above.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events