- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Position of rules in batch upload
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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" |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
