ves-io-schema-registration-CustomAPI-RegistrationApprove

Examples of performing registration CustomAPI RegistrationApprove

Usecase:

Perform RegistrationApprove on registration

Request:

Request using vesctl:

vesctl request rpc registration.CustomAPI.RegistrationApprove -i request.yaml --uri /public/namespaces/namespace-literal/registration/name-literal/approve --http-method POST

where file request.yaml has following contents:

{}

vesctl yaml response:

obj:
  metadata:
    annotations:
      tu-generated: "yes"
    labels:
      abc: def
    name: reg-b044f505-d1ce-48c6-8233-5c9ad70bac1e
    namespace: system
    uid: b044f505-d1ce-48c6-8233-5c9ad70bac1e
  spec:
    gcSpec:
      infra:
        interfaces: {}
      passport:
        clusterName: cinta
        clusterSize: 1
        clusterType: ce
        latitude: 49.315674
        longitude: 14.248433
      role: []
      site: []
      token: abc123
  status:
    currentState: APPROVED
  systemMetadata:
    finalizers: []
    namespace: []
    tenant: customer1
    uid: b044f505-d1ce-48c6-8233-5c9ad70bac1e

Request using curl:

curl -X 'POST' -d '{}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/register/namespaces/namespace-literal/registration/name-literal/approve'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:08:02 GMT
Vary: Accept-Encoding

{
  "obj": {
    "metadata": {
      "name": "reg-b044f505-d1ce-48c6-8233-5c9ad70bac1e",
      "namespace": "system",
      "uid": "b044f505-d1ce-48c6-8233-5c9ad70bac1e",
      "labels": {
        "abc": "def"
      },
      "annotations": {
        "tu-generated": "yes"
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "b044f505-d1ce-48c6-8233-5c9ad70bac1e",
      "creation_timestamp": null,
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "customer1",
      "creator_class": "",
      "creator_id": "",
      "creator_cookie": "",
      "trace_info": "",
      "object_index": 0,
      "namespace": [
      ],
      "owner_view": null,
      "sre_disable": false
    },
    "spec": {
      "gc_spec": {
        "infra": {
          "provider": "UNKNOWN",
          "instance_id": "",
          "zone": "",
          "availability_zone": "",
          "hostname": "",
          "domain": "",
          "machine_id": "",
          "interfaces": {
          },
          "hw_info": null,
          "certified_hw": "",
          "internet_proxy": null,
          "timestamp": null
        },
        "token": "abc123",
        "passport": {
          "cluster_name": "cinta",
          "cluster_type": "ce",
          "latitude": 49.315674,
          "longitude": 14.248433,
          "cluster_size": 1,
          "vpm_version": "",
          "private_network_name": ""
        },
        "site": [
        ],
        "role": [
        ],
        "tunnel_type": "SITE_TO_SITE_TUNNEL_IPSEC_OR_SSL"
      }
    },
    "status": {
      "object_status": null,
      "current_state": "APPROVED"
    }
  }
}