diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-09-05 04:43:29 -0500 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-06 18:39:04 +0200 |
commit | 591eee82296b69b9d8ed49ca28683d0f016c85b8 (patch) | |
tree | 8180f2ef133aae8bb735a91dcd80d57064e3119d /src/op_mode/ping.py | |
parent | 424c08b6a8710de99ea38d331875277ceeb6dfa3 (diff) | |
download | vyos-1x-591eee82296b69b9d8ed49ca28683d0f016c85b8.tar.gz vyos-1x-591eee82296b69b9d8ed49ca28683d0f016c85b8.zip |
T3803: add source-address option to the op mode ping CLI.
(cherry picked from commit e211cdbb375dba13af33d6ad6c3addab707f2870)
Diffstat (limited to 'src/op_mode/ping.py')
-rwxr-xr-x | src/op_mode/ping.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py index 2144ab53c..60bbc0c78 100755 --- a/src/op_mode/ping.py +++ b/src/op_mode/ping.py @@ -62,8 +62,8 @@ options = { }, 'interface': { 'ping': '{command} -I {value}', - 'type': '<interface> <X.X.X.X> <h:h:h:h:h:h:h:h>', - 'help': 'Interface to use as source for ping' + 'type': '<interface>', + 'help': 'Source interface' }, 'interval': { 'ping': '{command} -i {value}', @@ -115,6 +115,10 @@ options = { 'type': '<bytes>', 'help': 'Number of bytes to send' }, + 'source-address': { + 'ping': '{command} -I {value}', + 'type': '<x.x.x.x> <h:h:h:h:h:h:h:h>', + }, 'ttl': { 'ping': '{command} -t {value}', 'type': '<ttl>', @@ -234,4 +238,4 @@ if __name__ == '__main__': # print(f'{command} {host}') os.system(f'{command} {host}') -
\ No newline at end of file + |