ves-io-schema-network_firewall-API-Create

Examples of creating network_firewall

Usecase:

Create network-firewall-1

Request using vesctl:

vesctl configuration create network_firewall -i network_firewall.yaml

where file networkfirewall.yaml has following contents (networkfirewall.CreateRequest):

metadata:
  name: network-firewall-1
  namespace: documentation
spec:
  fastAclSet:
  - kind: fast_acl_set
    name: fast-acl-set-1
  forwardProxyPolicySet:
  - kind: service_policy_set
    name: proxy-1
  networkPolicySet:
  - kind: network_policy_set
    name: policy-1

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: network-firewall-1
  namespace: documentation
spec:
  fastAclSet:
  - kind: fast_acl_set
    name: fast-acl-set-1
    namespace: documentation
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
  forwardProxyPolicySet:
  - kind: service_policy_set
    name: proxy-1
    namespace: documentation
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
  networkPolicySet:
  - kind: network_policy_set
    name: policy-1
    namespace: documentation
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
systemMetadata:
  creationTimestamp: "2020-05-15T10:52:47.727246779Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: a489d65f-4c21-4a6a-ac60-2ff0d02d8d2a

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"network-firewall-1","namespace":"documentation"},"spec":{"networkPolicySet":[{"kind":"network_policy_set","name":"policy-1"}],"forwardProxyPolicySet":[{"kind":"service_policy_set","name":"proxy-1"}],"fastAclSet":[{"kind":"fast_acl_set","name":"fast-acl-set-1"}]}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/network_firewalls'

curl response:

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

{
  "metadata": {
    "name": "network-firewall-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "a489d65f-4c21-4a6a-ac60-2ff0d02d8d2a",
    "creation_timestamp": "2020-05-15T10:52:47.727246779Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "network_policy_set": [
      {
        "kind": "network_policy_set",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "policy-1"
      }
    ],
    "forward_proxy_policy_set": [
      {
        "kind": "service_policy_set",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "proxy-1"
      }
    ],
    "fast_acl_set": [
      {
        "kind": "fast_acl_set",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "fast-acl-set-1"
      }
    ]
  }
}