Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rrmngmnt/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def delete_ifcfg_file(self, nic, ifcfg_path=IFCFG_PATH):
return False
return True

def send_icmp(self, dst, count="5", size="1500", extra_args=None):
def send_icmp(self, dst, count="5", size=None, extra_args=None):
"""
Send ICMP to destination IP/FQDN

Expand All @@ -500,9 +500,9 @@ def send_icmp(self, dst, count="5", size="1500", extra_args=None):
:return: True/False
:rtype: bool
"""
cmd = ["ping", dst, "-c", count, "-s", size]
if size != "1500":
cmd.extend(["-M", "do"])
cmd = ["ping", dst, "-c", count]
if size is not None:
cmd.extend(["-s", str(size), "-M", "do"])
if extra_args is not None:
for ar in extra_args.split():
cmd.extend(ar.split())
Expand Down