Handle CIDR routing targets
Handle CIDR routing targets, such as listing, add, delete or update.
Examples:
vcli cidrroutes list
vcli cidrroutes ls -f id=1
vcli cidrroutes ls -f name="MyCIDRRoute*"
vcli cidrroutes add myCIDRRoute --reject --cidr=216.86.96.0/19,176.82.0.0/16
vcli cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1,176.82.0.0/16:2
vcli cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1~2,216.86.96.0/19:1~3 --subdecision=weight (~<number represents weight(optional))
vcli cidrroutes add myCIDRRoute --cidr=12:3456:78:90ab:cd:ef01:23:30/125:1
vcli cidrroutes add myCIDRRoute --cidr-csv=my_cidrs.csv
vcli cidrroutes update 1 --name newname
vcli cidrroutes delete 1
vcli cidrroutes inspect 1
CSV: Note: For reject, only CIDR is required.
Fields(csv line):
CIDR,Tag ID,weight(optional)
Examples:
216.86.96.0/19,1,1
216.86.96.0/19,2,2
176.82.0.0/16,1,3
12:3456:78:90ab:cd:ef01:23:30/125,1,3
Weights:
Represented by
-h, --help help for cidrroutes
-c, --config string configuration file for the CLI (default ~/.vcli.yml)
Could also be set via VARNISH_CONTROLLER_CLI_CONFIG=/path/to/config.yml
--csv Output the response table as CSV format.
-j, --json Output the response table as JSON format.