From 5c767d4266fe028cc0c11b05447e61ae89af9d45 Mon Sep 17 00:00:00 2001 From: Ashwini Mhatre Date: Wed, 7 Jul 2021 20:33:54 +0530 Subject: fix issue in route-maps facts code when route-maps facts are empty. (#182) fix issue in route-maps facts code when route-maps facts are empty. SUMMARY fixes: #181 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Rohit Thakur --- plugins/module_utils/network/vyos/config/route_maps/route_maps.py | 2 +- plugins/modules/vyos_route_maps.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/module_utils/network/vyos/config/route_maps/route_maps.py b/plugins/module_utils/network/vyos/config/route_maps/route_maps.py index 5e4bbea9..467d7826 100644 --- a/plugins/module_utils/network/vyos/config/route_maps/route_maps.py +++ b/plugins/module_utils/network/vyos/config/route_maps/route_maps.py @@ -40,7 +40,7 @@ class Route_maps(ResourceModule): def __init__(self, module): super(Route_maps, self).__init__( - empty_fact_val={}, + empty_fact_val=[], facts_module=Facts(module), module=module, resource="route_maps", diff --git a/plugins/modules/vyos_route_maps.py b/plugins/modules/vyos_route_maps.py index c8e7352b..27fac07f 100644 --- a/plugins/modules/vyos_route_maps.py +++ b/plugins/modules/vyos_route_maps.py @@ -350,7 +350,7 @@ EXAMPLES = """ # "route_map": "test3" # } # ], -# "before": {}, +# "before": [], # "changed": true, # "commands": [ # "set policy route-map test1 rule 1 description test", @@ -558,7 +558,7 @@ EXAMPLES = """ # # Module Execution: # -# "after": {}, +# "after": [], # "before": [ # { # "entries": [ -- cgit v1.2.3