cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

387
Views
0
Helpful
2
Replies
rganascim
Beginner

Get PPPoE Subscribers via YDK-py IOS XR

Hello all,

 

Do you know how to obtain information about PPPoE Subscribers via YDK-PY on an ASR9k?

 

I found some ppp information in the YDK model Cisco_IOS_XR_ppp_ma_oper, but I can't filter based on username.

The idea is to get statistics from subscribers over YDK/Netconf.

 

 

Regards,

2 REPLIES 2
saalvare
Cisco Employee

Have you looked at Cisco_IOS_XR_subscriber_pppoe_ma_oper ?

Hello @saalvare , thanks for the help.

 

I think the node Interfaces is just what I'm looking for.

 

Do you know how can I obtain just the Interfaces class from the Node? I've setup a lot of filters, without success:

 

    pppoes = pppoe_ma_oper.Pppoe()
    nodes = pppoes.Nodes()
    node = nodes.Node()
    interfaces = node.Interfaces()

    gocrud = crud.read(provider, interfaces)
    print(gocrud)

But it returns errors:

Traceback (most recent call last):
  File "rafael.py", line 130, in <module>
    vai = crud.read(provider, interfaces)
  File "/usr/local/lib/python2.7/dist-packages/ydk/services/crud_service.py", line 63, in read
    top_filters = _get_top_level_entity(filters, provider.get_session().get_root_schema())
  File "/usr/local/lib/python2.7/dist-packages/ydk/entity_utils/entity_utils.py", line 216, in _get_top_level_entity
    data_node = get_data_node_from_entity(top_entity, root_schema)
RuntimeError: YInvalidArgumentError: ancestor for entity cannot be nullptr as one of the ancestors is a list. Path: interfaces

Thanks for the help.

Create
Recognize Your Peers
Content for Community-Ad