| Conditions | 1 |
| Total Lines | 11 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | """Request a change of the role of the controller.""" |
||
| 23 | 1 | def __init__(self, xid=None, role=None, generation_id=None): |
|
| 24 | """Create a RoleRequest with the optional parameters below. |
||
| 25 | |||
| 26 | Args: |
||
| 27 | xid (int): OpenFlow xid to the header. |
||
| 28 | role (:class:`~.controller2switch.common.ControllerRole`): |
||
| 29 | Is the new role that the controller wants to assume. |
||
| 30 | generation_id (int): Master Election Generation Id. |
||
| 31 | """ |
||
| 32 | 1 | super().__init__(xid, role, generation_id) |
|
| 33 | self.header.message_type = Type.OFPT_ROLE_REQUEST |
||
| 34 |