napalm-automation / napalm-junos

Apache License 2.0
22 stars 42 forks source link

Implementation of method ping() #97

Closed pkleanthous-zz closed 7 years ago

pkleanthous-zz commented 7 years ago

This PR aim to provide the implementation of ping() method on Junos Devices.

It follows the guidelines for the method that you can find here: napalm.readthedocs.io

More info about ping command at Juniper Documentation

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 86.031% when pulling 6684a9ee3d0f4c6c330874e8a169af394f4972ef on pkleanthous:develop into d9515205dcf896957293497c52567994ba64c0a6 on napalm-automation:develop.

dbarrosop commented 7 years ago

Great job @pkleanthous! I think everything is fine but I will leave the approval to @mirceaulinic as he has more experience with this sort of operations in JunOS devices.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 86.031% when pulling fcf2b85c85b3ad5a28a02527b505b7522c587f8a on pkleanthous:develop into d9515205dcf896957293497c52567994ba64c0a6 on napalm-automation:develop.

pkleanthous-zz commented 7 years ago

Hi @dbarrosop & @mirceaulinic. Thanks for the review.

Just made the requested changes.

XioNoX commented 7 years ago

fwiw, I tried this pull request with the new validation class/framework (through napalm_validate). Everything worked well!

With a valid destination IP:

 'ping': {u'complies': True,
          u'extra': [],
          u'missing': [],
          u'present': {'success': {u'complies': True, u'nested': True}}}}

With an invalid destination IP:

 'ping': {u'complies': False,
          u'extra': [],
          u'missing': ['success'],
          u'present': {}}}