1
|
|
|
"""Define GetAsyncReply message. |
2
|
|
|
|
3
|
|
|
Response to the GetAsyncRequest message. |
4
|
|
|
""" |
5
|
|
|
|
6
|
|
|
# System imports |
7
|
|
|
|
8
|
|
|
# Third-party imports |
9
|
|
|
|
10
|
|
|
# Local imports |
11
|
1 |
|
from pyof.v0x04.common.header import Type |
12
|
1 |
|
from pyof.v0x04.controller2switch.common import AsyncConfig |
13
|
|
|
|
14
|
1 |
|
__all__ = ('GetAsyncReply',) |
15
|
|
|
|
16
|
|
|
|
17
|
1 |
|
class GetAsyncReply(AsyncConfig): |
18
|
|
|
"""GetAsyncReply message. |
19
|
|
|
|
20
|
|
|
Response to GetAsyncRequest message. |
21
|
|
|
""" |
22
|
|
|
|
23
|
1 |
|
def __init__(self, xid=None, packet_in_mask1=None, packet_in_mask2=None, |
24
|
|
|
port_status_mask1=None, port_status_mask2=None, |
25
|
|
|
flow_removed_mask1=None, flow_removed_mask2=None): |
26
|
|
|
"""Set attributes for GetAsyncReply message. |
27
|
|
|
|
28
|
|
|
Args: |
29
|
|
|
xid (int): xid to be used on the message header. |
30
|
|
|
packet_in_mask1 \ |
31
|
|
|
(~pyof.v0x04.asynchronous.packet_in.PacketInReason): |
32
|
|
|
A instance of PacketInReason |
33
|
|
|
packet_in_mask2 \ |
34
|
|
|
(~pyof.v0x04.asynchronous.packet_in.PacketInReason): |
35
|
|
|
A instance of PacketInReason |
36
|
|
|
port_status_mask1 \ |
37
|
1 |
|
(~pyof.v0x04.asynchronous.port_status.PortReason): |
38
|
|
|
A instance of PortReason |
39
|
|
|
port_status_mask2 \ |
40
|
1 |
|
(~pyof.v0x04.asynchronous.port_status.PortReason): |
41
|
|
|
A instance of PortReason |
42
|
|
|
flow_removed_mask1 \ |
43
|
|
|
(~pyof.v0x04.asynchronous.flow_removed.FlowRemoved): |
44
|
|
|
A instance of FlowRemoved. |
45
|
|
|
flow_removed_mask2 \ |
46
|
|
|
(~pyof.v0x04.asynchronous.flow_removed.FlowRemoved): |
47
|
|
|
A instance of FlowRemoved. |
48
|
|
|
""" |
49
|
|
|
super().__init__(xid, packet_in_mask1, packet_in_mask2, |
50
|
|
|
port_status_mask1, port_status_mask2, |
51
|
|
|
flow_removed_mask1, flow_removed_mask2) |
52
|
|
|
self.header.message_type = Type.OFPT_GET_ASYNC_REPLY |
53
|
|
|
|