ves-io-schema-fast_acl-API-Replace

Examples of replacing fast_acl

Usecase:

Replace fast-acl-1234vip to append one more source rule

Request using vesctl:

vesctl configuration replace fast_acl -i fast_acl.yaml

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

metadata:
  name: fast-acl-1234vip
  namespace: system
spec:
  destinationType:
    destinationIpAddress:
      address:
      - ipv4:
          addr: 1.2.3.4/32
      ports:
      - all: {}
      protocol: TCP
  networkType:
    siteLocal: {}
  sourceRules:
  - kind: fast_acl_rule
    name: fast-acl-1234vip-rule1
    namespace: system
    tenant: acmecorp
  - kind: fast_acl_rule
    name: fast-acl-1234vip-rule2
    namespace: system
    tenant: acmecorp
  - kind: fast_acl_rule
    name: fast-acl-1234vip-rule3
    namespace: system
    tenant: acmecorp

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"fast-acl-1234vip","namespace":"system"},"spec":{"networkType":{"siteLocal":{}},"destinationType":{"destinationIpAddress":{"address":[{"ipv4":{"addr":"1.2.3.4/32"}}],"ports":[{"all":{}}],"protocol":"TCP"}},"sourceRules":[{"kind":"fast_acl_rule","tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule1"},{"kind":"fast_acl_rule","tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule2"},{"kind":"fast_acl_rule","tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule3"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/fast_acls/fast-acl-1234vip'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:37 GMT
Vary: Accept-Encoding

{

}