From db28e518d29193ffd0f120249336e4a2df26c2d0 Mon Sep 17 00:00:00 2001 From: biplamal Date: Mon, 4 Dec 2023 14:10:45 +0000 Subject: [PATCH] review comments --- artifacts/openapi.html | 617 -------------------------------- artifacts/openapi.yaml | 29 +- artifacts/otg.proto | 27 +- flow/packet-headers/snmpv2.yaml | 24 +- 4 files changed, 51 insertions(+), 646 deletions(-) delete mode 100644 artifacts/openapi.html diff --git a/artifacts/openapi.html b/artifacts/openapi.html deleted file mode 100644 index 6cc72967..00000000 --- a/artifacts/openapi.html +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - Open Traffic Generator API - - - - - - - - - -

Open Traffic Generator API (0.13.2)

Download OpenAPI specification:Download

Open Traffic Generator API defines a model-driven, vendor-neutral and standard -interface for emulating layer 2-7 network devices and generating test traffic.

-

Contributions can be made in the following ways:

- -

Configuration

set_config

Sets configuration resources on the traffic generator.

-
Request Body schema: application/json
Array of objects (Port)

The ports that will be configured on the traffic generator.

-
Array of objects (Lag)

The LAGs that will be configured on the traffic generator.

-
Array of objects (Layer1)

The layer1 settings that will be configured on the traffic generator. -Since layer1 settings usually vary across variety of test ports, these -most likely won't be portable.

-
Array of objects (Capture)

The capture settings that will be configured on the traffic generator.

-
Array of objects (Device)

The emulated devices that will be configured on the traffic generator. -Each device contains configurations for network interfaces and -protocols running on top of those interfaces.

-
Array of objects (Flow)

The flows that will be configured on the traffic generator.

-
object (Event)

The optional container for event configuration.

-
object (Config.Options)

Global configuration options.

-
Array of objects (Lldp)

LLDP protocol that will be configured on traffic generator.

-

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. -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 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

-

Responses

Request samples

Content type
application/json
{
  • "choice": "port",
  • "port": {
    },
  • "protocol": {
    },
  • "traffic": {
    }
}

Response samples

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

set_control_action

Triggers actions against configured resources.

-
Request Body schema: application/json
choice
required
string
Value: "protocol"
object (Action.Protocol)

Actions associated with protocols on configured resources.

-

Responses

Request samples

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

Response samples

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

Monitor

get_metrics

Request Body schema: application/json

Request to traffic generator for metrics of choice

-
choice
string
Default: "port"
Enum: "port" "flow" "bgpv4" "bgpv6" "isis" "lag" "lacp" "lldp" "rsvp"
object (Port.Metrics.Request)

The port result request to the traffic generator

-
object (Flow.Metrics.Request)

The container for a flow metric request.

-
object (Bgpv4.Metrics.Request)

The request to retrieve BGPv4 per peer metrics/statistics.

-
object (Bgpv6.Metrics.Request)

The request to retrieve BGPv6 per peer metrics/statistics.

-
object (Isis.Metrics.Request)

The request to retrieve ISIS per Router metrics/statistics.

-
object (Lag.Metrics.Request)

The request to retrieve per LAG metrics/statistics.

-
object (Lacp.Metrics.Request)

The request to retrieve LACP per LAG member metrics/statistics.

-
object (Lldp.Metrics.Request)

The request to retrieve LLDP per instance metrics/statistics.

-
object (Rsvp.Metrics.Request)

The request to retrieve RSVP-TE per Router metrics/statistics.

-

Responses

Request samples

Content type
application/json
{
  • "choice": "port",
  • "port": {
    },
  • "flow": {
    },
  • "bgpv4": {
    },
  • "bgpv6": {
    },
  • "isis": {
    },
  • "lag": {
    },
  • "lacp": {
    },
  • "lldp": {
    },
  • "rsvp": {
    }
}

Response samples

Content type
application/json
{
  • "choice": "port_metrics",
  • "port_metrics": [
    ],
  • "flow_metrics": [
    ],
  • "bgpv4_metrics": [
    ],
  • "bgpv6_metrics": [
    ],
  • "isis_metrics": [
    ],
  • "lag_metrics": [
    ],
  • "lacp_metrics": [
    ],
  • "lldp_metrics": [
    ],
  • "rsvp_metrics": [
    ]
}

get_states

Request Body schema: application/json

Request to traffic generator for states of choice

-
choice
string
Default: "ipv4_neighbors"
Enum: "ipv4_neighbors" "ipv6_neighbors" "bgp_prefixes" "isis_lsps" "lldp_neighbors" "rsvp_lsps"
object (Neighborsv4.States.Request)

