summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_ping.py
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-01-25 08:37:58 -0500
committerGitHub <noreply@github.com>2023-01-25 08:37:58 -0500
commite9911888f6dcdf9031f3fdb2e32c52e45815fdbe (patch)
treedc22abb4a329ef04e98685b81d074679dc24c456 /plugins/modules/vyos_ping.py
parentbcfe61a3b6ff69f08450f3dbd8f0f1827fb18ab3 (diff)
downloadvyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.tar.gz
vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.zip
Add prettier and isort to pre-commit. (#270)
* Add prettier and isort to pre-commit. * Bump line-length to 100 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'plugins/modules/vyos_ping.py')
-rw-r--r--plugins/modules/vyos_ping.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/modules/vyos_ping.py b/plugins/modules/vyos_ping.py
index 79345830..8c0330df 100644
--- a/plugins/modules/vyos_ping.py
+++ b/plugins/modules/vyos_ping.py
@@ -134,12 +134,12 @@ rtt:
sample: {"avg": 2, "max": 8, "min": 1, "mdev": 24}
"""
-from ansible.module_utils.basic import AnsibleModule
-from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import (
- run_commands,
-)
import re
+from ansible.module_utils.basic import AnsibleModule
+
+from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import run_commands
+
def main():
"""main entry point for module execution"""
@@ -150,9 +150,7 @@ 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"),
)
module = AnsibleModule(argument_spec=argument_spec)
@@ -170,9 +168,7 @@ 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")