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

exabgp.bgp.message.update.attribute.bgpls.prefix.srigpprefixattr.SrIgpPrefixAttr.unpack()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
# encoding: utf-8
2
"""
3
srigpprefixattr.py
4
5
Created by Evelio Vila
6
Copyright (c) 2014-2017 Exa Networks. All rights reserved.
7
"""
8
9
import json
10
11
from exabgp.bgp.message.update.attribute.bgpls.linkstate import LINKSTATE
12
from exabgp.bgp.message.update.attribute.bgpls.linkstate import LsGenericFlags
13
14
#    draft-gredler-idr-bgp-ls-segment-routing-ext-03
15
#    0                   1                   2                   3
16
#    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
17
#   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18
#   |            Type               |            Length             |
19
#   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20
#   //                       Flags (variable)                      //
21
#   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
22
23
# 	RFC 7794 IPv4/IPv6 Extended Reachability Attribute Flags
24
25
@LINKSTATE.register()
26
class SrIgpPrefixAttr(LsGenericFlags):
27
    REPR = 'Prefix Attr Flags'
28
    JSON = 'sr-prefix-attribute-flags'
29
    TLV = 1170
30
    FLAGS = ['X', 'R', 'N', 'RSV', 'RSV', 'RSV', 'RSV', 'RSV']
31
    # MISSING LEN
32