The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s).

-
object (Neighborsv6.States.Request)

The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s).

-
object (BgpPrefix.State.Request)

The request to retrieve BGP peer prefix information.

-
object (IsisLsps.State.Request)

The request to retrieve ISIS Link State PDU (LSP) information learned by the router.

-
object (LldpNeighbors.State.Request)

The request to retrieve LLDP neighbor information for a given instance.

-
object (RsvpLsps.State.Request)

The request to retrieve RSVP Label Switched Path (LSP) information learned by the router.

-

Responses

Request samples

Content type
application/json
{
  • "choice": "ipv4_neighbors",
  • "ipv4_neighbors": {
    },
  • "ipv6_neighbors": {
    },
  • "bgp_prefixes": {
    },
  • "isis_lsps": {
    },
  • "lldp_neighbors": {
    },
  • "rsvp_lsps": {
    }
}

Response samples

Content type
application/json
{
  • "choice": "ipv4_neighbors",
  • "ipv4_neighbors": [
    ],
  • "ipv6_neighbors": [
    ],
  • "bgp_prefixes": [
    ],
  • "isis_lsps": [
    ],
  • "lldp_neighbors": [
    ],
  • "rsvp_lsps": [
    ]
}

get_capture

Request Body schema: application/json

Capture results request to the traffic generator.

-
port_name
required
string

The name of a port a capture is started on.

-

x-constraint:

-
    -
  • /components/schemas/Port/properties/name
  • -
-

Responses

Request samples

Content type
application/json
{
  • "port_name": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "kind": "validation",
  • "errors": [
    ]
}

Capabilities

get_version

Responses

Response samples

