From 15b0371eb2b8ad714b9154d61650de53f0aa8ffe Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 9 Feb 2018 08:31:37 -0500 Subject: [PATCH] Add examples and language to better showcase the 'parents' parameter in multiple network modules (#34486) * Add additional language and examples for 'parents' parameter to clarify its usage. --- .../modules/network/aruba/aruba_config.py | 2 +- lib/ansible/modules/network/asa/asa_config.py | 2 +- .../modules/network/cloudengine/ce_config.py | 2 +- .../network/dellos10/dellos10_config.py | 2 +- .../modules/network/dellos6/dellos6_config.py | 2 +- .../modules/network/dellos9/dellos9_config.py | 2 +- lib/ansible/modules/network/eos/eos_config.py | 2 +- lib/ansible/modules/network/ios/ios_config.py | 23 ++++++++++++++++++- .../modules/network/iosxr/iosxr_config.py | 2 +- .../modules/network/nxos/nxos_config.py | 2 +- .../network/ordnance/ordnance_config.py | 2 +- .../modules/network/sros/sros_config.py | 2 +- 12 files changed, 33 insertions(+), 12 deletions(-) diff --git a/lib/ansible/modules/network/aruba/aruba_config.py b/lib/ansible/modules/network/aruba/aruba_config.py index e27061d2d7..7f69ff32ee 100644 --- a/lib/ansible/modules/network/aruba/aruba_config.py +++ b/lib/ansible/modules/network/aruba/aruba_config.py @@ -36,7 +36,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/asa/asa_config.py b/lib/ansible/modules/network/asa/asa_config.py index cfa9d8480e..0b302eae3d 100644 --- a/lib/ansible/modules/network/asa/asa_config.py +++ b/lib/ansible/modules/network/asa/asa_config.py @@ -37,7 +37,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/cloudengine/ce_config.py b/lib/ansible/modules/network/cloudengine/ce_config.py index ab2a74f4de..57ef2619b1 100644 --- a/lib/ansible/modules/network/cloudengine/ce_config.py +++ b/lib/ansible/modules/network/cloudengine/ce_config.py @@ -43,7 +43,7 @@ options: default: null parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/dellos10/dellos10_config.py b/lib/ansible/modules/network/dellos10/dellos10_config.py index a53f6f755e..369807e25f 100644 --- a/lib/ansible/modules/network/dellos10/dellos10_config.py +++ b/lib/ansible/modules/network/dellos10/dellos10_config.py @@ -39,7 +39,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/dellos6/dellos6_config.py b/lib/ansible/modules/network/dellos6/dellos6_config.py index 8e67c955e0..0b3748f44f 100644 --- a/lib/ansible/modules/network/dellos6/dellos6_config.py +++ b/lib/ansible/modules/network/dellos6/dellos6_config.py @@ -37,7 +37,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/dellos9/dellos9_config.py b/lib/ansible/modules/network/dellos9/dellos9_config.py index d2633ad802..4b53679939 100644 --- a/lib/ansible/modules/network/dellos9/dellos9_config.py +++ b/lib/ansible/modules/network/dellos9/dellos9_config.py @@ -38,7 +38,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/eos/eos_config.py b/lib/ansible/modules/network/eos/eos_config.py index f4d8d47314..2d1cd133c8 100644 --- a/lib/ansible/modules/network/eos/eos_config.py +++ b/lib/ansible/modules/network/eos/eos_config.py @@ -49,7 +49,7 @@ options: default: null parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/ios/ios_config.py b/lib/ansible/modules/network/ios/ios_config.py index 7ae217e1f6..326ed1a74e 100644 --- a/lib/ansible/modules/network/ios/ios_config.py +++ b/lib/ansible/modules/network/ios/ios_config.py @@ -48,7 +48,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. @@ -237,6 +237,27 @@ EXAMPLES = """ - ip address 172.31.1.1 255.255.255.0 parents: interface Ethernet1 +- name: configure ip helpers on multiple interfaces + ios_config: + lines: + - ip helper-address 172.26.1.10 + - ip helper-address 172.26.3.8 + parents: "{{ item }}" + with_items: + - interface Ethernet1 + - interface Ethernet2 + - interface GigabitEthernet1 + +- name: configure policer in Scavenger class + ios_config: + lines: + - conform-action transmit + - exceed-action drop + parents: + - policy-map Foo + - class Scavenger + - police cir 64000 + - name: load new acl into device ios_config: lines: diff --git a/lib/ansible/modules/network/iosxr/iosxr_config.py b/lib/ansible/modules/network/iosxr/iosxr_config.py index 057de6ae3e..bfc3542129 100644 --- a/lib/ansible/modules/network/iosxr/iosxr_config.py +++ b/lib/ansible/modules/network/iosxr/iosxr_config.py @@ -41,7 +41,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/nxos/nxos_config.py b/lib/ansible/modules/network/nxos/nxos_config.py index d1b7b90046..61ccc5036a 100644 --- a/lib/ansible/modules/network/nxos/nxos_config.py +++ b/lib/ansible/modules/network/nxos/nxos_config.py @@ -47,7 +47,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/ordnance/ordnance_config.py b/lib/ansible/modules/network/ordnance/ordnance_config.py index 92986cd59b..6ea10719a4 100644 --- a/lib/ansible/modules/network/ordnance/ordnance_config.py +++ b/lib/ansible/modules/network/ordnance/ordnance_config.py @@ -36,7 +36,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. diff --git a/lib/ansible/modules/network/sros/sros_config.py b/lib/ansible/modules/network/sros/sros_config.py index e95ade27dd..6cad4b67eb 100644 --- a/lib/ansible/modules/network/sros/sros_config.py +++ b/lib/ansible/modules/network/sros/sros_config.py @@ -38,7 +38,7 @@ options: aliases: ['commands'] parents: description: - - The ordered set of parents that uniquely identify the section + - The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands.