sonet and sdh interfaces with EthPortTable and PhyPortStatsTable

28 views
Skip to first unread message

Shabbir

unread,
Jul 11, 2018, 6:38:08 AM7/11/18
to Junos Python EZ
I have routers with sonet/sdh interfaces, 


Tried to add "interface_name: '[efgx][et][so]-*'" into PhyPortStatsTable but it returns the empty results. It seems like juniper completely forgot the sonet/sdh interfaces support into pyez.

thank you,

Yevgeniy Voloshin

unread,
Jul 11, 2018, 8:11:56 AM7/11/18
to Shabbir, Junos Python EZ
+ and also Serial/ATM/E1/T1:
 se-*
 e1-*
 ce1-*
 at-*

--
​Yev.

--
You received this message because you are subscribed to the Google Groups "Junos Python EZ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to junos-python-ez+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/junos-python-ez.
To view this discussion on the web visit https://groups.google.com/d/msgid/junos-python-ez/d2f5d431-34dd-4cca-aa76-5f29ce3c9c7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nitin Kr (India)

unread,
Jul 12, 2018, 4:52:59 AM7/12/18
to Yevgeniy Voloshin, Shabbir, Junos Python EZ

Hi Shabbir, Yev

 

Table/View can be extended. Consider these files as references.

https://www.juniper.net/documentation/en_US/junos-pyez/topics/task/program/junos-pyez-tables-views-inline-loading.html

https://github.com/vnitinv/pyez-examples/blob/master/9_user_defined_table.py

 

I will get the desired syntax added in these existing Tables after testing them properly. You can also send us pull requests to contribute back.

 

Thanks

Nitin Kr

 

From: <junos-p...@googlegroups.com> on behalf of Yevgeniy Voloshin <yevgeniy...@gmail.com>
Date: Wednesday, July 11, 2018 at 5:42 PM
To: Shabbir <shabb...@gmail.com>
Cc: Junos Python EZ <junos-p...@googlegroups.com>
Subject: Re: sonet and sdh interfaces with EthPortTable and PhyPortStatsTable

 

+ and also Serial/ATM/E1/T1:

 se-*

 e1-*

 ce1-*

 at-*


--

Yev.

 

2018-07-11 13:38 GMT+03:00 Shabbir <shabb...@gmail.com>:

I have routers with sonet/sdh interfaces, 

 

 

Tried to add "interface_name: '[efgx][et][so]-*'" into PhyPortStatsTable but it returns the empty results. It seems like juniper completely forgot the sonet/sdh interfaces support into pyez.



thank you,

--

You received this message because you are subscribed to the Google Groups "Junos Python EZ" group.

To unsubscribe from this group and stop receiving emails from it, send an email to junos-python-...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Junos Python EZ" group.

To unsubscribe from this group and stop receiving emails from it, send an email to junos-python-...@googlegroups.com.

Shabbir

unread,
Jul 15, 2018, 9:14:48 AM7/15/18
to Junos Python EZ

Hi Nitin,

i tried to add the following in ethport.yml but it returns empty list even ethernet ports are not returned.

junos/op/ethport.yml

interface_name: '[afgxe][et][so]-*'


thank you,

Nitin Kr (India)

unread,
Jul 16, 2018, 6:14:42 AM7/16/18
to Shabbir, Junos Python EZ

Hi Shabbir,

 

It should be changed to something like

 

'[afgxes][eto]-*'

 

Let me know if this helps!!

 

Thanks

Nitin Kr

Shabbir

unread,
Aug 1, 2018, 7:01:58 AM8/1/18
to Junos Python EZ
Hi Nithin,

thanks for your reply, on devices,

show interfaces "[afgxes][eto]-*" terse | match so-
Aug 01 14:58:41
so-1/0/0                up    down
so-1/0/0.0              up    down inet     172.21.252.122/30
so-1/0/1                up    down
so-1/0/2                up    down
so-1/0/3                up    down
so-1/2/0                up    down
so-1/2/1                up    down
so-1/2/2                up    down
so-1/2/3                up    down

If i put single qoute

jnpr@FJN-VPN> show interfaces '[afgxes][eto]-*' terse | match so-
Aug 01 14:58:54
error: syntax error: eto


yaml

    interface_name: '[afgxes][eto]-*'

both single and double qoutes giving same error:

ports = ports_table.get()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Volumes/Data/NEC/scripts/nw_hazard_chassis/venv/lib/python2.7/site-packages/jnpr/junos/factory/optable.py", line 64, in get
    self.xml = getattr(self.RPC, self.GET_RPC)(**rpc_args)
  File "/Volumes/Data/NEC/scripts/nw_hazard_chassis/venv/lib/python2.7/site-packages/jnpr/junos/rpcmeta.py", line 345, in _exec_rpc
    return self._junos.execute(rpc, **dec_args)
  File "/Volumes/Data/NEC/scripts/nw_hazard_chassis/venv/lib/python2.7/site-packages/jnpr/junos/decorators.py", line 49, in wrapper
    restore_transform = dev.transform
  File "/Volumes/Data/NEC/scripts/nw_hazard_chassis/venv/lib/python2.7/site-packages/jnpr/junos/device.py", line 1010, in transform
    return self._conn._device_handler.transform_reply
AttributeError: 'NoneType' object has no attribute '_device_handler'
Reply all
Reply to author
Forward
0 new messages