File: test_port_stats_request.py

package info (click to toggle)
python-openflow 2021.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,224 kB
  • sloc: python: 6,906; sh: 4; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Test for PortStatsRequest."""
from pyof.v0x01.controller2switch.common import PortStatsRequest, StatsType
from pyof.v0x01.controller2switch.stats_request import StatsRequest
from tests.unit.test_struct import TestStruct


class TestPortStatsRequest(TestStruct):
    """Test for PortStatsRequest."""

    @classmethod
    def setUpClass(cls):
        """[Controller2Switch/PortStatsRequest] - size 8."""
        super().setUpClass()
        super().set_raw_dump_file('v0x01', 'ofpt_port_stats_request')
        super().set_raw_dump_object(StatsRequest, xid=17,
                                    body_type=StatsType.OFPST_PORT,
                                    flags=0, body=PortStatsRequest(port_no=80))
        super().set_minimum_size(12)