From 7b9a33a29007ed302c3001566061e22c514cde64 Mon Sep 17 00:00:00 2001 From: "Bradley A. Thornton" Date: Fri, 9 Aug 2019 10:42:04 -0700 Subject: bt_yapfed --- plugins/modules/vyos_ping.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'plugins/modules/vyos_ping.py') diff --git a/plugins/modules/vyos_ping.py b/plugins/modules/vyos_ping.py index 762bc801..f5657ffe 100644 --- a/plugins/modules/vyos_ping.py +++ b/plugins/modules/vyos_ping.py @@ -22,9 +22,11 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], - 'supported_by': 'community'} +ANSIBLE_METADATA = { + 'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community' +} DOCUMENTATION = """ --- @@ -149,7 +151,9 @@ def main(): ttl=dict(type='int'), size=dict(type='int'), interval=dict(type='int'), - state=dict(type="str", choices=["absent", "present"], default="present"), + state=dict(type="str", + choices=["absent", "present"], + default="present"), ) argument_spec.update(vyos_argument_spec) @@ -169,7 +173,9 @@ def main(): if warnings: results["warnings"] = warnings - results["commands"] = [build_ping(dest, count, size, interval, source, ttl)] + results["commands"] = [ + build_ping(dest, count, size, interval, source, ttl) + ] ping_results = run_commands(module, commands=results["commands"]) ping_results_list = ping_results[0].split("\n") @@ -218,9 +224,11 @@ def build_ping(dest, count, size=None, interval=None, source=None, ttl=None): def parse_rate(rate_info): rate_re = re.compile( - r"(?P\d+) (?:\w+) (?:\w+), (?P\d+) (?:\w+), (?P\d+)% (?:\w+) (?:\w+), (?:\w+) (?P