From 27f540ac5c4ac7ccdfac822b5bfc4cd1f2e0c1bc Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Wed, 11 Jul 2018 23:03:24 +0200 Subject: [PATCH] Add parameter types to documentation (#42572) Few documentation fixes --- .../modules/network/aci/aci_aaa_user.py | 2 +- .../network/aci/aci_aaa_user_certificate.py | 2 +- lib/ansible/modules/network/aci/aci_bd.py | 6 +- .../modules/network/aci/aci_bd_subnet.py | 2 + .../network/aci/aci_config_snapshot.py | 1 + .../network/aci/aci_encap_pool_range.py | 2 + .../modules/network/aci/aci_epg_to_domain.py | 2 + .../modules/network/aci/aci_fabric_node.py | 2 + .../aci_interface_policy_leaf_policy_group.py | 174 +++++++++--------- .../aci/aci_interface_policy_port_channel.py | 2 + lib/ansible/modules/network/aci/aci_l3out.py | 4 +- .../network/aci/aci_static_binding_to_epg.py | 8 +- .../network/aci/aci_switch_leaf_selector.py | 12 +- .../aci_switch_policy_vpc_protection_group.py | 3 + .../aci/aci_tenant_ep_retention_policy.py | 5 + .../network/aci/aci_vlan_pool_encap_block.py | 2 + 16 files changed, 129 insertions(+), 100 deletions(-) diff --git a/lib/ansible/modules/network/aci/aci_aaa_user.py b/lib/ansible/modules/network/aci/aci_aaa_user.py index 75d37e97de7..011ef3c31f8 100644 --- a/lib/ansible/modules/network/aci/aci_aaa_user.py +++ b/lib/ansible/modules/network/aci/aci_aaa_user.py @@ -22,7 +22,7 @@ notes: (even if that password was already set identically). This appears to be an inconsistency wrt. the idempotent nature of the APIC REST API. The vendor has been informed. - More information in :ref:`the ACI documentation `. +- More information in :ref:`the ACI documentation `. - More information about the internal APIC class B(aaa:User) from L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/). author: diff --git a/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py b/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py index eef282c2081..5bab9f270e0 100644 --- a/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py +++ b/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py @@ -33,7 +33,7 @@ options: aaa_user_type: description: - Whether this is a normal user or an appuser. - choices: [ user, appuser ] + choices: [ appuser, user ] default: user certificate: description: diff --git a/lib/ansible/modules/network/aci/aci_bd.py b/lib/ansible/modules/network/aci/aci_bd.py index 553f969793c..9277e9fdfb2 100644 --- a/lib/ansible/modules/network/aci/aci_bd.py +++ b/lib/ansible/modules/network/aci/aci_bd.py @@ -64,10 +64,10 @@ options: - The APIC defaults to C(garp) when unset during creation. choices: [ default, garp ] endpoint_retention_action: - description: - - Determines if the Bridge Domain should inherit or resolve the End Point Retention Policy. + description: + - Determines if the Bridge Domain should inherit or resolve the End Point Retention Policy. - The APIC defaults to C(resolve) when unset during creation. - choices: [ inherit, resolve ] + choices: [ inherit, resolve ] endpoint_retention_policy: description: - The name of the End Point Retention Policy the Bridge Domain should use when diff --git a/lib/ansible/modules/network/aci/aci_bd_subnet.py b/lib/ansible/modules/network/aci/aci_bd_subnet.py index 6643308efa7..5117d6325ca 100644 --- a/lib/ansible/modules/network/aci/aci_bd_subnet.py +++ b/lib/ansible/modules/network/aci/aci_bd_subnet.py @@ -50,6 +50,7 @@ options: - This is the number assocated with CIDR notation. - For IPv4 addresses, accepted values range between C(0) and C(32). - For IPv6 addresses, accepted Values range between C(0) and C(128). + type: int aliases: [ subnet_mask ] nd_prefix_policy: description: @@ -75,6 +76,7 @@ options: - The shared option limits communication to hosts in either the same VRF or the shared VRF. - The value is a list of options, C(private) and C(public) are mutually exclusive, but both can be used with C(shared). - The APIC defaults to C(private) when unset during creation. + type: list choices: - private - public diff --git a/lib/ansible/modules/network/aci/aci_config_snapshot.py b/lib/ansible/modules/network/aci/aci_config_snapshot.py index ac454894dae..0536a90bfc1 100644 --- a/lib/ansible/modules/network/aci/aci_config_snapshot.py +++ b/lib/ansible/modules/network/aci/aci_config_snapshot.py @@ -51,6 +51,7 @@ options: - Determines how many snapshots can exist for the Export Policy before the APIC starts to rollover. - Accepted values range between C(1) and C(10). - The APIC defaults to C(3) when unset. + type: int snapshot: description: - The name of the snapshot to delete. diff --git a/lib/ansible/modules/network/aci/aci_encap_pool_range.py b/lib/ansible/modules/network/aci/aci_encap_pool_range.py index 806ba7b2d82..963f206f326 100644 --- a/lib/ansible/modules/network/aci/aci_encap_pool_range.py +++ b/lib/ansible/modules/network/aci/aci_encap_pool_range.py @@ -53,6 +53,7 @@ options: range_end: description: - The end of encap range. + type: int aliases: [ end ] range_name: description: @@ -61,6 +62,7 @@ options: range_start: description: - The start of the encap range. + type: int aliases: [ start ] state: description: diff --git a/lib/ansible/modules/network/aci/aci_epg_to_domain.py b/lib/ansible/modules/network/aci/aci_epg_to_domain.py index 1f1b8c569b4..8b689d2f7fa 100644 --- a/lib/ansible/modules/network/aci/aci_epg_to_domain.py +++ b/lib/ansible/modules/network/aci/aci_epg_to_domain.py @@ -56,6 +56,7 @@ options: - The VLAN encapsulation for the EPG when binding a VMM Domain with static encap_mode. - This acts as the secondary encap when using useg. - Accepted values range between C(1) and C(4096). + type: int encap_mode: description: - The ecapsulataion method to be used. @@ -74,6 +75,7 @@ options: description: - Determines the primary VLAN ID when using useg. - Accepted values range between C(1) and C(4096). + type: int resolution_immediacy: description: - Determines when the policies should be resolved and available. diff --git a/lib/ansible/modules/network/aci/aci_fabric_node.py b/lib/ansible/modules/network/aci/aci_fabric_node.py index a7904d2d11f..1e03e497dde 100644 --- a/lib/ansible/modules/network/aci/aci_fabric_node.py +++ b/lib/ansible/modules/network/aci/aci_fabric_node.py @@ -27,6 +27,7 @@ options: pod_id: description: - The pod id of the new Fabric Node Member. + type: int serial: description: - Serial Number for the new Fabric Node Member. @@ -34,6 +35,7 @@ options: node_id: description: - Node ID Number for the new Fabric Node Member. + type: int switch: description: - Switch Name for the new Fabric Node Member. diff --git a/lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py b/lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py index c46a1e4b495..b6a81e54150 100644 --- a/lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py +++ b/lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py @@ -26,93 +26,93 @@ author: - Bruno Calogero (@brunocalogero) version_added: '2.5' options: - policy_group: - description: - - Name of the leaf policy group to be added/deleted. - aliases: [ name, policy_group_name ] - description: - description: - - Description for the leaf policy group to be created. - aliases: [ descr ] - lag_type: - description: - - Selector for the type of leaf policy group we want to create. - - C(leaf) for Leaf Access Port Policy Group - - C(link) for Port Channel (PC) - - C(node) for Virtual Port Channel (VPC) - aliases: [ lag_type_name ] - choices: [ leaf, link, node ] - required: yes - link_level_policy: - description: - - Choice of link_level_policy to be used as part of the leaf policy group to be created. - aliases: [ link_level_policy_name ] - cdp_policy: - description: - - Choice of cdp_policy to be used as part of the leaf policy group to be created. - aliases: [ cdp_policy_name ] - mcp_policy: - description: - - Choice of mcp_policy to be used as part of the leaf policy group to be created. - aliases: [ mcp_policy_name ] - lldp_policy: - description: - - Choice of lldp_policy to be used as part of the leaf policy group to be created. - aliases: [ lldp_policy_name ] - stp_interface_policy: - description: - - Choice of stp_interface_policy to be used as part of the leaf policy group to be created. - aliases: [ stp_interface_policy_name ] - egress_data_plane_policing_policy: - description: - - Choice of egress_data_plane_policing_policy to be used as part of the leaf policy group to be created. - aliases: [ egress_data_plane_policing_policy_name ] - ingress_data_plane_policing_policy: - description: - - Choice of ingress_data_plane_policing_policy to be used as part of the leaf policy group to be created. - aliases: [ ingress_data_plane_policing_policy_name ] - priority_flow_control_policy: - description: - - Choice of priority_flow_control_policy to be used as part of the leaf policy group to be created. - aliases: [ priority_flow_control_policy_name ] - fibre_channel_interface_policy: - description: - - Choice of fibre_channel_interface_policy to be used as part of the leaf policy group to be created. - aliases: [ fibre_channel_interface_policy_name ] - slow_drain_policy: - description: - - Choice of slow_drain_policy to be used as part of the leaf policy group to be created. - aliases: [ slow_drain_policy_name ] - port_channel_policy: - description: - - Choice of port_channel_policy to be used as part of the leaf policy group to be created. - aliases: [ port_channel_policy_name ] - monitoring_policy: - description: - - Choice of monitoring_policy to be used as part of the leaf policy group to be created. - aliases: [ monitoring_policy_name ] - storm_control_interface_policy: - description: - - Choice of storm_control_interface_policy to be used as part of the leaf policy group to be created. - aliases: [ storm_control_interface_policy_name ] - l2_interface_policy: - description: - - Choice of l2_interface_policy to be used as part of the leaf policy group to be created. - aliases: [ l2_interface_policy_name ] - port_security_policy: - description: - - Choice of port_security_policy to be used as part of the leaf policy group to be created. - aliases: [ port_security_policy_name ] - aep: - description: - - Choice of attached_entity_profile (AEP) to be used as part of the leaf policy group to be created. - aliases: [ aep_name ] - state: - description: - - Use C(present) or C(absent) for adding or removing. - - Use C(query) for listing an object or multiple objects. - choices: [ absent, present, query ] - default: present + policy_group: + description: + - Name of the leaf policy group to be added/deleted. + aliases: [ name, policy_group_name ] + description: + description: + - Description for the leaf policy group to be created. + aliases: [ descr ] + lag_type: + description: + - Selector for the type of leaf policy group we want to create. + - C(leaf) for Leaf Access Port Policy Group + - C(link) for Port Channel (PC) + - C(node) for Virtual Port Channel (VPC) + aliases: [ lag_type_name ] + choices: [ leaf, link, node ] + required: yes + link_level_policy: + description: + - Choice of link_level_policy to be used as part of the leaf policy group to be created. + aliases: [ link_level_policy_name ] + cdp_policy: + description: + - Choice of cdp_policy to be used as part of the leaf policy group to be created. + aliases: [ cdp_policy_name ] + mcp_policy: + description: + - Choice of mcp_policy to be used as part of the leaf policy group to be created. + aliases: [ mcp_policy_name ] + lldp_policy: + description: + - Choice of lldp_policy to be used as part of the leaf policy group to be created. + aliases: [ lldp_policy_name ] + stp_interface_policy: + description: + - Choice of stp_interface_policy to be used as part of the leaf policy group to be created. + aliases: [ stp_interface_policy_name ] + egress_data_plane_policing_policy: + description: + - Choice of egress_data_plane_policing_policy to be used as part of the leaf policy group to be created. + aliases: [ egress_data_plane_policing_policy_name ] + ingress_data_plane_policing_policy: + description: + - Choice of ingress_data_plane_policing_policy to be used as part of the leaf policy group to be created. + aliases: [ ingress_data_plane_policing_policy_name ] + priority_flow_control_policy: + description: + - Choice of priority_flow_control_policy to be used as part of the leaf policy group to be created. + aliases: [ priority_flow_control_policy_name ] + fibre_channel_interface_policy: + description: + - Choice of fibre_channel_interface_policy to be used as part of the leaf policy group to be created. + aliases: [ fibre_channel_interface_policy_name ] + slow_drain_policy: + description: + - Choice of slow_drain_policy to be used as part of the leaf policy group to be created. + aliases: [ slow_drain_policy_name ] + port_channel_policy: + description: + - Choice of port_channel_policy to be used as part of the leaf policy group to be created. + aliases: [ port_channel_policy_name ] + monitoring_policy: + description: + - Choice of monitoring_policy to be used as part of the leaf policy group to be created. + aliases: [ monitoring_policy_name ] + storm_control_interface_policy: + description: + - Choice of storm_control_interface_policy to be used as part of the leaf policy group to be created. + aliases: [ storm_control_interface_policy_name ] + l2_interface_policy: + description: + - Choice of l2_interface_policy to be used as part of the leaf policy group to be created. + aliases: [ l2_interface_policy_name ] + port_security_policy: + description: + - Choice of port_security_policy to be used as part of the leaf policy group to be created. + aliases: [ port_security_policy_name ] + aep: + description: + - Choice of attached_entity_profile (AEP) to be used as part of the leaf policy group to be created. + aliases: [ aep_name ] + state: + description: + - Use C(present) or C(absent) for adding or removing. + - Use C(query) for listing an object or multiple objects. + choices: [ absent, present, query ] + default: present extends_documentation_fragment: aci ''' diff --git a/lib/ansible/modules/network/aci/aci_interface_policy_port_channel.py b/lib/ansible/modules/network/aci/aci_interface_policy_port_channel.py index 840943a69c6..9382d247473 100644 --- a/lib/ansible/modules/network/aci/aci_interface_policy_port_channel.py +++ b/lib/ansible/modules/network/aci/aci_interface_policy_port_channel.py @@ -37,11 +37,13 @@ options: - Maximum links (range 1-16). - Accepted values range between 1 and 16. - The APIC defaults to C(16) when unset during creation. + type: int min_links: description: - Minimum links (range 1-16). - Accepted values range between 1 and 16. - The APIC defaults to C(1) when unset during creation. + type: int mode: description: - Port channel interface policy mode. diff --git a/lib/ansible/modules/network/aci/aci_l3out.py b/lib/ansible/modules/network/aci/aci_l3out.py index b6da07b87b9..bb9c21b0672 100644 --- a/lib/ansible/modules/network/aci/aci_l3out.py +++ b/lib/ansible/modules/network/aci/aci_l3out.py @@ -54,11 +54,13 @@ options: route_control: description: - Route Control enforcement direction. The only allowed values are export or import,export. - choices: [ 'export', 'import' ] + type: list + choices: [ export, import ] aliases: [ route_control_enforcement ] l3protocol: description: - Routing protocol for the L3Out + type: list choices: [ static, bgp, ospf, pim ] description: description: diff --git a/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py b/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py index 716eb3708db..75f22f7745f 100644 --- a/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py +++ b/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py @@ -48,12 +48,14 @@ options: - The encapsulation ID associating the C(epg) with the interface path. - This acts as the secondary C(encap_id) when using micro-segmentation. - Accepted values are any valid encap ID for specified encap, currently ranges between C(1) and C(4096). + type: int aliases: [ vlan, vlan_id ] primary_encap_id: description: - Determines the primary encapsulation ID associating the C(epg) with the interface path when using micro-segmentation. - Accepted values are any valid encap ID for specified encap, currently ranges between C(1) and C(4096). + type: int aliases: [ primary_vlan, primary_vlan_id ] deploy_immediacy: description: @@ -77,7 +79,8 @@ options: pod_id: description: - The pod number part of the tDn. - - C(pod_id) is usually an integer below 10. + - C(pod_id) is usually an integer below C(10). + type: int aliases: [ pod, pod_number ] leafs: description: @@ -89,12 +92,13 @@ options: interface: description: - The C(interface) string value part of the tDn. - - Usually a policy group like "test-IntPolGrp" or an interface of the following format "1/7" depending on C(interface_type). + - Usually a policy group like C(test-IntPolGrp) or an interface of the following format C(1/7) depending on C(interface_type). extpaths: description: - The C(extpaths) integer value part of the tDn. - C(extpaths) is only used if C(interface_type) is C(fex). - Usually something like C(1011). + type: int state: description: - Use C(present) or C(absent) for adding or removing. diff --git a/lib/ansible/modules/network/aci/aci_switch_leaf_selector.py b/lib/ansible/modules/network/aci/aci_switch_leaf_selector.py index 59fcb75e6ae..6a0c7ae4c3f 100644 --- a/lib/ansible/modules/network/aci/aci_switch_leaf_selector.py +++ b/lib/ansible/modules/network/aci/aci_switch_leaf_selector.py @@ -28,7 +28,7 @@ version_added: '2.5' options: description: description: - - The description to assign to the C(leaf) + - The description to assign to the C(leaf). leaf_profile: description: - Name of the Leaf Profile to which we add a Selector. @@ -39,22 +39,24 @@ options: aliases: [ name, leaf_name, leaf_profile_leaf_name, leaf_selector_name ] leaf_node_blk: description: - - Name of Node Block range to be added to Leaf Selector of given Leaf Profile + - Name of Node Block range to be added to Leaf Selector of given Leaf Profile. aliases: [ leaf_node_blk_name, node_blk_name ] leaf_node_blk_description: description: - The description to assign to the C(leaf_node_blk) from: description: - - Start of Node Block Range + - Start of Node Block range. + type: int aliases: [ node_blk_range_from, from_range, range_from ] to: description: - - Start of Node Block Range + - Start of Node Block range. + type: int aliases: [ node_blk_range_to, to_range, range_to ] policy_group: description: - - Name of the Policy Group to be added to Leaf Selector of given Leaf Profile + - Name of the Policy Group to be added to Leaf Selector of given Leaf Profile. aliases: [ name, policy_group_name ] state: description: diff --git a/lib/ansible/modules/network/aci/aci_switch_policy_vpc_protection_group.py b/lib/ansible/modules/network/aci/aci_switch_policy_vpc_protection_group.py index 4cb843e071a..c85c0a0faf7 100644 --- a/lib/ansible/modules/network/aci/aci_switch_policy_vpc_protection_group.py +++ b/lib/ansible/modules/network/aci/aci_switch_policy_vpc_protection_group.py @@ -32,6 +32,7 @@ options: protection_group_id: description: - The Explicit vPC Protection Group ID. + type: int aliases: [ id ] required: yes vpc_domain_policy: @@ -41,10 +42,12 @@ options: switch_1_id: description: - The ID of the first Leaf Switch for the Explicit vPC Protection Group. + type: int required: yes switch_2_id: description: - The ID of the Second Leaf Switch for the Explicit vPC Protection Group. + type: int required: yes state: description: diff --git a/lib/ansible/modules/network/aci/aci_tenant_ep_retention_policy.py b/lib/ansible/modules/network/aci/aci_tenant_ep_retention_policy.py index 62225c489a0..711e40a7a5c 100644 --- a/lib/ansible/modules/network/aci/aci_tenant_ep_retention_policy.py +++ b/lib/ansible/modules/network/aci/aci_tenant_ep_retention_policy.py @@ -38,6 +38,7 @@ options: - Bounce Entry Aging Interval (range 150secs - 65535secs) - 0 is used for infinite. - The APIC defaults to C(630) when unset during creation. + type: int bounce_trigger: description: - Determines if the bounce entries are installed by RARP Flood or COOP Protocol. @@ -47,21 +48,25 @@ options: description: - Hold Interval (range 5secs - 65535secs). - The APIC defaults to C(300) when unset during creation. + type: int local_ep_interval: description: - Local end point Aging Interval (range 120secs - 65535secs). - 0 is used for infinite. - The APIC defaults to C(900) when unset during creation. + type: int remote_ep_interval: description: - Remote end point Aging Interval (range 120secs - 65535secs). - O is used for infinite. - The APIC defaults to C(300) when unset during creation. + type: int move_frequency: description: - Move frequency per second (range 0secs - 65535secs). - 0 is used for none. - The APIC defaults to C(256) when unset during creation. + type: int description: description: - Description for the End point rentention policy. diff --git a/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py b/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py index 6fa56773714..3dfd88957ca 100644 --- a/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py +++ b/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py @@ -48,6 +48,7 @@ options: block_end: description: - The end of encap block. + type: int aliases: [ end ] block_name: description: @@ -56,6 +57,7 @@ options: block_start: description: - The start of the encap block. + type: int aliases: [ start ] state: description: