| Total Complexity | 1 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # encoding: utf-8 |
||
| 2 | """ |
||
| 3 | admingroup.py |
||
| 4 | |||
| 5 | Created by Evelio Vila on 2016-12-01. |
||
| 6 | Copyright (c) 2014-2017 Exa Networks. All rights reserved. |
||
| 7 | """ |
||
| 8 | |||
| 9 | from struct import unpack |
||
| 10 | |||
| 11 | from exabgp.bgp.message.notification import Notify |
||
| 12 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import LinkState |
||
| 13 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import BaseLS |
||
| 14 | |||
| 15 | |||
| 16 | @LinkState.register() |
||
| 17 | class AdminGroup(BaseLS): |
||
| 18 | TLV = 1088 |
||
| 19 | REPR = 'Admin Group mask' |
||
| 20 | JSON = 'admin-group-mask' |
||
| 21 | LEN = 4 |
||
| 22 | |||
| 23 | @classmethod |
||
| 24 | def unpack(cls, data, length): |
||
| 25 | cls.check(length) |
||
| 26 | return cls(unpack('!L', data[:4])[0]) |
||
| 27 |