From 5923a64b20882e4c0774e6a01d8a44b7143627d2 Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Wed, 14 Aug 2019 19:28:55 +0530 Subject: [PATCH] Update junos_facts gather_network_resources choices (#60467) * Add negation choice for individual resource names --- .../module_utils/network/junos/argspec/facts/facts.py | 10 ++++++++++ lib/ansible/modules/network/junos/junos_facts.py | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/network/junos/argspec/facts/facts.py b/lib/ansible/module_utils/network/junos/argspec/facts/facts.py index 38ee82d31b4..58625080c0a 100644 --- a/lib/ansible/module_utils/network/junos/argspec/facts/facts.py +++ b/lib/ansible/module_utils/network/junos/argspec/facts/facts.py @@ -8,15 +8,25 @@ The arg spec for the junos facts module. """ CHOICES = [ 'all', + '!all', 'interfaces', + '!interfaces', 'lacp', + '!lacp', 'lacp_interfaces', + '!lacp_interfaces', 'lag_interfaces', + '!lag_interfaces', 'l2_interfaces', + '!l2_interfaces', 'l3_interfaces', + '!l3_interfaces', 'lldp_global', + '!lldp_global', 'lldp_interfaces', + '!lldp_interfaces', 'vlans', + '!vlans', ] diff --git a/lib/ansible/modules/network/junos/junos_facts.py b/lib/ansible/modules/network/junos/junos_facts.py index 8e32aac65b7..9293ab6fc39 100644 --- a/lib/ansible/modules/network/junos/junos_facts.py +++ b/lib/ansible/modules/network/junos/junos_facts.py @@ -63,7 +63,16 @@ options: to a given subset. Possible values for this argument include all and the resources like interfaces, vlans etc. Can specify a list of values to include a larger subset. - choices: ['all', 'interfaces', 'lacp', 'lacp_interfaces', 'lag_interfaces', 'l2_interfaces', 'l3_interfaces', 'lldp_global', 'lldp_interfaces', 'vlans'] + choices: ['all', '!all', + 'interfaces', '!interfaces', + 'lacp', '!lacp', + 'lacp_interfaces', '!lacp_interfaces', + 'lag_interfaces', '!lag_interfaces', + 'l2_interfaces', '!l2_interfaces', + 'l3_interfaces', '!l3_interfaces', + 'lldp_global', '!lldp_global', + 'lldp_interfaces', '!lldp_interfaces', + 'vlans', '!vlans'] required: false version_added: "2.9" requirements: