ves-io-schema-site_mesh_group-API-Create

Examples of creating sitemeshgroup

Usecase:

Create site-mesh-group-1

Request using vesctl:

vesctl configuration create site_mesh_group -i site_mesh_group.yaml

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

metadata:
  name: site-mesh-group-1
  namespace: documentation
spec:
  hub:
  - kind: site_mesh_group
    name: site-mesh-group-hub-1
  tunnelType: SITE_TO_SITE_TUNNEL_IPSEC
  type: SITE_MESH_GROUP_TYPE_SPOKE
  virtualSite:
  - kind: virtual_site
    name: vsite-spoke-1

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: site-mesh-group-1
  namespace: documentation
spec:
  hub:
  - kind: site_mesh_group
    name: site-mesh-group-hub-1
    namespace: documentation
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
  tunnelType: SITE_TO_SITE_TUNNEL_IPSEC
  type: SITE_MESH_GROUP_TYPE_SPOKE
  virtualSite:
  - kind: virtual_site
    name: vsite-spoke-1
    namespace: documentation
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
systemMetadata:
  creationTimestamp: "2020-09-16T10:50:53.709030900Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 02e8f96e-ebc9-4a0c-a7ac-d28bf9a15ae7

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"site-mesh-group-1","namespace":"documentation"},"spec":{"type":"SITE_MESH_GROUP_TYPE_SPOKE","tunnelType":"SITE_TO_SITE_TUNNEL_IPSEC","virtualSite":[{"kind":"virtual_site","name":"vsite-spoke-1"}],"hub":[{"kind":"site_mesh_group","name":"site-mesh-group-hub-1"}]}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/site_mesh_groups'

curl response:

HTTP/1.1 200 OK
Content-Length: 1156
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:50:53 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "site-mesh-group-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "02e8f96e-ebc9-4a0c-a7ac-d28bf9a15ae7",
    "creation_timestamp": "2020-09-16T10:50:53.709030900Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "type": "SITE_MESH_GROUP_TYPE_SPOKE",
    "tunnel_type": "SITE_TO_SITE_TUNNEL_IPSEC",
    "virtual_site": [
      {
        "kind": "virtual_site",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "vsite-spoke-1"
      }
    ],
    "hub": [
      {
        "kind": "site_mesh_group",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "site-mesh-group-hub-1"
      }
    ]
  }
}