Skip to content

Commit 136ad75

Browse files
anjan-keysightactions-userrudranil-dasVibaswan
authored
Append and delete (flow) configuration (#421)
* Support for append and delete config * Update auto generated content * update openapiart==0.3.24 * redirect to dev openapiart branch * Update auto generated content * move to openapiart==0.3.25 * Update append / delete config descriptions * Update auto generated content * Update auto generated content --------- Co-authored-by: Github Actions Bot <[email protected]> Co-authored-by: Rudranil <[email protected]> Co-authored-by: Vibaswan <[email protected]>
1 parent 1ff6b67 commit 136ad75

File tree

6 files changed

+331
-9
lines changed

6 files changed

+331
-9
lines changed

api/api.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,55 @@ paths:
5757
default:
5858
$ref: '../result/request.yaml#/components/responses/Failure'
5959
x-field-uid: 2
60+
/config/append:
61+
patch:
62+
tags: ['Configuration']
63+
operationId: append_config
64+
description: >-
65+
Append new attributes of resources to existing configuration on the traffic generator.
66+
Resource names should not be part of existing configuration of that resource type;
67+
it should be unique for the operation to succeed. A failed append might leave the
68+
configuration in an undefined state and if the error is due to some invalid or unsupported
69+
configuration in the appended resources, it is expected that the user fix the error and
70+
restart from SetConfig operation.
71+
The fetched configuration shall also reflect the new configuration applied successfully.
72+
requestBody:
73+
required: true
74+
content:
75+
application/json:
76+
schema:
77+
$ref: '../config/append.yaml#/components/schemas/Config.Append'
78+
responses:
79+
'200':
80+
$ref: '../result/request.yaml#/components/responses/Success'
81+
x-field-uid: 1
82+
default:
83+
$ref: '../result/request.yaml#/components/responses/Failure'
84+
x-field-uid: 2
85+
/config/delete:
86+
patch:
87+
tags: ['Configuration']
88+
operationId: delete_config
89+
description: >-
90+
Delete attributes of resources from existing configuration on the traffic generator.
91+
Resource names should already be part of existing configuration of that resource type;
92+
for the operation to succeed. A failed delete will leave the configuration in an undefined
93+
state and if the error is due to some invalid or unsupported configuration in the deleted
94+
resources, it is expected that the user fix the error and restart from SetConfig operation.
95+
On successful deletion the fetched configuration shall not reflect the removed configuration.
96+
requestBody:
97+
required: true
98+
content:
99+
application/json:
100+
schema:
101+
$ref: '../config/delete.yaml#/components/schemas/Config.Delete'
102+
responses:
103+
'200':
104+
$ref: '../result/request.yaml#/components/responses/Success'
105+
x-field-uid: 1
106+
default:
107+
$ref: '../result/request.yaml#/components/responses/Failure'
108+
x-field-uid: 2
60109
/control/state:
61110
post:
62111
tags: ['Control']

artifacts/openapi.html

Lines changed: 32 additions & 9 deletions
Large diffs are not rendered by default.

artifacts/openapi.yaml

Lines changed: 104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

artifacts/otg.proto

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/append.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
components:
2+
schemas:
3+
Config.Append:
4+
description: |-
5+
A container for all configuration resources of various types to be appended.
6+
type: array
7+
items:
8+
$ref: '#/components/schemas/Config.AppendResources'
9+
x-field-uid: 1
10+
Config.AppendResources:
11+
description: |-
12+
A container for an existing resource to be appended.
13+
type: object
14+
required:
15+
- choice
16+
properties:
17+
choice:
18+
type: string
19+
x-enum:
20+
flows:
21+
x-field-uid: 1
22+
x-field-uid: 1
23+
flows:
24+
description: |-
25+
The flows that will be added to existing configuration on the traffic generator.
26+
The flow name must not already be used in existing configuration.
27+
type: array
28+
items:
29+
$ref: '../flow/flow.yaml#/components/schemas/Flow'
30+
x-field-uid: 2

config/delete.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
components:
2+
schemas:
3+
Config.Delete:
4+
description: |-
5+
A container for all configuration resources of various types to be deleted.
6+
type: array
7+
items:
8+
$ref: '#/components/schemas/Config.DeleteResources'
9+
x-field-uid: 1
10+
Config.DeleteResources:
11+
description: |-
12+
A container for an existing resource to be deleted.
13+
type: object
14+
required:
15+
- choice
16+
properties:
17+
choice:
18+
type: string
19+
x-enum:
20+
flows:
21+
x-field-uid: 1
22+
x-field-uid: 1
23+
flows:
24+
description: |-
25+
List of flows that will be deleted from existing configuration on the traffic generator.
26+
type: array
27+
items:
28+
type: string
29+
x-constraint:
30+
- '/components/schemas/Flow/properties/name'
31+
x-field-uid: 2

0 commit comments

Comments
 (0)