ves-io-schema-ip_prefix_set-API-Replace

Examples of replacing ipprefixset

Usecase:

Replace ddos-black-list list to add one ip address

Request using vesctl:

vesctl configuration replace ip_prefix_set -i ip_prefix_set.yaml

where file ipprefixset.yaml has following contents (ipprefixset.ReplaceRequest):

metadata:
  name: ddos-black-list
  namespace: system
spec:
  prefix:
  - 1.2.3.0/24
  - 4.5.6.0/24
  - 7.8.9.0/24
  - 10.11.12.0/24

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"ddos-black-list","namespace":"system"},"spec":{"prefix":["1.2.3.0/24","4.5.6.0/24","7.8.9.0/24","10.11.12.0/24"]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/ip_prefix_sets/ddos-black-list'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:09 GMT
Vary: Accept-Encoding

{

}