09-17-2017 10:24 PM
While trying to configure Logical channel in Terminal devices
1. RPC payload failed to take the values for "logical_channel_type", "rate_class", "trib_protocol".
2. while trying through CLI getting below error.
```ssh
"RP/0/RP0/CPU0:ios(config-logical-channel)#logical-channel-type ethernet
Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed [inheritance]' from this session to view the errors"
```
Code snip:
```python
from ydk.models.openconfig import openconfig_terminal_device as td
def logical_channels_config(self):
ab = td.TerminalDevice()
# ac = ty.LoopbackModeType()
lc =ab.LogicalChannels.Channel()
lc.index = 1
lc.config.index = lc.index
lc.index = lc.config.index
lc.config.description = "configuring logical channel"
# lc.config.admin_state =
# lc.config.loopback_mode = none
lc.config.logical_channel_type = "Ethernet"
lc.config.rate_class = "10G"
# lc.config.trib_protocol = "Prot_10Ge_WanIdentity"
ab.logical_channels.channel.append(lc)
pdb.set_trace()
self.crudservice.create(self.provider, ab)
```
09-18-2017 12:45 AM
Vinoth,
This doesn't look like any problem with the YDK, but a problem either with what you have tried to configure or with the mapping of that configuration to the XR native model. Suggest you get the debug output from the YDK application and engage with the team building the optical mapping.
Cheers,
Einar
09-18-2017 02:09 PM
Hi, Vinoth.
Looks like you're trying to configure a slice in NCS1002 (10G client, right?).
Configuration should include not just terminal-devices, but some other models and there is an internal interdependence (you will need to commit them all together or NCS1k won't accept the change).
I'm almost done with full config using YDK and it will be posted very soon (XML structure is also there). It will be done for all 100G and 10G client modes (5 basic examples in YDK-python, that you can enhance and use as you want).
While waiting, please, have a look here: https://xrdocs.github.io/programmability/tutorials/2017-08-22-ncs1002-configuration-automation-overview/ , it provides some basic background of how to use OpenConfig models with NCS1002.
Regards,
Viktor
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