-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support get_mac_address_table and code coverage added (#15)
* Support get_mac_address_table and code coverage added * Bux fix to support all(mgmt/portchannel/vlan) interfaces part of get_interfaces and get_interfaces_ip API
- Loading branch information
Showing
13 changed files
with
68,305 additions
and
1,554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
test/unit/dellos10/mock_data/show_mac_address_table___display_xml.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<rpc-reply> | ||
<bulk> | ||
<data> | ||
<fwd-table> | ||
<mac-addr>11:22:33:44:55:55</mac-addr> | ||
<vlan>vlan25</vlan> | ||
<entry-type>dynamic</entry-type> | ||
<if-name>port-channel11</if-name> | ||
</fwd-table> | ||
<fwd-table> | ||
<mac-addr>11:22:33:44:55:56</mac-addr> | ||
<vlan>vlan24</vlan> | ||
<entry-type>dynamic</entry-type> | ||
<if-name>port-channel12</if-name> | ||
</fwd-table> | ||
<fwd-table> | ||
<mac-addr>11:22:33:44:55:57</mac-addr> | ||
<vlan>vlan23</vlan> | ||
<entry-type>dynamic</entry-type> | ||
<if-name>port-channel13</if-name> | ||
</fwd-table> | ||
<last-keys> | ||
<entry-type>static</entry-type> | ||
<mac-addr>11:22:33:44:55:59</mac-addr> | ||
<vlan>vlan123</vlan> | ||
</last-keys> | ||
</data> | ||
</bulk> | ||
</rpc-reply> |
4 changes: 1 addition & 3 deletions
4
test/unit/mocked_data/test_get_interfaces/normal/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"ethernet1/1/8": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/9": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/6": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/7": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/4": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/5": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/2": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/3": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/1": {"is_enabled": true, "description": "This is test deswcription to validate the length", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/18": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/19": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/10": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/11": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/12": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/13": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/14": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/15": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/16": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/17": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/30": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/31": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/32": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/29": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/28": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/25": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/24": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/27": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/26": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/21": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/20": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/23": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0}, "ethernet1/1/22": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "N/A", "speed": 0} | ||
} | ||
{"mgmt1/1/1": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": true, "mac_address": "00:50:56:af:6b:7b", "speed": 1000000000}, "ethernet1/1/8": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:98", "speed": 0}, "ethernet1/1/9": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:9c", "speed": 0}, "ethernet1/1/6": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:90", "speed": 0}, "ethernet1/1/7": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:94", "speed": 0}, "ethernet1/1/4": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:88", "speed": 0}, "ethernet1/1/5": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:8c", "speed": 0}, "ethernet1/1/2": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:80", "speed": 0}, "ethernet1/1/3": {"is_enabled": true, "description": "", "last_flapped": 76.0, "is_up": false, "mac_address": "00:50:56:af:6b:84", "speed": 0}, "ethernet1/1/1": {"is_enabled": true, "description": "", "last_flapped": 103.0, "is_up": true, "mac_address": "00:50:56:af:6b:7c", "speed": 40000000000}, "vlan1": {"is_enabled": true, "description": "", "last_flapped": 11826.0, "is_up": false, "mac_address": "00:50:56:af:6b:e5", "speed": 0}, "null0": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": true, "mac_address": "", "speed": -1}, "ethernet1/1/18": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:b4", "speed": 0}, "ethernet1/1/19": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:b8", "speed": 0}, "ethernet1/1/10": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:a0", "speed": 0}, "ethernet1/1/11": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:a4", "speed": 0}, "ethernet1/1/12": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:a8", "speed": 0}, "ethernet1/1/13": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:ac", "speed": 0}, "ethernet1/1/14": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:ad", "speed": 0}, "ethernet1/1/15": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:ae", "speed": 0}, "ethernet1/1/16": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:af", "speed": 0}, "ethernet1/1/17": {"is_enabled": true, "description": "", "last_flapped": 77.0, "is_up": false, "mac_address": "00:50:56:af:6b:b0", "speed": 0}, "ethernet1/1/30": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:e1", "speed": 0}, "ethernet1/1/31": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:e2", "speed": 0}, "ethernet1/1/32": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:e3", "speed": 0}, "ethernet1/1/29": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:e0", "speed": 0}, "ethernet1/1/28": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:dc", "speed": 0}, "ethernet1/1/25": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:d0", "speed": 0}, "ethernet1/1/24": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:cc", "speed": 0}, "ethernet1/1/27": {"is_enabled": true, "description": "", "last_flapped": 79.0, "is_up": false, "mac_address": "00:50:56:af:6b:d8", "speed": 0}, "ethernet1/1/26": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:d4", "speed": 0}, "ethernet1/1/21": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:c0", "speed": 0}, "ethernet1/1/20": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:bc", "speed": 0}, "ethernet1/1/23": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:c8", "speed": 0}, "ethernet1/1/22": {"is_enabled": true, "description": "", "last_flapped": 78.0, "is_up": false, "mac_address": "00:50:56:af:6b:c4", "speed": 0}} |
Oops, something went wrong.