From 4d60b3c266730637cf1336af3b8558282eb4063d Mon Sep 17 00:00:00 2001 From: rudranil Date: Tue, 23 May 2023 10:40:08 +0000 Subject: [PATCH 1/3] esp header: first draft --- flow/packet-headers/esp.yaml | 79 +++++++++++++++++++++++++++++++++ flow/packet-headers/header.yaml | 5 +++ 2 files changed, 84 insertions(+) create mode 100644 flow/packet-headers/esp.yaml diff --git a/flow/packet-headers/esp.yaml b/flow/packet-headers/esp.yaml new file mode 100644 index 00000000..3566f721 --- /dev/null +++ b/flow/packet-headers/esp.yaml @@ -0,0 +1,79 @@ +components: + schemas: + Flow.Esp: + description: IP Encapsulating Security Payload (ESP) packet header + type: object + properties: + spi: + x-field-pattern: + description: >- + Security parameters index + format: integer + length: 32 + default: 511 + features: [count, metric_tags] + x-field-uid: 1 + sequence_number: + x-field-pattern: + description: >- + Sequence number + format: integer + length: 32 + default: 0 + features: [count, metric_tags] + x-field-uid: 2 + padding: + description: >- + Padding + type: string + format: hex + default: "0" + minLength: 0 + maxLength: 16 + x-field-uid: 3 + pad_length: + x-field-pattern: + description: >- + Pad length + format: integer + length: 8 + default: 0 + features: [count, metric_tags] + x-field-uid: 4 + next_header: + x-field-pattern: + x-constants: + hopopt: 0 + icmp: 1 + igmp: 2 + ggp: 3 + ip_in_ip: 4 + st: 5 + tcp: 6 + cpt: 7 + egp: 8 + igp: 9 + no_next_header: 59 + description: >- + Next header + format: integer + length: 8 + default: 59 + features: [auto, count, metric_tags] + x-field-uid: 5 + esn: + x-field-pattern: + description: >- + Extended sequence number + format: integer + length: 32 + default: 0 + features: [count, metric_tags] + x-field-uid: 6 + icv: + description: >- + Integrity check value + type: string + format: hex + maxLength: 32 + x-field-uid: 7 \ No newline at end of file diff --git a/flow/packet-headers/header.yaml b/flow/packet-headers/header.yaml index 95aafb1f..133739c4 100644 --- a/flow/packet-headers/header.yaml +++ b/flow/packet-headers/header.yaml @@ -51,6 +51,8 @@ components: x-field-uid: 18 mpls: x-field-uid: 19 + esp: + x-field-uid: 20 custom: $ref: './custom.yaml#/components/schemas/Flow.Custom' x-field-uid: 2 @@ -108,3 +110,6 @@ components: mpls: $ref: './mpls.yaml#/components/schemas/Flow.Mpls' x-field-uid: 20 + esp: + $ref: './mpls.yaml#/components/schemas/Flow.Esp' + x-field-uid: 21 From b527880dfac729c9bb14ec36ad86086bb491d049 Mon Sep 17 00:00:00 2001 From: rudranil Date: Tue, 23 May 2023 12:51:08 +0000 Subject: [PATCH 2/3] fix compilation --- flow/packet-headers/esp.yaml | 1 + flow/packet-headers/header.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flow/packet-headers/esp.yaml b/flow/packet-headers/esp.yaml index 3566f721..fdc2b5e0 100644 --- a/flow/packet-headers/esp.yaml +++ b/flow/packet-headers/esp.yaml @@ -75,5 +75,6 @@ components: Integrity check value type: string format: hex + minLength: 0 maxLength: 32 x-field-uid: 7 \ No newline at end of file diff --git a/flow/packet-headers/header.yaml b/flow/packet-headers/header.yaml index 133739c4..ddf12ed0 100644 --- a/flow/packet-headers/header.yaml +++ b/flow/packet-headers/header.yaml @@ -111,5 +111,5 @@ components: $ref: './mpls.yaml#/components/schemas/Flow.Mpls' x-field-uid: 20 esp: - $ref: './mpls.yaml#/components/schemas/Flow.Esp' + $ref: './esp.yaml#/components/schemas/Flow.Esp' x-field-uid: 21 From b629fc9ecb850fbafadabad438b8594bfc5eb8d3 Mon Sep 17 00:00:00 2001 From: Github Actions Bot Date: Tue, 23 May 2023 12:59:43 +0000 Subject: [PATCH 3/3] Update auto generated content --- artifacts/openapi.html | 10 +- artifacts/openapi.yaml | 585 +++++++++++++++++++++++++++++++++++++++++ artifacts/otg.proto | 397 ++++++++++++++++++++++++++++ 3 files changed, 987 insertions(+), 5 deletions(-) diff --git a/artifacts/openapi.html b/artifacts/openapi.html index bb576db5..17de38c6 100644 --- a/artifacts/openapi.html +++ b/artifacts/openapi.html @@ -552,15 +552,15 @@

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.

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": {
    }
}

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

@@ -617,7 +617,7 @@
required
Array of objects (Flow)

The list of configured flows for which given property will be updated.

Responses

Request samples

Content type
application/json
{
  • "property_names": [
    ],
  • "flows": [
    ]
}

Response samples

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

set_route_state

Deprecated: Please use set_control_state with protocol.route choice instead

+

Request samples

Content type
application/json
{
  • "property_names": [
    ],
  • "flows": [
    ]
}

Response samples

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

set_route_state

Deprecated: Please use set_control_state with protocol.route choice instead

Updates the state of configuration resources on the traffic generator.

Request Body schema: application/json
names
Array of strings

The names of device route objects to control. If no names are specified then all route objects that match the x-constraint will be affected.

x-constraint:

@@ -682,7 +682,7 @@

Response samples

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