Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,8 @@ def validate_ipv4_address(ctx, param, ip_addr):
def validate_gre_type(ctx, _, value):
"""A validator for validating input gre_type
"""
if value is None:
return None
try:
base = 10
if value.lower().startswith('0x'):
Expand Down
6 changes: 6 additions & 0 deletions tests/config_mirror_session_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ def test_mirror_session_add():
["test_session", "100.1.1.1", "2.2.2.2", "8", "63", "0", "0"])

mocked.assert_called_with("test_session", "100.1.1.1", "2.2.2.2", 8, 63, 0, 0, None)

result = runner.invoke(
config.config.commands["mirror_session"].commands["add"],
["test_session", "100.1.1.1", "2.2.2.2", "8", "63"])

mocked.assert_called_with("test_session", "100.1.1.1", "2.2.2.2", 8, 63, None, None, None)


def test_mirror_session_erspan_add():
Expand Down