diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-11-11 14:43:23 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-11-11 22:04:40 +0900 |
commit | 2e79d5abc91a6ec9f719f5c73abee77215e433ef (patch) | |
tree | e569f9a8e18b58efa054420068dafc7f3af13b8e | |
parent | e7d7e5d7f26570bb51701dd76d90a358948661f3 (diff) |
bgp: add tests for extended communities
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/unit/packet/test_bgp.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ryu/tests/unit/packet/test_bgp.py b/ryu/tests/unit/packet/test_bgp.py index e2ffc0ba..fafa23f7 100644 --- a/ryu/tests/unit/packet/test_bgp.py +++ b/ryu/tests/unit/packet/test_bgp.py @@ -85,6 +85,23 @@ class Test_bgp(unittest.TestCase): bgp.BGP_COMMUNITY_NO_EXPORT, bgp.BGP_COMMUNITY_NO_ADVERTISE, ] + ecommunities = [ + bgp.BGPTwoOctetAsSpecificExtendedCommunity(subtype=1, + as_number=65500, + local_administrator= + 3908876543), + bgp.BGPFourOctetAsSpecificExtendedCommunity(subtype=2, + as_number=10000000, + local_administrator= + 59876), + bgp.BGPIPv4AddressSpecificExtendedCommunity(subtype=3, + ipv4_address= + '192.0.2.1', + local_administrator= + 65432), + bgp.BGPOpaqueExtendedCommunity(opaque='abcdefg'), + bgp.BGPUnknownExtendedCommunity(type_=99, value='abcdefg'), + ] path_attributes = [ bgp.BGPPathAttributeOrigin(value=1), bgp.BGPPathAttributeAsPath(value=[[1000], set([1001, 1002]), @@ -96,6 +113,7 @@ class Test_bgp(unittest.TestCase): bgp.BGPPathAttributeAggregator(as_number=40000, addr='192.0.2.99'), bgp.BGPPathAttributeCommunities(communities=communities), + bgp.BGPPathAttributeExtendedCommunities(communities=ecommunities), bgp.BGPPathAttributeAs4Path(value=[[1000000], set([1000001, 1002]), [1003, 1000004]]), bgp.BGPPathAttributeAs4Aggregator(as_number=100040000, |