|
|
@ -43,10 +43,10 @@ options:
|
|
|
|
count:
|
|
|
|
count:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Number of packets to send.
|
|
|
|
- Number of packets to send.
|
|
|
|
default: 2
|
|
|
|
default: 5
|
|
|
|
source:
|
|
|
|
source:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Source IP Address.
|
|
|
|
- Source IP Address or hostname (resolvable by switch)
|
|
|
|
vrf:
|
|
|
|
vrf:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Outgoing VRF.
|
|
|
|
- Outgoing VRF.
|
|
|
@ -178,7 +178,7 @@ def get_ping_results(command, module):
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
argument_spec = dict(
|
|
|
|
argument_spec = dict(
|
|
|
|
dest=dict(required=True),
|
|
|
|
dest=dict(required=True),
|
|
|
|
count=dict(required=False, default=2),
|
|
|
|
count=dict(required=False, default=5),
|
|
|
|
vrf=dict(required=False),
|
|
|
|
vrf=dict(required=False),
|
|
|
|
source=dict(required=False),
|
|
|
|
source=dict(required=False),
|
|
|
|
state=dict(required=False, choices=['present', 'absent'], default='present'),
|
|
|
|
state=dict(required=False, choices=['present', 'absent'], default='present'),
|
|
|
@ -195,9 +195,6 @@ def main():
|
|
|
|
count = module.params['count']
|
|
|
|
count = module.params['count']
|
|
|
|
state = module.params['state']
|
|
|
|
state = module.params['state']
|
|
|
|
|
|
|
|
|
|
|
|
if count and not 1 <= int(count) <= 655350:
|
|
|
|
|
|
|
|
module.fail_json(msg="'count' must be an integer between 1 and 655350.", count=count)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ping_command = 'ping {0}'.format(destination)
|
|
|
|
ping_command = 'ping {0}'.format(destination)
|
|
|
|
for command in ['count', 'source', 'vrf']:
|
|
|
|
for command in ['count', 'source', 'vrf']:
|
|
|
|
arg = module.params[command]
|
|
|
|
arg = module.params[command]
|
|
|
|