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
6 changes: 1 addition & 5 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1933,11 +1933,7 @@
"direction": "RX",
"type": "SPAN",
"dst_port": "Ethernet2",
"src_port": [
"Ethernet3",
"Ethernet4"
]

"src_port": "Ethernet3,Ethernet4"
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
"MIRROR_ERSPAN_ENTRY_VALID_SRC_PORTCHANNEL": {
"desc": "Configuring ERSPAN entry with valid source portchannel"
},
"MIRROR_ERSPAN_ENTRY_INVALID_SRC_PORT": {
"desc": "Configuring ERSPAN entry with invalid source port",
"eStrKey" : "InvalidValue"
},
"MIRROR_SPAN_ENTRY_WITH_VALID_VALUES": {
"desc": "Configuring SPAN entry with valid source and destination ports"
},
Expand All @@ -90,10 +86,6 @@
"MIRROR_SPAN_ENTRY_VALID_DST_PORT_CPU": {
"desc": "Configuring SPAN entry with valid destination port CPU"
},
"MIRROR_SPAN_ENTRY_INVALID_SRC_PORT": {
"desc": "Configuring SPAN entry with invalid destination ports",
"eStrKey" : "InvalidValue"
},
"MIRROR_SPAN_ENTRY_INVALID_DIRECTION": {
"desc": "Configuring SPAN entry with invalid direction",
"eStrKey": "InvalidValue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@
"gre_type": "0x1234",
"dscp": "10",
"ttl": "63",
"src_port": [
"Ethernet0"
]
"src_port": "Ethernet0"
}
]
}
Expand Down Expand Up @@ -346,29 +344,7 @@
"gre_type": "0x1234",
"dscp": "10",
"ttl": "63",
"src_port": [
"PortChannel5"
]
}
]
}
}
},
"MIRROR_ERSPAN_ENTRY_INVALID_SRC_PORT": {
"sonic-mirror-session:sonic-mirror-session": {
"MIRROR_SESSION": {
"MIRROR_SESSION_LIST": [
{
"name": "erspan",
"type": "ERSPAN",
"dst_ip": "11.1.1.1",
"src_ip": "10.1.1.1",
"gre_type": "0x1234",
"dscp": "10",
"ttl": "63",
"src_port": [
"Ethernet0"
]
"src_port": "PortChannel5"
}
]
}
Expand Down Expand Up @@ -415,10 +391,7 @@
"name": "span",
"type": "SPAN",
"dst_port": "Ethernet0",
"src_port": [
"Ethernet4",
"Ethernet8"
],
"src_port": "Ethernet4,Ethernet8",
"direction": "RX"
}
]
Expand Down Expand Up @@ -479,37 +452,6 @@
}
}
},
"MIRROR_SPAN_ENTRY_INVALID_SRC_PORT": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "1",
"mtu": 9000,
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-mirror-session:sonic-mirror-session": {
"MIRROR_SESSION": {
"MIRROR_SESSION_LIST": [
{
"name": "span",
"type": "SPAN",
"dst_port": "Ethernet0",
"src_port": [
"Ethernet4"
]
}
]
}
}
},
"MIRROR_SPAN_ENTRY_INVALID_DIRECTION": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down
11 changes: 3 additions & 8 deletions src/sonic-yang-models/yang-models/sonic-mirror-session.yang
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,9 @@ module sonic-mirror-session {
"Destination port configuration for port mirroring(SPAN).";
}

leaf-list src_port {
type union {
type leafref {
path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
}
type leafref {
path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name";
}
leaf src_port {
type string {
length 1..2048;
}
description
"Source port configuration for mirroring. Can be configured for both SPAN/ERSPAN.
Expand Down