Test Failed
Pull Request — master (#505)
by macartur
01:31
created

QueueGetConfigRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 17
ccs 5
cts 7
cp 0.7143
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 9 1
1
"""Query the switch for configured queues on a port."""
2
3
# System imports
4
5
# Third-party imports
6
7 1
from pyof.foundation.base import GenericMessage
8 1
from pyof.foundation.basic_types import Pad, UBInt16
9
# Local source tree imports
10 1
from pyof.v0x01.common.header import Header, Type
11 1
from pyof.v0x01.common.phy_port import Port
12
13 1
__all__ = ('QueueGetConfigRequest',)
14
15
16 1
class QueueGetConfigRequest(GenericMessage):
17
    """Query structure for configured queues on a port."""
18
19 1
    header = Header(message_type=Type.OFPT_QUEUE_GET_CONFIG_REQUEST)
20 1
    port = UBInt16(enum_ref=Port)
21
    #: Pad to 64-bits
22 1
    pad = Pad(2)
23
24 1
    def __init__(self, xid=None, port=None):
25
        """Create a QueueGetConfigRequest with the optional parameters below.
26
27
        Args:
28
            xid (int): xid of OpenFlow header
29
            port (~pyof.v0x01.common.phy_port.Port): Target port for the query
30
        """
31
        super().__init__(xid)
32
        self.port = port
33