Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,55 @@ paths:
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/config/append:
patch:
tags: ['Configuration']
operationId: append_config
description: >-
Append new attributes of resources to existing configuration on the traffic generator.
Resource names should not be part of existing configuration of that resource type;
it should be unique for the operation to succeed. A failed append might leave the
configuration in an undefined state and if the error is due to some invalid or unsupported
configuration in the appended resources, it is expected that the user fix the error and
restart from SetConfig operation.
The fetched configuration shall also reflect the new configuration applied successfully.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/append.yaml#/components/schemas/Config.Append'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/config/delete:
patch:
tags: ['Configuration']
operationId: delete_config
description: >-
Delete attributes of resources from existing configuration on the traffic generator.
Resource names should already be part of existing configuration of that resource type;
for the operation to succeed. A failed delete will leave the configuration in an undefined
state and if the error is due to some invalid or unsupported configuration in the deleted
resources, it is expected that the user fix the error and restart from SetConfig operation.
On successful deletion the fetched configuration shall not reflect the removed configuration.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/delete.yaml#/components/schemas/Config.Delete'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/control/state:
post:
tags: ['Control']
Expand Down
41 changes: 32 additions & 9 deletions artifacts/openapi.html

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions artifacts/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions artifacts/otg.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions config/append.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
components:
schemas:
Config.Append:
description: |-
A container for all configuration resources of various types to be appended.
type: array
items:
$ref: '#/components/schemas/Config.AppendResources'
x-field-uid: 1
Config.AppendResources:
description: |-
A container for an existing resource to be appended.
type: object
required:
- choice
properties:
choice:
type: string
x-enum:
flows:
x-field-uid: 1
x-field-uid: 1
flows:
description: |-
The flows that will be added to existing configuration on the traffic generator.
The flow name must not already be used in existing configuration.
type: array
items:
$ref: '../flow/flow.yaml#/components/schemas/Flow'
x-field-uid: 2
31 changes: 31 additions & 0 deletions config/delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
components:
schemas:
Config.Delete:
description: |-
A container for all configuration resources of various types to be deleted.
type: array
items:
$ref: '#/components/schemas/Config.DeleteResources'
x-field-uid: 1
Config.DeleteResources:
description: |-
A container for an existing resource to be deleted.
type: object
required:
- choice
properties:
choice:
type: string
x-enum:
flows:
x-field-uid: 1
x-field-uid: 1
flows:
description: |-
List of flows that will be deleted from existing configuration on the traffic generator.
type: array
items:
type: string
x-constraint:
- '/components/schemas/Flow/properties/name'
x-field-uid: 2
Loading