ves-io-schema-bgp_asn_set-API-Create

Examples of creating bgpasnset

Usecase:

Create bgpasnset bgp-asn-anonymous in current namespace. list of networks. It can be used to block address from anonymous networks. valid only publicly exposed services

Request using vesctl:

vesctl configuration create bgp_asn_set -i bgp_asn_set.yaml

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

metadata:
  name: bgp-asn-anonymous
  namespace: documentation
spec:
  asNumbers:
  - 1234
  - 5678
  - 9101
  - 1121
  - 3141

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: bgp-asn-anonymous
  namespace: documentation
spec:
  asNumbers:
  - 1234
  - 5678
  - 9101
  - 1121
  - 3141
systemMetadata:
  creationTimestamp: "2020-07-02T15:52:56.396910400Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 76966111-b5a2-41a7-8192-d8e6e973eadc

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"bgp-asn-anonymous","namespace":"documentation"},"spec":{"asNumbers":[1234,5678,9101,1121,3141]}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/bgp_asn_sets'

curl response:

HTTP/1.1 200 OK
Content-Length: 683
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:52:56 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "bgp-asn-anonymous",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "76966111-b5a2-41a7-8192-d8e6e973eadc",
    "creation_timestamp": "2020-07-02T15:52:56.396910400Z",
    "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": {
    "as_numbers": [
      1234,
      5678,
      9101,
      1121,
      3141
    ]
  }
}