Completed
Push — master ( 229cac...232edf )
by Thomas
10:56
created

IgpFlags.__repr__()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 2
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 2
loc 2
rs 10
c 0
b 0
f 0
1
# encoding: utf-8
2
"""
3
igpflags.py
4
5
Created by Evelio Vila on 2016-12-01.
6
Copyright (c) 2014-2017 Exa Networks. All rights reserved.
7
"""
8
from exabgp.bgp.message.notification import Notify
9
from exabgp.bgp.message.update.attribute.bgpls.linkstate import LINKSTATE
10
from exabgp.bgp.message.update.attribute.bgpls.linkstate import LsGenericFlags
11
12
#      0                   1                   2                   3
13
#      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
14
#     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15
#     |              Type             |             Length            |
16
#     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17
#     |D|N|L|P| Resvd.|
18
#     +-+-+-+-+-+-+-+-+
19
#     https://tools.ietf.org/html/rfc7752#section-3.3.3.1
20
#
21
#           +----------+---------------------------+-----------+
22
#           |   Bit    | Description               | Reference |
23
#           +----------+---------------------------+-----------+
24
#           |   'D'    | IS-IS Up/Down Bit         | [RFC5305] |
25
#           |   'N'    | OSPF "no unicast" Bit     | [RFC5340] |
26
#           |   'L'    | OSPF "local address" Bit  | [RFC5340] |
27
#           |   'P'    | OSPF "propagate NSSA" Bit | [RFC5340] |
28
#           | Reserved | Reserved for future use.  |           |
29
#           +----------+---------------------------+-----------+
30
31
# 	RFC 7752 3.3.3.1. IGP Flags TLV
32
33
34
@LINKSTATE.register()
35
class IgpFlags(LsGenericFlags):
36
    REPR = 'IGP flags'
37
    JSON = 'igp-flags'
38
    TLV = 1152
39
    FLAGS = ['D', 'N', 'L', 'P', 'RSV', 'RSV', 'RSV', 'RSV']
40
    LEN = 1
41