Search
Varnish Controller

vcli geolocationroutes

Handle Geolocation routing targets

Synopsis

Handle Geolocation routing targets, such as listing, add, delete or update.

Weights(represented by ~) can be used to set priority between tags on the same location. For example: –geolocation-to-tag=“Europe:1~1,Europe:2~2 - Will give nodes with tag ID: 2 higher priority than tag ID: 1 for clients within Europe as the weight: 2 is higher.

Examples:

vcli geolocationroutes list
vcli geolocationroutes ls -f id=1
vcli geolocationroutes ls -f name="MyGeolocationRoute*"
vcli geolocationroutes add myGeolocationRoute --reject --geolocation="Sweden,Norway"
vcli geolocationroutes add myGeolocationRoute --geolocation="Yorkshire:1,United States:2"
vcli geolocationroutes add myGeolocationRoute --geolocation="Stockholm:2673730:1,Helsinki:2" (Including geoname_id when the name of the location is not unique)
vcli geolocationroutes add myGeolocationRoute --geolocation="Europe:1~1,Europe:2~2,Asia:3" --subdecision=weight (~<number> represents weight(optional))
vcli geolocationroutes add myGeolocationRoute --geolocation-csv=my_geolocations.csv
vcli geolocationroutes update 1 --name newname
vcli geolocationroutes delete 1
vcli geolocationroutes inspect 1
vcli geolocationroutes suggestions Stockholm
vcli geolocationroutes gelocationlookup --geoname-ids=2673730,2673731

CSV: Note: For reject, only location name is required (mandatory geoname ID if location is not unique).

Fields(csv line):
  Location name,Tag ID,weight(optional),Geoname ID(mandatory if location name is not unique)

Examples:

  Stockholm,1,2,2673730
  Yorkshire,1,2
  Sweden,2,2
  Europe,2,3
  North America,4

Weights: Represented by ~. Can be used to set priority between tags on the same location. For example: –geolocation=“Europe:1~1,Europe:2~2 - Will give nodes with tag ID: 2 higher priority than tag ID: 1 for clients within Europe because the weight: 2 is higher.

Options

  -h, --help   help for geolocationroutes

Options inherited from parent commands

  -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.

SEE ALSO