open-traffic-generator / models

Open Traffic Generator Core Models
https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/master/artifacts/openapi.yaml&nocors
MIT License
64 stars 16 forks source link

metric_group field is not working #176

Closed chestercheng closed 1 year ago

chestercheng commented 3 years ago

Steps to reproduce

  1. Deploy two-arm ixia-c scenario with veth

  2. Set the following config

    {
      "flows": [
        {
          "duration": {
            "choice": "fixed_seconds",
            "fixed_seconds": {
              "gap": 12,
              "seconds": 5
            }
          },
          "metrics": {
            "enable": true,
            "loss": false,
            "timestamps": false
          },
          "name": "flw",
          "packet": [
            {
              "choice": "ethernet",
              "ethernet": {
                "dst": {
                  "choice": "value",
                  "value": "00:AB:BC:AB:BC:AB"
                },
                "src": {
                  "choice": "value",
                  "value": "00:CD:DC:CD:DC:CD"
                }
              }
            },
            {
              "choice": "ipv4",
              "ipv4": {
                "dst": {
                  "choice": "value",
                  "value": "1.1.1.1"
                },
                "src": {
                  "choice": "value",
                  "value": "1.1.1.2"
                }
              }
            },
            {
              "choice": "udp",
              "udp": {
                "dst_port": {
                  "choice": "decrement",
                  "decrement": {
                    "count": 10,
                    "start": 6000,
                    "step": 2
                  }
                },
                "src_port": {
                  "choice": "increment",
                  "increment": {
                    "count": 10,
                    "start": 5000,
                    "step": 2
                  },
                  "metric_group": "UDP SRC PORT"
                }
              }
            }
          ],
          "rate": {
            "choice": "pps",
            "pps": 1000
          },
          "size": {
            "choice": "fixed",
            "fixed": 128
          },
          "tx_rx": {
            "choice": "port",
            "port": {
              "rx_name": "rx",
              "tx_name": "tx"
            }
          }
        }
      ],
      "layer1": [
        {
          "auto_negotiate": true,
          "ieee_media_defaults": true,
          "mtu": 1500,
          "name": "ly",
          "port_names": [
            "tx",
            "rx"
          ],
          "promiscuous": true,
          "speed": "speed_10_gbps"
        }
      ],
      "options": {
        "port_options": {
          "location_preemption": true
        }
      },
      "ports": [
        {
          "location": "localhost:5555",
          "name": "tx"
        },
        {
          "location": "localhost:5556",
          "name": "rx"
        }
      ]
    }
  3. Make a metrics request

    Request:

    {
      "choice": "flow",
      "flow": {
        "metric_groups": {
          "choice": "ingress",
          "ingress": [
            "UDP SRC PORT"
          ]
        }
      }
    }

    Response:

    {
      "choice": "flow_metrics",
      "flow_metrics": [
        {
          "bytes_rx": 640000,
          "bytes_tx": 0,
          "frames_rx": 5000,
          "frames_rx_rate": 0,
          "frames_tx": 0,
          "frames_tx_rate": 0,
          "name": "flw",
          "transmit": "stopped"
        }
      ]
    }
rudranil-das commented 3 years ago

@chestercheng , thanks for your interest in ixia-c. "metric_group" support is yet to be incorporated in ixia-c implementation. We would like to hear about the use-case(s) you are trying to achieve through "metric_group" to make sure the model and ixia-c implementation covers them when we come up with the solution.

chestercheng commented 3 years ago

@rudranil-das after traffic transmit is stopped, I want to check the recived frames is as expected or not. In ixnetwork, I can set the tracking option then drill-down statistics to achieved it.

Due to this feature is not yet implemented in snapp_ixnetwork also. I'm trying to add it in, and figure out how to makes it compatible with snappi model.

ashutshkumr commented 3 years ago

@chestercheng thanks for your interest here; we can definitely start implementing a small portion here. What we'd like you to clarify is:

chestercheng commented 2 years ago

Hi, sorry for the late reply.

  1. in my case, I would like to add the ipv4 src/dst, mac src/dst, vlan id and vlan priority fields.
  2. Yes, I'm planning to add it :)
ashutshkumr commented 1 year ago

This will now be supported by ingress/egress tracking feature newly introduced in OTG models