Passed
Push — master ( b085fb...082312 )
by Humberto
03:44
created

GetConfigReply.__init__()   A

Complexity

Conditions 1

Size

Total Lines 12
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nop 4
crap 1
1
"""Defines Get Config Reply message."""
2
3
# System imports
4
5
# Third-party imports
6
7 1
from pyof.v0x04.common.header import Type
8 1
from pyof.v0x04.controller2switch.common import SwitchConfig
9
10 1
__all__ = ('GetConfigReply',)
11
12
13 1
class GetConfigReply(SwitchConfig):
14
    """Get Config Reply message."""
15
16 1
    def __init__(self, xid=None, flags=None, miss_send_len=None):
17
        """Create a GetConfigReply with the optional parameters below.
18
19
        Args:
20
            xid (int): xid to be used on the message header.
21
            flags (~pyof.v0x04.controller2switch.common.ConfigFlag):
22
                OFPC_* flags.
23
            miss_send_len (int): UBInt16 max bytes of new flow that the
24
                datapath should send to the controller.
25
        """
26 1
        super().__init__(xid, flags, miss_send_len)
27
        self.header.message_type = Type.OFPT_GET_CONFIG_REPLY
28