JSON Support

For automation purpose it may be convenient to view and configure polycing settings in JSON format.

Output of TEST tariff plan polycing settings in JSON format:

fdpi_ctrl list profile --policing --profile.name TEST --outformat json

Downloading the TEST tariff plan policing settings in JSON format:

Short format (burst, cburst are calculated automatically):

fdpi_ctrl load profile --policing --profile.name TEST --profile.json '{ "type":"HTB", "outbound":{ "root_rate":"20mbit","root_ceil":"20mbit", "classes" : [ {"class":0, "rate":"8bit", "ceil":"20mbit"},{"class":1, "rate":"8bit", "ceil":"20mbit"},{"class":2, "rate":"8bit", "ceil":"20mbit"},{"class":3, "rate":"8bit", "ceil":"20mbit"},{"class":4, "rate":"8bit", "ceil":"20mbit"},{"class":5, "rate":"8bit", "ceil":"20mbit"},{"class":6, "rate":"8bit", "ceil":"20mbit"},{"class":7, "rate":"8bit", "ceil":"20mbit"} ]}, "inbound":{ "root_rate":"20mbit","root_ceil":"20mbit", "classes" : [ {"class":0, "rate":"8bit", "ceil":"20mbit"},{"class":1, "rate":"8bit", "ceil":"20mbit"},{"class":2, "rate":"8bit", "ceil":"20mbit"},{"class":3, "rate":"8bit", "ceil":"20mbit"},{"class":4, "rate":"8bit", "ceil":"20mbit"},{"class":5, "rate":"8bit", "ceil":"20mbit"},{"class":6, "rate":"8bit", "ceil":"20mbit"},{"class":7, "rate":"8bit", "ceil":"20mbit"} ]}}'

Full format

fdpi_ctrl load profile --policing --profile.name TEST --profile.json '{ "type":"HTB", "outbound":{  "root_rate":"20mbit","root_ceil":"20mbit","root_burst":"10mbit","root_cburst":"10mbit" , "classes" : [ {"class":0, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":1, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":2, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":3, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":4, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":5, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":6, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":7, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" } ]}, "inbound":{ "root_rate":"20mbit","root_ceil":"20mbit","root_burst":"10mbit","root_cburst":"10mbit" , "classes" : [ {"class":0, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":1, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":2, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":3, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":4, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":5, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":6, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" },{"class":7, "rate":"8bit", "ceil":"20mbit","burst":"8bit","cburst":"10mbit" } ]}}'