From 16675e0b457853529e48c3d33147e814b24c4b56 Mon Sep 17 00:00:00 2001 From: Rudranil Date: Mon, 16 Oct 2023 10:06:45 +0000 Subject: [PATCH 1/4] on fly change: update-cfg proposal --- config/protocol.yaml | 33 +++++++++++++++++++++++++++++++++ config/update.yaml | 19 +++++++++++++++++++ device/bgp/bgpv4.yaml | 6 ++++++ device/bgp/bgpv6.yaml | 6 ++++++ 4 files changed, 64 insertions(+) create mode 100644 config/protocol.yaml diff --git a/config/protocol.yaml b/config/protocol.yaml new file mode 100644 index 00000000..5676bfdf --- /dev/null +++ b/config/protocol.yaml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Control protocol models for protocol update + description: >- + All control protocol schemas for protocol update + version: ^0.0.0 +components: + schemas: + Update.Protocol.Bgp: + description: >- + Updates protocol properties of configured BGP + type: object + required: + - property_names + - bgp + properties: + property_names: + description: >- + BGP properties to be updated. + type: array + items: + type: string + x-enum: + peer_enabled: + x-field-uid: 1 + x-field-uid: 1 + bgp: + description: >- + The list of configured BGP peers for which given property will be updated. + type: array + items: + $ref: '#/components/schemas/Device.BgpRouter' + x-field-uid: 2 \ No newline at end of file diff --git a/config/update.yaml b/config/update.yaml index 9e92572c..0ce62f61 100644 --- a/config/update.yaml +++ b/config/update.yaml @@ -14,6 +14,9 @@ components: flows: $ref: '#/components/schemas/Flows.Update' x-field-uid: 2 + protocols: + $ref: '#/components/schemas/Protocols.Update' + x-field-uid: 3 Flows.Update: description: >- A container of flows with associated properties to be updated without @@ -41,4 +44,20 @@ components: type: array items: $ref: '#/components/schemas/Flow' + x-field-uid: 2 + Protocols.Update: + description: >- + Protocols for which update properties would be initiated. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + bgp: + x-field-uid: 1 + x-field-uid: 1 + bgp: + $ref: './protocol.yaml#/components/schemas/Update.Protocol.Bgp' x-field-uid: 2 \ No newline at end of file diff --git a/device/bgp/bgpv4.yaml b/device/bgp/bgpv4.yaml index f3c1d5d4..b8b8efed 100644 --- a/device/bgp/bgpv4.yaml +++ b/device/bgp/bgpv4.yaml @@ -69,6 +69,12 @@ components: graceful_restart: x-include: './bgp.yaml#/components/schemas/Device.Bgp/properties/graceful_restart' x-field-uid: 14 + peer_enabled: + description: |- + Specifies whether the peer is enabled or not. + type: boolean + default: true + x-field-uid: 15 Bgp.V4Interface: description: >- Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. diff --git a/device/bgp/bgpv6.yaml b/device/bgp/bgpv6.yaml index ef0d0c1d..d80b1884 100644 --- a/device/bgp/bgpv6.yaml +++ b/device/bgp/bgpv6.yaml @@ -72,6 +72,12 @@ components: graceful_restart: x-include: './bgp.yaml#/components/schemas/Device.Bgp/properties/graceful_restart' x-field-uid: 15 + peer_enabled: + description: |- + Specifies whether the peer is enabled or not. + type: boolean + default: true + x-field-uid: 16 Bgp.V6Interface: description: >- Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. From 33ff2fa8eb80359e966ee0b9d86b5bd2f2eb4701 Mon Sep 17 00:00:00 2001 From: Github Actions Bot Date: Mon, 16 Oct 2023 10:09:01 +0000 Subject: [PATCH 2/4] Update auto generated content --- artifacts/openapi.html | 11 ++++---- artifacts/openapi.yaml | 58 ++++++++++++++++++++++++++++++++++++++++++ artifacts/otg.proto | 44 ++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 5 deletions(-) diff --git a/artifacts/openapi.html b/artifacts/openapi.html index ab060de6..18bef7da 100644 --- a/artifacts/openapi.html +++ b/artifacts/openapi.html @@ -552,15 +552,16 @@

Responses

Request samples

Content type
application/json
{
  • "ports": [
    ],
  • "lags": [
    ],
  • "layer1": [
    ],
  • "captures": [
    ],
  • "devices": [
    ],
  • "flows": [
    ],
  • "events": {
    },
  • "options": {
    },
  • "lldp": [
    ]
}

Response samples

Content type
application/json
{
  • "warnings": [
    ]
}

get_config

Responses

Request samples

Content type
application/json
{
  • "ports": [
    ],
  • "lags": [
    ],
  • "layer1": [
    ],
  • "captures": [
    ],
  • "devices": [
    ],
  • "flows": [
    ],
  • "events": {
    },
  • "options": {
    },
  • "lldp": [
    ]
}

Response samples

Content type
application/json
{
  • "warnings": [
    ]
}

get_config

Responses

Response samples

Content type
application/json
{
  • "ports": [
    ],
  • "lags": [
    ],
  • "layer1": [
    ],
  • "captures": [
    ],
  • "devices": [
    ],
  • "flows": [
    ],
  • "events": {
    },
  • "options": {
    },
  • "lldp": [
    ]
}

update_config

Updates specific attributes of resources configured on the traffic generator. The fetched configuration shall reflect the updates applied successfully. +

Response samples

Content type
application/json
{
  • "ports": [
    ],
  • "lags": [
    ],
  • "layer1": [
    ],
  • "captures": [
    ],
  • "devices": [
    ],
  • "flows": [
    ],
  • "events": {
    },
  • "options": {
    },
  • "lldp": [
    ]
}

update_config

Updates specific attributes of resources configured on the traffic generator. The fetched configuration shall reflect the updates applied successfully. The Response.Warnings in the Success response is available for implementers to disclose additional information about a state change including any implicit changes that are outside the scope of the state change.

-
Request Body schema: application/json
choice
string
Value: "flows"
object (Flows.Update)

A container of flows with associated properties to be updated without affecting the flows current transmit state.

+
Request Body schema: application/json
choice
string
Value: "flows"
object (Flows.Update)

A container of flows with associated properties to be updated without affecting the flows current transmit state.

+
object (Protocols.Update)

Protocols for which update properties would be initiated.

Responses

Request samples

Content type
application/json
{
  • "choice": "flows",
  • "flows": {
    }
}

Response samples

Content type
application/json
{
  • "warnings": [
    ]
}

Control

set_control_state

Sets the operational state of configured resources.

+

Request samples

Content type
application/json
{
  • "choice": "flows",
  • "flows": {
    },
  • "protocols": {
    }
}

Response samples

Content type
application/json
{
  • "warnings": [
    ]
}

Control

set_control_state

Sets the operational state of configured resources.

Request Body schema: application/json
choice
required
string
Enum: "port" "protocol" "traffic"
object (State.Port)

States associated with configured ports.

object (State.Protocol)

States associated with protocols on configured resources.

object (State.Traffic)

States associated with configured flows

@@ -604,7 +605,7 @@

Response samples

Content type
application/json
{
  • "api_spec_version": "",
  • "sdk_version": "",
  • "app_version": ""
}