Closed mpeuster closed 5 years ago
Started work in branch feature-31
Example of what is generated right now.
The keyed
lists are problematic:
---
# PED documentation: https://github.com/sonata-nfv/tng-sdk-benchmark/wiki/PED
#
# This is an example for a profiling experiment descriptor (PED) that
# defines a profiling (benchmarking) experiment for a Suricata VNF
# that is stimulated by traffic traces replayed with TCP replay.
#
# The tested network service (NSD, VNFDs) can be found in 'nw-services/'.
#
descriptor_version: 0.2 # 5GTANGO: 0.2, SONATA 0.1
vendor: "de.upb"
name: "upb-vnf-bench-02-01"
version: "1.0"
author: "Manuel Peuster, Paderborn University, manuel.peuster@uni-paderborn.de"
description: "NFV Benchmark Experiment"
# Path to the network service we want to profile (relative from PED location)
service_package: "../services/ns-1vnf-ids-suricata"
# Experiment definition
service_experiments:
- name: "upb_bench_02-01"
description: "NFV Benchmark Experiment"
repetitions: 10
time_limit: 30 # seconds per experiment
time_warmup: 20
# NSD to be used (vendor.name.version reference)
target:
vendor: "de.upb"
name: "ns-1vnf-ids-suricata"
version: "0.1"
# additional containers for traffic generation/measurements (measurement points)
measurement_points:
- name: "mp.output"
connection_point: "ns:output"
container: "mpeuster/tng-bench-mp"
address: "20.0.0.254/24" # address of the data interface of the MP
- name: "mp.input"
connection_point: "ns:input"
container: "mpeuster/tng-bench-mp"
address: "20.0.0.1/24" # address of the data interface of the MP
# experiment parameters to be tested during the experiment
experiment_parameters:
- function: "de.upb.ids-suricata.0.1"
cmd_start: ["./start.sh small_ruleset",
"./start.sh big_ruleset",
"./start.sh empty"]
cmd_stop: "./stop.sh"
cpu_bw: {"min": 0.1, "max": 1.0, "step": 0.1} # float: fraction of CPU time in vim-emu
cpu_cores: ["0"] # string: this is "cpuset_cpu" in vim-emu e.g. ["0, 1"] -> 2 CPUs
mem_max: 1024 # int: Memory in MByte
mem_swap_max: null
io_bw: null
- function: "mp.input"
cmd_start: ["tcpreplay -i data -tK --loop 1000 --preload-pcap /pcaps/smallFlows.pcap",
"tcpreplay -i data -tK --loop 1000 --preload-pcap /pcaps/bigFlows.pcap"]
cmd_stop: "./stop.sh"
cpu_bw: null # float: fraction of CPU time in vim-emu
cpu_cores: "2" # string: this is "cpuset_cpu" in vim-emu e.g. ["0, 1"] -> 2 CPUs
mem_max: 1024 # int: Memory in MByte
mem_swap_max: null
io_bw: null
- function: "mp.output"
cmd_start: null
cmd_stop: "./stop.sh" # dump packet counters to logs
cpu_bw: null # float: fraction of CPU time in vim-emu
cpu_cores: "3" # string: this is "cpuset_cpu" in vim-emu e.g. ["0, 1"] -> 2 CPUs
mem_max: 1024 # int: Memory in MByte
mem_swap_max: null
io_bw: null
Use bd_str_json = pybindJSON.dumps(m, mode="ietf")
to serialize the model. Important: mode="ietf"
In the model, connection points reference the links by their IDs. But the 5GTANGO model, ETSI, and tng-bench, reference the connection point IDs in the links, e.g.,
links': [{
'id': 'mgmt',
'connectivity_type': 'E-LAN',
'connection_points_reference': ['vdu01:mgmt', 'mgmt'],
...
},
Also link id
field is unit32
but should be string.
Field names in the model. Sometimes plural is used, e.g., scenario/nodes/resources/storage/ units vs. unit (I'd say unit would be correct)
This one only concerns tng-bench.
tng-bench does not support workflow parameters. So the complete command is injected into the implementation field right now. This is not perfect but can be solved later.
Same goes for the prober parameters (for now we us {input: "command", value: "tcpreplay. .."}
as a single parameter there).
Gym also puts the gym-manager
as one part of the scenario. tng-bench is not considered to be part of this, because I consider it outside the scope of the SUT.
This is not a real issue, just a way to handle things in different implementations, I guess.
Model updated https://github.com/raphaelvrosa/vnf-bench-model/pull/20
Automatically generate Python class of YANG model using
make
in this folder. The result of this is vnf_bd.py which will be placed intng-sdk-benchmark/src/ietf/vnf_bd.py
and imported from there.Generator code is here: https://github.com/mpeuster/tng-sdk-benchmark/blob/feature-31/src/tngsdk/benchmark/ietf/__init__.py
Testing in
vnf-bench-model
:src/ietf
[ ] check that execution is really optional (run w/o --ibbd flag does not execute new code)