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: system
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: system
spec:
  hub:
  - kind: site_mesh_group
    name: site-mesh-group-hub-1
    namespace: system
    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: system
    tenant: acmecorp
    uid: ffffffff-ffff-ffff-ffff-ffffffffffff
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:06.826742427Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 76b18db2-a27f-46c7-a040-a2aa512fdbee

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"site-mesh-group-1","namespace":"system"},"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-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/site_mesh_groups'

curl response:

HTTP/1.1 200 OK
Content-Length: 1135
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:04:06 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "site-mesh-group-1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "76b18db2-a27f-46c7-a040-a2aa512fdbee",
    "creation_timestamp": "2021-08-25T09:04:06.826742427Z",
    "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": "system",
        "name": "vsite-spoke-1"
      }
    ],
    "hub": [
      {
        "kind": "site_mesh_group",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "system",
        "name": "site-mesh-group-hub-1"
      }
    ]
  }
}