Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
XioNoX authored and GGabriele committed Jan 27, 2017
1 parent 17444a3 commit 2db9626
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<response status="success">
<result>
<entry name="ethernet1/15">
<local>
<index>30</index>
<port-id>15</port-id>
</local>
<neighbors>
<entry name="006cbc0000004769312f302f32">
<chassis-type>MAC address</chassis-type>
<chassis-id>00:6c:bc:00:00:00</chassis-id>
<port-type>Interface name</port-type>
<port-id>Gi1/0/2</port-id>
<port-description>GigabitEthernet1/0/2</port-description>
<ttl>116</ttl>
<system-name>peer00.lab.demo</system-name>
<system-description>mock system description</system-description>
<system-capabilities>B, R,
</system-capabilities>
<enabled-capabilities>B, R,
</enabled-capabilities>
<management-address>
<entry name="10.0.0.1">
<address-type>ipv4</address-type>
<interface-number>0</interface-number>
<interface-type>System Port Number</interface-type>
</entry>
</management-address>
</entry>
</neighbors>
</entry>
<entry name="ethernet1/16">
<local>
<index>31</index>
<port-id>16</port-id>
</local>
<neighbors>
<entry name="006cbc0000014769322f302f32">
<chassis-type>MAC address</chassis-type>
<chassis-id>00:6c:bc:00:00:00</chassis-id>
<port-type>Interface name</port-type>
<port-id>Gi2/0/2</port-id>
<port-description>GigabitEthernet2/0/2</port-description>
<ttl>107</ttl>
<system-name>peer01.lab.demo</system-name>
<system-description>mock system description</system-description>
<system-capabilities>B, R,
</system-capabilities>
<enabled-capabilities>B, R,
</enabled-capabilities>
<management-address>
<entry name="10.0.0.1">
<address-type>ipv4</address-type>
<interface-number>0</interface-number>
<interface-type>System Port Number</interface-type>
</entry>
</management-address>
</entry>
</neighbors>
</entry>
<entry name="ethernet1/13">
<local>
<index>28</index>
<port-id>13</port-id>
</local>
<neighbors>
<entry name="44f477000000353138">
<chassis-type>MAC address</chassis-type>
<chassis-id>44:f4:77:00:00:00</chassis-id>
<port-type>Locally assigned</port-type>
<port-id>518</port-id>
<port-description>mockdescription</port-description>
<ttl>92</ttl>
<system-name>peer01.lab.demo</system-name>
<system-description>mock system description
</system-description>
<system-capabilities>B, R,
</system-capabilities>
<enabled-capabilities>B, R,
</enabled-capabilities>
<management-address>
<entry name="10.0.0.2">
<address-type>ipv4</address-type>
<interface-number>1</interface-number>
<interface-type>Ifindex</interface-type>
<oid>0.1.3.6.1.2.1.31.1.1.1.1.1.</oid>
</entry>
</management-address>
</entry>
</neighbors>
</entry>
<entry name="ethernet1/14">
<local>
<index>29</index>
<port-id>14</port-id>
</local>
<neighbors>
<entry name="44f477000001353138">
<chassis-type>MAC address</chassis-type>
<chassis-id>44:f4:77:00:00:01</chassis-id>
<port-type>Locally assigned</port-type>
<port-id>518</port-id>
<port-description>mockdescription</port-description>
<ttl>110</ttl>
<system-name>border2.private.lon2.mozilla.net</system-name>
<system-description>mock system description
</system-description>
<system-capabilities>B, R,
</system-capabilities>
<enabled-capabilities>B, R,
</enabled-capabilities>
<management-address>
<entry name="10.0.0.3">
<address-type>ipv4</address-type>
<interface-number>1</interface-number>
<interface-type>Ifindex</interface-type>
<oid>0.1.3.6.1.2.1.31.1.1.1.1.1.</oid>
</entry>
</management-address>
</entry>
</neighbors>
</entry>
</result>
</response>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{u'ethernet1/13': [{u'hostname': u'peer01.lab.demo', u'port': u'518'}], u'ethernet1/16': [{u'hostname': u'peer00.lab.demo', u'port': u'Gi2/0/2'}], u'ethernet1/14': [{u'hostname': u'peer02.lab.demo', u'port': u'518'}], u'ethernet1/15': [{u'hostname': u'peer00.lab.demo', u'port': u'Gi1/0/2'}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<response status="success">
<result>
<flags>flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp</flags>
<entry>
<virtual-router>default</virtual-router>
<destination>10.22.0.0/16</destination>
<nexthop>10.0.0.1</nexthop>
<metric/>
<flags>A?B
</flags>
<age>2832970</age>
<interface/></entry>
</result>
</response>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{u'10.22.0.0/16': [{u'protocol': u'bgp', u'current_active': True, u'age': u'2832970', u'routing_table': u'default', u'next_hop': u'10.0.0.1', u'outgoing_interface': None, u'preference': None}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<response status="success">
<result>
<flags>flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp</flags>
<entry>
<virtual-router>default</virtual-router>
<destination>10.0.0.128/30</destination>
<nexthop>10.0.0.1</nexthop>
<metric>0</metric>
<flags>A C
</flags>
<age/>
<interface>tunnel.34</interface>
</entry>
<entry>
<virtual-router>default</virtual-router>
<destination>10.0.0.132/30</destination>
<nexthop>10.0.0.2</nexthop>
<metric>0</metric>
<flags>A C
</flags>
<age/>
<interface>tunnel.35</interface>
</entry>
<entry>
<virtual-router>default</virtual-router>
<destination>192.168.1.1/32</destination>
<nexthop>0.0.0.0</nexthop>
<metric>0</metric>
<flags>A H
</flags>
<age/>
<interface/></entry>
</result>
</response>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{u '10.0.0.128/30': [{u 'protocol': u 'connect',u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '10.0.0.1',u 'outgoing_interface': u 'tunnel.34',u 'preference': u '0'}], u '192.168.1.1/32': [{u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '0.0.0.0',u 'outgoing_interface': None,u 'preference': u '0'}], u '10.0.0.132/30': [{u 'protocol': u 'connect',u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '10.0.0.2',u 'outgoing_interface': u 'tunnel.35',u 'preference': u '0'}]}

0 comments on commit 2db9626

Please sign in to comment.