ves-io-schema-network_connector-API-Create

Examples of creating network_connector

Usecase:

Create network-connector connect-in-out that connects inside network with outside network with SNAT

Request using vesctl:

vesctl configuration create network_connector -i network_connector.yaml

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

metadata:
  name: connect-in-out
  namespace: system
spec:
  insideNetworkType: VIRTUAL_NETWORK_SITE_LOCAL_INSIDE

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: connect-in-out
  namespace: system
spec:
  dynamicReverseProxy: []
  insideNetwork: []
  insideNetworkType: VIRTUAL_NETWORK_SITE_LOCAL_INSIDE
  natPool: []
  outsideNetwork: []
systemMetadata:
  creationTimestamp: "2020-05-15T10:52:47.186558755Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: a80645b1-bb3e-4a50-922b-96c3cd6c19dc

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"connect-in-out","namespace":"system"},"spec":{"insideNetworkType":"VIRTUAL_NETWORK_SITE_LOCAL_INSIDE"}}' -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/system/network_connectors'

curl response:

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

{
  "metadata": {
    "name": "connect-in-out",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "a80645b1-bb3e-4a50-922b-96c3cd6c19dc",
    "creation_timestamp": "2020-05-15T10:52:47.186558755Z",
    "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": {
    "connector_type": "NETWORK_CONNECTOR_TYPE_DEFAULT_GATEWAY_SNAT",
    "outside_network_type": "VIRTUAL_NETWORK_SITE_LOCAL",
    "outside_network": [
    ],
    "inside_network_type": "VIRTUAL_NETWORK_SITE_LOCAL_INSIDE",
    "inside_network": [
    ],
    "snat_pool_type": "NETWORK_CONNECTOR_SNAT_SIP_USE_INTERFACE",
    "nat_pool": [
    ],
    "proxy_type": "NETWORK_CONNECTOR_NO_PROXY",
    "dynamic_reverse_proxy": [
    ],
    "forward_proxy": null
  }
}