-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L4-7 models #263
base: master
Are you sure you want to change the base?
L4-7 models #263
Conversation
L4-7 Model support for TCP and HTTP
Moved tcp and http tp device
updated with model design
L4-L7 model approach 2
updated with 1 arm test model
…ator/models into Ixload-models
…ic-generator/models into Ixload-models" This reverts commit 7673243, reversing changes made to d25e0c9.
Server endpoint config
app/app.yaml
Outdated
schemas: | ||
App: | ||
description: >- | ||
A container for emulated protocol and traffic configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"emulated protocol" description can also apply to "devices" in the OTG tree. Need to be more precise in what this is and how it is different from devices.
app/app.yaml
Outdated
x-field-uid: 1 | ||
http: | ||
description: >- | ||
The properties of HTTP and its children, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just HTTP or also HTTPS? If it is also HTTPS then update comment to "HTTP(S)".
app/app.yaml
Outdated
x-field-uid: 3 | ||
traffic: | ||
description: >- | ||
Traffic configuration of endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be more precise as to how this differs from 'flows'. That is also traffic configuration.
app/http/http.yaml
Outdated
HTTP Version | ||
type: integer | ||
default: 1 | ||
x-field-uid: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this '3' and not '2'? It shouldn't matter from a correctness standpoint. Just curious as to why it was skipped. If we change this to '2' then the ones below also should be updated.
app/http/http.yaml
Outdated
http_version: | ||
description: >- | ||
HTTP Version | ||
type: integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an enum instead of an integer? What is the usual convention followed in the rest of the model? In the PR the line is as shown below, which indicates that this is a string :
http_client.http_version = "2.0"
app/http/http.yaml
Outdated
properties: | ||
transport_name: | ||
description: >- | ||
TCP interface name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to clearly indicate that this is the TCP "on top of which" this HTTP is running.
app/http/http.yaml
Outdated
x-field-uid: 4 | ||
max_sessions: | ||
description: >- | ||
Max HTTP sessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this simultaneous sessions? Is this number of simultaneous sessions that the client will initiate? Does this apply to both HTTP client and HTTP server?
app/http/http.yaml
Outdated
type: integer | ||
default: 1 | ||
x-field-uid: 5 | ||
max_streams: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as 'max_sessions'.
app/http/http.yaml
Outdated
description: >- | ||
Command timeout timer in seconds | ||
type: integer | ||
default: 600 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for the value 600? Is it coming from the HTTP specification?
config/config.yaml
Outdated
@@ -55,6 +55,13 @@ components: | |||
options: | |||
$ref: '#/components/schemas/Config.Options' | |||
x-field-uid: 8 | |||
app: | |||
description: |- | |||
The emulated Application configured on devices interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emulated Application(s) configured on devices?
common/common.yaml
Outdated
@@ -22,3 +22,17 @@ components: | |||
description: >- | |||
A empty container that is used to indicate a null choice. | |||
type: object | |||
|
|||
Value.Object: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used? I couldn't find any location where this is used.
app/traffic/traffic.yaml
Outdated
schemas: | ||
App.Traffic: | ||
description: >- | ||
Traffic config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application traffic configuration.
app/traffic/server.yaml
Outdated
items: | ||
$ref: './endpoints.yaml#/components/schemas/Endpoints.Server' | ||
x-field-uid: 1 | ||
protocol: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an enum?
app/traffic/server.yaml
Outdated
schemas: | ||
Traffic.Server: | ||
description: >- | ||
Server traffic configs . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traffic configuration for server(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to HTTP (to separate out client and server properties) are still pending.
app/http/httpclient.yaml
Outdated
@@ -33,7 +33,7 @@ components: | |||
x-field-uid: 3 | |||
cookie_reject_probability: | |||
description: >- | |||
cookie_reject_probability indicates the probability, from 0 to 1, that a client will reject a request for a cookie’s contents from the server. (only if enable_cookie_support is enabled) | |||
cookie_reject_probability indicates the probability, from 0 to 1, that a client will reject a request for a cookie(s) contents from the server. (only if enable_cookie_support is enabled) | |||
type: integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an integer or some other type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated with boolean
app/http/httpserver.yaml
Outdated
@@ -33,7 +33,7 @@ components: | |||
x-field-uid: 3 | |||
request_timeout: | |||
description: >- | |||
The amount of seconds that the server will wait for input on an open connection before closing the session with a ‘408’ error. | |||
The amount of seconds that the server will wait for input on an open connection before closing the session with a 408 error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amount of seconds --> The number of seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in PR
app/statefull_flow/objective.yaml
Outdated
@@ -39,7 +39,7 @@ components: | |||
x-field-uid: 1 | |||
ramp_up_type: | |||
description: >- | |||
Ramp up type for test. | |||
Ramp up type to either bring up users at a certain rate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description is still not fully clear to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in PR
@ankur-sheth Have added client and server properties separate. Below are the snippet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my one armed test sample. I think the intermediate http add isn't needed. I also think the method post is missing content. Would it make sense to have a way to configure methods that can be reused in multiple clients?
import snappi
def test_app_one_armed():
"""A one armed test to simulate many users requesting a single page, and
posting data to a single server.
"""
api = snappi.api()
# create the config with one ipv4 device
config = api.config()
e1 = config.devices.add(name="d1").ethernets.add(name="e1")
e1.connection.port_name = config.ports.add(name="p1").name
ipv41 = e1.ipv4_addresses.add(name="i1")
# create an http client application
app1 = config.apps.add(name="app1")
tcp1 = app1.tcp.add(name="tcp1")
http1 = app1.http.add(name="http1")
http_client1 = http1.client(name="http_client1", transport_name=tcp1.name)
method1 = http_client1.methods.add()
method1.get.server = "1.1.1.1"
method1.get.page = "index.html"
method2 = http_client1.methods.add()
method2.post.server = "1.1.1.1"
method2.post.page = "upload.html"
method2.post.content = "asdfasdfasdfasdf"
# create a stateful flow using the http client application and ipv4 device
flow1 = app1.stateful_flows.add(name="f1")
flow1.client.protocol = http1.name
endpoint1 = flow1.client.endpoints.add(ip_interface_name=ipv41.name)
endpoint1.ports.value = 6001
flow1.objectives.simulated_user.value = 10000
app/http/http.yaml
Outdated
@@ -0,0 +1,62 @@ | |||
components: | |||
schemas: | |||
App.Http: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The http array seems redundant. It should be removed and two separate properties, an array of http_client and and array of http_server should be created.
@ajbalogh Updated the changes . Please review updated models: https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/Ixload-models/artifacts/openapi.yaml&nocors#tag/Configuration/operation/set_config
@@ -0,0 +1,13 @@ | |||
components: | |||
schemas: | |||
App.Ssl: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also does this enable ssl for all the http clients/servers in the app? Having it on the client/server itself would be more flexible?
app/app.yaml
Outdated
items: | ||
$ref: './ssl/ssl.yaml#/components/schemas/App.Ssl' | ||
x-field-uid: 3 | ||
statefull_flows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - should be stateful_flows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to HTTP (to separate out client and server properties) are still pending.
@ankur-sheth updated the changes . Please review updated models: https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/Ixload-models/artifacts/openapi.yaml&nocors#tag/Configuration/operation/set_config
app/statefull_flow/objective.yaml
Outdated
Throughput value. | ||
type: integer | ||
x-field-uid: 1 | ||
sutain_time: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - sustain_time
app/statefull_flow/objective.yaml
Outdated
type: number | ||
x-field-uid: 3 | ||
|
||
Objective.Conn_curr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove underscore - create full name? - ie Objective.Connection.Concurrent
app/statefull_flow/objective.yaml
Outdated
Value applied to ramp_up_type to either bring up users at a certain rate. | ||
type: integer | ||
x-field-uid: 3 | ||
sutain_time: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - sustain_time
app/statefull_flow/objective.yaml
Outdated
x-field-uid: 4 | ||
ramp_down_time: | ||
description: >- | ||
Rampu down time in seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
app/statefull_flow/objective.yaml
Outdated
@@ -0,0 +1,115 @@ | |||
components: | |||
schemas: | |||
Statefull_flow.Objective: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - StatefulFlow.Objective
Endpoint destination config for server. | ||
type: object | ||
properties: | ||
choice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expand the choice to differentiate between ipv6_address and ipv4_address, the type will be string and the format will be ipv4 and ipv6 respectively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lemoncrust FYI. |
Updates of Anky and Ankur's review comment
…ator/models into Ixload-models
schemas: | ||
App: | ||
description: >- | ||
A container for emulated TCP/UDP , application protocols, attacks and it's traffic configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's -> its
default: "v10" | ||
cookie_jar_size: | ||
description: >- | ||
cookie_jar_size the number of cookies that will be saved for each client. The maximum value of this is 300. (only if enable_cookie_support is enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cookie_jar_size the number -> The number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not define max for this field to be 300?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably need rewording of (only if enable_cookie_support is enabled). when enable_cookie_support is on, this is the number of cookies ...
x-field-uid: 5 | ||
command_timeout: | ||
description: >- | ||
HTTP command timeout timer in seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare reasonable min/max please, so that it is testable within reasons.
@@ -0,0 +1,12 @@ | |||
components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to just have this wrap HttpClient.Client which is defined in the client.yaml file?
meaning, are there common client properties that we envision to be among all kinds of clients other than HTTP? If yes, that would go to client.yaml, but the httpclient specific options should just be in this file?
same comment for httpserver.yaml vs. server.yaml
description: >- | ||
The number of seconds that the server will wait for input on an open connection before closing the session with a 408 error. | ||
type: integer | ||
default: 300 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasonable min/max?
@@ -0,0 +1,22 @@ | |||
components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directory name statefull_flow -> stateful_flow
schemas: | ||
StatefulFlow.Objective: | ||
description: >- | ||
objective config such simulated user, thoughput, conncurrent connections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughput -> throughput
objective config such simulated user, thoughput, conncurrent connections. | ||
type: object | ||
properties: | ||
choice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we mentioned that iperf can be mapped to this model overall. will any of these 3 objectives map to iperf? If yes, how? examples?
iperf has a mode that is able to just seek max bandwidth/tput, but how would. someone map the throughput objectives defined here to iperf to make sense? what can we measure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winstonliu1111 @ajbalogh
we could map tcp and other iperf, nperf properties in proposed model. To measure max throughput as iperf/nperf in L47 model, following are the proposal .
Objective.Throughput:
description: >-
Throughput traffic
type: object
required: [choice]
properties:
choice:
description: |-
The throughput test value or max throughput .
type: string
default: value
x-field-uid: 1
x-enum:
value:
x-field-uid: 1
max_throughput:
x-field-uid: 2
value:
type: integer
x-field-uid: 2
max_throughput:
type: boolean
default: 0
x-field-uid: 3
#for L4-7 desire throughput
objt= traffic.objective.throughput()
objt.value = 100
#for Max Throughput
objt= traffic.objective.throughput()
objt.max_throughput = True
@bortok @vinod @ankur-sheth
|
Below are the features added for L4-7 model
-> Added
App
underconfig
for l4-7 configurations-> Added
TCP
andHTTP
model onApp
. The profile can be used intraffic
and can be scaled forTCP
andHTTP
configs-> Added
Traffic
inApp
for L4-7 traffic configurations such asclient
,server
,endpoints
andobjectives
configs-> it resolves discussed functionality in issue: #238
View the proposed changes using the redocly API viewer
Sample snippet