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:
  legacyAcl:
    destinationType:
      destinationIpAddress:
        address:
        - ipv4:
            addr: 1.2.3.4
        ports:
        - all: {}
        protocol: TCP
    networkType:
      siteLocal: {}
    sourceRules:
    - name: fast-acl-1234vip-rule1
      namespace: system
      tenant: acmecorp
    - name: fast-acl-1234vip-rule2
      namespace: system
      tenant: acmecorp
    - 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":{"legacyAcl":{"networkType":{"siteLocal":{}},"destinationType":{"destinationIpAddress":{"address":[{"ipv4":{"addr":"1.2.3.4"}}],"ports":[{"all":{}}],"protocol":"TCP"}},"sourceRules":[{"tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule1"},{"tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule2"},{"tenant":"acmecorp","namespace":"system","name":"fast-acl-1234vip-rule3"}]}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_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: Wed, 14 Jul 2021 08:07:01 GMT
Vary: Accept-Encoding

{

}