Hello,
I am trying to create access rules using CSV (bulk method). As you all may know, there can be multiple sources, destinations or services in the rule however, the service parameter in CSV only allows one value a time.
I have tried all combinations to have mgmt_cli parse the CSV column values as list but it doesn't seem to be working. The only way I get it working is by defining multiple columns, like:
layer,source,destination,service.1,service.2,service.3,service.4,service.5,action,name,position,track
Network,dummy-src-1,dummy-dest-1,http,https,ssh,http_proxy,,accept,this-is-a-dummy-rule,2,log
As it can be seen, I had to leave service.5 field Null like ,, for the call to be successful. It is though not very scalable and there are times when it will be required to add maybe 10 services. Yes, a Group can be an option but let's keep at as a last resort.
I have tried:
layer,source,destination,service,action,name,position,track
Network,dummy-src-1,dummy-dest-1,[http,https,ssh,http_proxy],accept,this-is-a-dummy-rule,2,log
Line 2: code: "generic_err_object_not_found"
message: "Requested object [HTTPS, HTTP] not found"
layer,source,destination,service,action,name,position,track
Network,dummy-src-1,dummy-dest-1,["http","https","ssh","http_proxy"],accept,this-is-a-dummy-rule,2,log
Error occured during parsing of CSV file.
Line 2 column 6: Unexpected character in csv file. Double-quotes are expected to come in pairs.
Failed to read parameters file [add_rules.csv]: Invalid format
And multiple other combinations that will make this post very long without any luck.
This is a very practical example so does anyone know how to get that working in a scalable fashion?