-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For Vlan interfaces nxos driver, the state is not correctly defined (…
…related to json output). (#1072) * For Vlan interfaces nxos driver, the state is not correctly defined (related to json output). There are no admin_state and state fields for them. Example: { "interface": "Vlan120", "svi_admin_state": "up", "svi_line_proto": "up", "svi_mac": "002a.6ad3.0000", "svi_desc": "", "svi_ip_addr": "192.168.0.10", "svi_ip_mask": "24", "svi_mtu": "1500", "svi_bw": "1000000", "svi_delay": "10" }, { "interface": "Vlan198", "svi_admin_state": "down", "state_rsn_desc": "Administratively down", "svi_line_proto": "down", "svi_mac": "002a.6ad3.0000", "svi_ip_addr": "192.168.0.11", "svi_ip_mask": "24", "svi_mtu": "1500", "svi_bw": "1000000", "svi_delay": "10" }, * misprint * Because this is a virtual interface, then is_up == is_enabled, from my point of view. * black test * misprint * I have extra characters on some devices * Removed debug output
- Loading branch information
1 parent
f9c8ae1
commit 6709e1c
Showing
4 changed files
with
82 additions
and
9 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
20 changes: 20 additions & 0 deletions
20
test/nxos/mocked_data/test_get_interfaces/vlan_interface/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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"Vlan120": { | ||
"is_enabled": true, | ||
"description": "", | ||
"last_flapped": -1.0, | ||
"is_up": true, | ||
"mac_address": "00:2A:6A:D3:00:00", | ||
"mtu": 1500, | ||
"speed": 1000 | ||
}, | ||
"Vlan198": { | ||
"is_enabled": false, | ||
"description": "", | ||
"last_flapped": -1.0, | ||
"is_up": false, | ||
"mac_address": "00:2A:6A:D3:00:00", | ||
"mtu": 1500, | ||
"speed": 1000 | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
test/nxos/mocked_data/test_get_interfaces/vlan_interface/show_interface.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"TABLE_interface": { | ||
"ROW_interface": [ | ||
{ | ||
"interface": "Vlan120", | ||
"svi_admin_state": "up", | ||
"svi_line_proto": "up", | ||
"svi_mac": "002a.6ad3.0000", | ||
"svi_desc": "", | ||
"svi_ip_addr": "192.168.0.10", | ||
"svi_ip_mask": "24", | ||
"svi_mtu": "1500", | ||
"svi_bw": "1000000", | ||
"svi_delay": "10" | ||
}, | ||
{ | ||
"interface": "Vlan198", | ||
"svi_admin_state": "down", | ||
"state_rsn_desc": "Administratively down", | ||
"svi_line_proto": "down", | ||
"svi_mac": "002a.6ad3.0000", | ||
"svi_ip_addr": "192.168.0.11", | ||
"svi_ip_mask": "24", | ||
"svi_mtu": "1500", | ||
"svi_bw": "1000000", | ||
"svi_delay": "10" | ||
} | ||
] | ||
} | ||
} |