Content type
application/json
{
  • "api_spec_version": "",
  • "sdk_version": "",
  • "app_version": ""
}
- - - - \ No newline at end of file diff --git a/artifacts/openapi.yaml b/artifacts/openapi.yaml index 6851d2c7..800886fd 100644 --- a/artifacts/openapi.yaml +++ b/artifacts/openapi.yaml @@ -7789,6 +7789,8 @@ components: description: |- SNMPv2 packet header as defined in RFC3416. type: object + required: + - choice properties: choice: type: string @@ -7855,6 +7857,7 @@ components: description: |- The SNMP agent places an error code in this field in the response message if an error occurred processing the request. type: string + default: no_error x-enum: no_error: x-field-uid: 1 @@ -7969,21 +7972,25 @@ components: properties: choice: type: string + default: no_value x-field-uid: 1 x-enum: - ip_address: + no_value: x-field-uid: 1 - counter: + ip_address: x-field-uid: 2 - timeticks: + counter: x-field-uid: 3 - arbitrary: + timeticks: x-field-uid: 4 - big_counter: + arbitrary: x-field-uid: 5 - unsigned_integer: + big_counter: x-field-uid: 6 + unsigned_integer: + x-field-uid: 7 enum: + - no_value - ip_address - counter - timeticks @@ -8018,6 +8025,7 @@ components: properties: choice: type: string + default: ipv4 x-field-uid: 1 x-enum: ipv4: @@ -28147,8 +28155,9 @@ components: default: 1 format: int32 Pattern.Flow.Snmpv2.PDU.RequestId: - description: |- - Identifies a particular SNMP request. This index is echoed back in the response from the SNMP agent, allowing the SNMP manager to match an incoming response to the appropriate request. TBD: negative values should be allowed. + description: "Identifies a particular SNMP request. This index is echoed back\ + \ in the response from the SNMP agent, allowing the SNMP manager to match\ + \ an incoming response to the appropriate request. " type: object properties: choice: @@ -28314,7 +28323,7 @@ components: x-field-uid: 6 Pattern.Flow.Snmpv2.BulkPDU.NonRepeaters: description: |- - Determines the number of variables in the variable list for which a simple get_next_request operation has to be done. + One variable binding in the Response-PDU is requested for the first non_repeaters variable bindings in the GetBulkRequest. type: object properties: choice: @@ -28364,7 +28373,7 @@ components: format: uint32 Pattern.Flow.Snmpv2.BulkPDU.MaxRepetitions: description: |- - Indicates how many rows of the table are to be retrieved in a single GetBulk operation. + A maximum of max_repetitions variable bindings are requested in the Response-PDU for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters variable bindings. type: object properties: choice: diff --git a/artifacts/otg.proto b/artifacts/otg.proto index 1175a5d0..9108d721 100644 --- a/artifacts/otg.proto +++ b/artifacts/otg.proto @@ -5840,6 +5840,7 @@ message FlowSnmpv2 { } } // Description missing in models + // required = true optional Choice.Enum choice = 1; // Description missing in models @@ -5899,6 +5900,7 @@ message FlowSnmpv2PDU { } // The SNMP agent places an error code in this field in the response message if an error // occurred processing the request. + // default = ErrorStatus.Enum.no_error optional ErrorStatus.Enum error_status = 2; // Description missing in models @@ -5957,15 +5959,17 @@ message FlowSnmpv2VariableBindingValue { message Choice { enum Enum { unspecified = 0; - ip_address = 1; - counter = 2; - timeticks = 3; - arbitrary = 4; - big_counter = 5; - unsigned_integer = 6; + no_value = 1; + ip_address = 2; + counter = 3; + timeticks = 4; + arbitrary = 5; + big_counter = 6; + unsigned_integer = 7; } } // Description missing in models + // default = Choice.Enum.no_value optional Choice.Enum choice = 1; // Description missing in models @@ -6000,6 +6004,7 @@ message FlowSnmpv2VariableBindingIPValue { } } // Description missing in models + // default = Choice.Enum.ipv4 optional Choice.Enum choice = 1; // Description missing in models @@ -19800,7 +19805,7 @@ message PatternFlowSnmpv2PDURequestIdCounter { // Identifies a particular SNMP request. This index is echoed back in the response // from the SNMP agent, allowing the SNMP manager to match an incoming response to -// the appropriate request. TBD: negative values should be allowed. +// the appropriate request. message PatternFlowSnmpv2PDURequestId { message Choice { @@ -19928,8 +19933,8 @@ message PatternFlowSnmpv2BulkPDURequestId { PatternFlowSnmpv2BulkPDURequestIdCounter decrement = 6; } -// Determines the number of variables in the variable list for which a simple get_next_request -// operation has to be done. +// One variable binding in the Response-PDU is requested for the first non_repeaters +// variable bindings in the GetBulkRequest. message PatternFlowSnmpv2BulkPDUNonRepeaters { message Choice { @@ -19968,7 +19973,9 @@ message PatternFlowSnmpv2BulkPDUMaxRepetitionsCounter { optional uint32 count = 3; } -// Indicates how many rows of the table are to be retrieved in a single GetBulk operation. +// A maximum of max_repetitions variable bindings are requested in the Response-PDU +// for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters +// variable bindings. message PatternFlowSnmpv2BulkPDUMaxRepetitions { message Choice { diff --git a/flow/packet-headers/snmpv2.yaml b/flow/packet-headers/snmpv2.yaml index b3e3e066..0aef326f 100644 --- a/flow/packet-headers/snmpv2.yaml +++ b/flow/packet-headers/snmpv2.yaml @@ -3,6 +3,8 @@ components: Flow.Snmpv2: description: SNMPv2 packet header as defined in RFC3416. type: object + required: + - choice properties: choice: type: string @@ -58,7 +60,6 @@ components: Identifies a particular SNMP request. This index is echoed back in the response from the SNMP agent, allowing the SNMP manager to match an incoming response to the appropriate request. - TBD: negative values should be allowed. format: integer length: 32 default: 0 @@ -69,6 +70,7 @@ components: description: >- The SNMP agent places an error code in this field in the response message if an error occurred processing the request. type: string + default: no_error x-enum: no_error: x-field-uid: 1 @@ -148,7 +150,7 @@ components: non_repeaters: x-field-pattern: description: >- - Determines the number of variables in the variable list for which a simple get_next_request operation has to be done. + One variable binding in the Response-PDU is requested for the first non_repeaters variable bindings in the GetBulkRequest. format: integer length: 32 default: 0 @@ -156,7 +158,7 @@ components: max_repetitions: x-field-pattern: description: >- - Indicates how many rows of the table are to be retrieved in a single GetBulk operation. + A maximum of max_repetitions variable bindings are requested in the Response-PDU for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters variable bindings. format: integer length: 32 default: 0 @@ -203,20 +205,23 @@ components: properties: choice: type: string + default: no_value x-field-uid: 1 x-enum: - ip_address: + no_value: x-field-uid: 1 - counter: + ip_address: x-field-uid: 2 - timeticks: + counter: x-field-uid: 3 - arbitrary: + timeticks: x-field-uid: 4 - big_counter: + arbitrary: x-field-uid: 5 - unsigned_integer: + big_counter: x-field-uid: 6 + unsigned_integer: + x-field-uid: 7 ip_address: $ref: '#/components/schemas/Flow.Snmpv2.VariableBindingIPValue' x-field-uid: 2 @@ -262,6 +267,7 @@ components: properties: choice: type: string + default: ipv4 x-field-uid: 1 x-enum: ipv4: