08-05-2024 04:12 AM
hi
IGMP snooping is enable by default in 9200 switch. I want to disable it for some Vlan. I generated below code but get an error.
can anybody help me how to do that?
vlansNoNeedsIGMP=[12,55]
for vlan_id in vlansNoNeedsIGMP:
vlanRange = Cisco_IOS_XE_native.Native.Ip.Igmp.SnoopingEntry.Snooping.Vlan.Range()
vlanRange.range = vlan_id
vlanRange.yfilter=YFilter.delete
native_config.ip.igmp.snooping_entry.snooping.vlan.range.append(vlanRange)
2024-08-05 10:20:12,049 [ydk :102 ][ERROR ][346462] RPC error occurred:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3">
<rpc-error>
<error-type>application</error-type>
<error-tag>data-missing</error-tag>
<error-severity>error</error-severity>
<error-path xmlns:ios-sw="http://cisco.com/ns/yang/Cisco-IOS-XE-switch" xmlns:ios-igmp="http://cisco.com/ns/yang/Cisco-IOS-XE-igmp" xmlns:ios="http://cisco.com/ns/yang/Cisco-IOS-XE-native" xmlns:nc="urn:ietf:params:xml:ns:netconf:ba>
</error-path>
<error-info>
<bad-element>range</bad-element>
</error-info>
</rpc-error>
</rpc-reply> </error-info>
</rpc-error>
</rpc-reply>
Solved! Go to Solution.
08-23-2024 05:53 AM
The VLANs were not created, so attempting to delete them resulted in an error. The issue was resolved by replacing:
vlanRange.yfilter = YFilter.delete
with:
vlanRange.yfilter = YFilter.remove
In YFilter.remove, if the element does not exist, it will not generate an error.
08-23-2024 05:53 AM
The VLANs were not created, so attempting to delete them resulted in an error. The issue was resolved by replacing:
vlanRange.yfilter = YFilter.delete
with:
vlanRange.yfilter = YFilter.remove
In YFilter.remove, if the element does not exist, it will not generate an error.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide