07-27-2016 07:06 AM
One of my telecom customer is trying to use netconf-yang to provision production system ASR9K, when they try following configuration, three problem met, may I have your support to check if ASR9K/IOS-XR support these configuration on yang model now?
Problem-1: does “service-policy” supported by YDK-API in IOS-XR 6.0.1?
Customer use YDK-Py sandbox to get VLL(VPWS) running configuration of ASR9K, the result is most of configuration could be successfully obtain except “service-policy input/output”, is it supported now?, if not, roadmap?
<ASR9K CLI command>
interface Bundle-Ether10001.100 l2transport
description "Leaseline_Number--10013--20M/5M"
encapsulation dot1q 100
rewrite ingress tag pop 1 symmetric
mtu 1580
bundle load-balancing hash auto
service-policy input eco-x
service-policy output eco-x
!
l2vpn
xconnect group eco
p2p 10013
interface Bundle-Ether10001.100
neighbor ipv4 172.16.20.1 pw-id 10013
pw-class control-word
!
description "Leaseline_Number--10013--20M/5M"
!
!
YDK-Py polling result:
<YDK netconfservice.get_config>
:
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
<interface-configuration>
<active>act</active>
<interface-name>Bundle-Ether10001.100</interface-name>
<interface-mode-non-physical>l2-transport</interface-mode-non-physical>
<description>"Leaseline_Number--10013--20M/5M"</description>
<ethernet-service xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg">
<encapsulation>
<outer-tag-type>match-dot1q</outer-tag-type>
<outer-range1-low>100</outer-range1-low>
</encapsulation>
<rewrite>
<rewrite-type>pop1</rewrite-type>
</rewrite>
</ethernet-service>
<mtus>
<mtu>
<owner>sub_vlan</owner>
<mtu>1580</mtu>
</mtu>
</mtus>
<bundle xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-cfg">
<bundle-load-balancing>
<hash-function>
<hash-type>efp-auto</hash-type>
<hash-value>1</hash-value>
</hash-function>
</bundle-load-balancing>
</bundle>
</interface-configuration>
</interface-configurations>
:
<l2vpn xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg">
<enable/>
<database>
<xconnect-groups>
<xconnect-group>
<name>eco</name>
<p2p-xconnects>
<p2p-xconnect>
<name>10013</name>
<attachment-circuits>
<attachment-circuit>
<name>Bundle-Ether10001.100</name>
<enable/>
</attachment-circuit>
</attachment-circuits>
<pseudowires>
<pseudowire>
<neighbor>
<neighbor>172.16.20.1</neighbor>
<class>control-word</class>
</neighbor>
<pseudowire-id>10013</pseudowire-id>
</pseudowire>
</pseudowires>
<p2p-description>"Leaseline_Number--10013--20M/5M"</p2p-description>
</p2p-xconnect>
</p2p-xconnects>
</xconnect-group>
</xconnect-groups>
</database>
:
Problem-2: continue the problem-1, when use YDK API to create a VLL circuit configuration, following error result was presenting, you can please refer to attached log file “problme2-vll description error message.txt & problem2-xxx.py”. However, when the “p2p-description” was removed, the configuration could be created successfully without error. May I know the reason?
<?xml version="1.0"?>
<rpc-reply message-id="urn:uuid:eb2cb296-4d50-11e6-b485-08002722cb22" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>bad-element</error-tag>
<error-severity>error</error-severity>
<error-path xmlns:ns1="http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg">ns1:l2vpn/ns1:database/ns1:xconnect-groups/ns1:xconnect-group[name = 'hinet-eco']/ns1:p2p-xconnects/ns1:p2p-xconnect[name = '10015']/ns1:p2p-description</error-path>
<error-info>
<bad-element>p2p-description</bad-element>
</error-info>
</rpc-error>
</rpc-reply>
Problem-3 : Can not delete VLL circuit configuration by using netconf-yang
*** follows are example configuration of VLL circuit.
interface Bundle-Ether10001.200 l2transport
description "223Y1006--10016--20M/5M"
encapsulation dot1q 200
rewrite ingress tag pop 1 symmetric
mtu 1580
bundle load-balancing hash auto
!
l2vpn
xconnect group hinet-eco
p2p 10016
interface Bundle-Ether10001.200
neighbor ipv4 172.16.10.2 pw-id 10016
pw-class control-word
!
!
!
*** use the “problem3-Fail-nc-delete-p2p-ydk.py” to delete the “p2p 10016” circuit, the result was failed and got following error message:
vagrant@ydk-py:models$ ./Fail-nc-delete-p2p-ydk.py -v ssh://cisco:cisco@172.20.10.7
2016-07-21 08:13:28,611 - ydk.providers.NetconfServiceProvider - INFO - NetconfServiceProvider connected to 172.20.10.7:None using ssh
Traceback (most recent call last):
File "./Fail-nc-delete-p2p-ydk.py", line 91, in <module>
crud.delete(provider, l2vpn.database.xconnect_groups.xconnect_group.p2p_xconnects.p2p_xconnect)
AttributeError: 'YList' object has no attribute 'p2p_xconnects'
vagrant@ydk-py:models$
*** use the problem3-nc-delete-xc-group-ydk.py to delete whole xconnect group “hinet-eco”, the result is successful.
08-01-2016 12:47 AM
Andrew,
For problem 1, I'm afraid that the service policy statement is not supported in XR 6.0.1, but will be in XR 6.1.1.
Cheers,
Einar
08-01-2016 10:47 AM
Hi Andrew,
For problem 3, the way to delete a list instance is to create an instance and extend the parent's list with it. There is an example here. Hope this helps.
Thanks,
Abhi
08-01-2016 01:31 PM
Hi Andrew,
For problem 2, the regex for p2p-description leaf is "[\w\-\.:,_@#%$\+=\|;]+" (link for YANG model), so it is not compatible with value "\"223Y1006--10016--20M/5M\"", maybe it could be changed to some other value? Such as "223Y1006--10016--20M|5M".
Thanks,
Xiaoqin
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: